Skip to content
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

approver: Extract function 'was_older_job_ok' #180

Closed
wants to merge 1 commit into from

Conversation

okurz
Copy link
Member

@okurz okurz commented May 8, 2024

This is my suggestion how to prevent the style issue about too many return statements encountered in

@okurz okurz force-pushed the feature/extract_for_loop branch from f4399e1 to 0f9389e Compare May 8, 2024 12:43
@okurz okurz force-pushed the feature/extract_for_loop branch from 0f9389e to f6eab34 Compare May 8, 2024 12:45
Copy link
Contributor

@Martchus Martchus left a comment

Choose a reason for hiding this comment

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

Doesn't this break the cases where the loop previously logged an info message (like "Cannot ignore aggregate failure %s for update %s because: Older passing jobs do not have update under test") and then returned False? It would now continue iterating and log "Cannot ignore aggregate failure %s for update %s because: Older usable jobs did not succeed. Run out of jobs to evaluate." in addition to the actually relevant log message. I guess my two inline-comment suggestions would make it behave correctly (or at last as before).

openqabot/approver.py Outdated Show resolved Hide resolved
openqabot/approver.py Outdated Show resolved Hide resolved
okurz added a commit that referenced this pull request May 10, 2024
…tracted_method

date parsing rebased on extracted method - combining #180+#178
@okurz
Copy link
Member Author

okurz commented May 10, 2024

Obsoleted by #181

@okurz okurz closed this May 10, 2024
@okurz okurz deleted the feature/extract_for_loop branch May 10, 2024 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants