-
Couldn't load subscription status.
- Fork 22
[FIX] keep optimization if no pr and no staging-review #625
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
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
|
|
||
| if ((not self.args.no_pr) or not self.args.staging_review) and ( | ||
| self.args.all or env_utils.get_pr_number() or (self.args.file and not self.args.function) | ||
| if raise_pr and ( |
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: We could have just merged the condition (self.args.staging_review:) in same conditional statement here.
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.
yeah, I kept them separated for readability
PR Type
Bug fix
Description
Introduce
raise_prflag for PR logicSimplify PR and staging review condition branches
Add new
revert_code_and_helpersmethodRevert code on staging and certain scenarios
Diagram Walkthrough
flowchart LR A["process_review"] --> B{"raise_pr?"} B -- "True & !staging_review" --> C["check_create_pr"] C --> D{"should_revert?"} B -- "True & staging_review" --> E["create_staging"] E --> D D -- "True" --> F["revert_code_and_helpers"] B -- "False & !staging_review" --> G["mark_optimization_success"]File Walkthrough
function_optimizer.py
Refactor PR logic and extract revert methodcodeflash/optimization/function_optimizer.py
raise_prflag to simplify PR checksrevert_code_and_helpersinto method