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

fix: bom update log not working for large batch size (backport #34715) #34719

Merged

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Apr 3, 2023

This is an automatic backport of pull request #34715 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Apr 3, 2023
@rohitwaghchaure rohitwaghchaure merged commit dff61ab into version-14-hotfix Apr 3, 2023
@mergify mergify bot deleted the mergify/bp/version-14-hotfix/pr-34715 branch April 3, 2023 11:26
@rohitwaghchaure
Copy link
Collaborator

@Mergifyio backport version-14

@mergify
Copy link
Contributor Author

mergify bot commented Apr 3, 2023

backport version-14

✅ Backports have been created

rohitwaghchaure added a commit that referenced this pull request Apr 3, 2023
fix: bom update log not working for large batch size (backport #34715) (backport #34719)
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 14.21.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Comment on lines 214 to 217
incomplete_level = any(row.get("status") == "Pending" for row in bom_batches)
if not bom_batches or not incomplete_level:
if not bom_batches or incomplete_level:
continue

Copy link
Collaborator

@marination marination Jul 18, 2023

Choose a reason for hiding this comment

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

  • We want to continue or skip processing if there are no batches to process or if all rows are completed.
  • Here not incomplete_level meant all levels are complete/there are no pending rows to process.
  • We don't want to skip if there is an incomplete level (which is happening now?), we want to process it

To simplify this, a newer snippet:

all_complete = all(row.get("status") == "Completed" for row in bom_batches)
if not bom_batches or all_complete:
    continue

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-tests This PR needs automated unit-tests. released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants