-
Notifications
You must be signed in to change notification settings - Fork 108
[AUTOREVERT] tune entry point for cli and event bridge, enabling providing custom running configurations #7526
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
base: main
Are you sure you want to change the base?
Conversation
…iding custom running configurations
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Signed-off-by: Jean Schmidt <[email protected]>
Signed-off-by: Jean Schmidt <[email protected]>
Signed-off-by: Jean Schmidt <[email protected]>
|
|
||
| if opts.subcommand is None: | ||
| if check_autorevert_disabled(default_config.repo_full_name): | ||
| if config.subcommand is None or config.subcommand == "autorevert-checker": |
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.
i think config.subcommand can never be None now?
| ) | ||
| self.secret_store_name = os.environ.get("SECRET_STORE_NAME", "") | ||
| self.secret_store_name = os.environ.get( | ||
| "SECRET_STORE_NAME", "pytorch-autorevert-secrets" |
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.
| "SECRET_STORE_NAME", "pytorch-autorevert-secrets" | |
| "SECRET_STORE_NAME", "" |
I'd suggest setting it to empty by default to make local CLI backward compatible.
Otherwise, if you try to run something like
python -m pytorch_auto_revert --dry-run autorevert-checker pull --hours 24 --hud-html
without setting --secret-store-name "" or SECRET_STORE_NAME=""
it would throw ERROR:root:Failed to retrieve secrets from AWS Secrets Manager which is confusing.
Changes lambda entry point for autorevert to enable better handling eventbridge parameters.
The changes are:
mainto specific ones for CLI and lambda;this enables to use the lambda with different configs from eventbridge like:
Key reasonings on the decisions: