-
Notifications
You must be signed in to change notification settings - Fork 107
Add Hud x-token in lambda #7511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
huydhn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| type=str, | ||
| help="the end time to run, in format of YYYY-MM-DD HH:MM:SS", | ||
| ) | ||
| parser.add_argument( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This looks redundant because it will default to ENVS["HUD_INTERNAL_BOT_TOKEN"] anyway. Why not just check for that envvars, and use it if it's set
| @classmethod | ||
| def from_request( | ||
| cls, url: str, query: dict, timeout: int = 180 | ||
| cls, url: str, query: dict, access_token:str, timeout: int = 180 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: There are a couple for formatting changes in this PR that are rather unexpected like access_token:str here. A good BE task would be to enable linter for python lambda. I'm thinking ruff check and ruff format
I added the token to the secrets for test-infra Like #7511
Also changed the URL since that's the main reason I missed this one (I was searching for hud.pytorch.org/api) Similar to #7511 Testing: added pr trigger to test https://github.com/pytorch/test-infra/actions/runs/19646178221/job/56261830650?pr=7513 An example failure is https://github.com/pytorch/test-infra/actions/runs/19645854442/job/56260785042 (if the link expires, the result was that the api gets 429 and all the jobs fail)
Add token in pytorch-lab/pytorch now, modify code to access it