Skip to content

Conversation

anshalshukla
Copy link

Issue Addressed

Issue #7963

Proposed Changes

  • Add user agent in all the Http requests
  • Creates a new user agent function in lighthouse_version crate

Copy link
Member

@eserilev eserilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to introduce new crate dependencies for this. We already have ways to mock the beacon api, validator api etc and make requests

@anshalshukla
Copy link
Author

Right, I don’t actually need those. They were left over from something else I was experimenting with and went unnoticed.

#[cfg(test)]
mod tests {
use super::*;
use mockito::{Matcher, Server};
Copy link
Member

@eserilev eserilev Sep 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably won't compile now.

We still want to write a test to check that a user agent is returned, we have some examples of api tests in our repo that you can reference.

You can run our test suite via make test

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update the PR in a couple of days.

@jimmygchen jimmygchen added the waiting-on-author The reviewer has suggested changes and awaits thier implementation. label Sep 10, 2025
@anshalshukla anshalshukla force-pushed the add-user-agent branch 2 times, most recently from e4be8bc to 9e3a12d Compare September 14, 2025 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-author The reviewer has suggested changes and awaits thier implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants