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

refactor: Add exception handling in background job within BOM Update Tool (backport #30146) #30520

Merged
merged 15 commits into from
Apr 6, 2022

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 31, 2022

This is an automatic backport of pull request #30146 done by Mergify.
Cherry-pick of 4283a13 has failed:

On branch mergify/bp/version-13-hotfix/pr-30146
Your branch is ahead of 'origin/version-13-hotfix' by 1 commit.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 4283a13e5a.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   erpnext/hooks.py
	new file:   erpnext/manufacturing/doctype/bom_update_log/__init__.py
	new file:   erpnext/manufacturing/doctype/bom_update_log/bom_update_log.js
	new file:   erpnext/manufacturing/doctype/bom_update_log/bom_update_log.json
	new file:   erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py
	new file:   erpnext/manufacturing/doctype/bom_update_log/test_bom_update_log.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py

Cherry-pick of cff9155 has failed:

On branch mergify/bp/version-13-hotfix/pr-30146
Your branch is ahead of 'origin/version-13-hotfix' by 2 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit cff91558d4.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   erpnext/manufacturing/doctype/bom_update_log/bom_update_log.json
	modified:   erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py
	modified:   erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.js

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py

Cherry-pick of f3715ab has failed:

On branch mergify/bp/version-13-hotfix/pr-30146
Your branch is ahead of 'origin/version-13-hotfix' by 5 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit f3715ab382.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.js
	modified:   erpnext/manufacturing/doctype/bom_update_tool/test_bom_update_tool.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py

Cherry-pick of 620575a has failed:

On branch mergify/bp/version-13-hotfix/pr-30146
Your branch is ahead of 'origin/version-13-hotfix' by 9 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 620575a901.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   erpnext/manufacturing/doctype/bom/bom.py
	modified:   erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


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

- Created BOM Update Log that will handle queued job status and failures
- Moved validation and BG job to thus new doctype
- BOM Update Tool only works as an endpoint

(cherry picked from commit 4283a13)

# Conflicts:
#	erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py
- Added Typing
- Moved all job business logic to bom update log
- Added `run_bom_job` that handles errors and runs either of two methods
- UX: Replace button disabled until both inputs are filled
- Show log creation message on UI for correctness
- APIs return log document as result
- Converted raw sql to QB

(cherry picked from commit cff9155)

# Conflicts:
#	erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py
(cherry picked from commit 3e3af95)
(cherry picked from commit f3715ab)

# Conflicts:
#	erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py
- test creation of log and it's impact

(cherry picked from commit 1d1e925)
(cherry picked from commit 7949567)
- Explain explicit commits and skip semgrep
- Format client side translated string correctly

(cherry picked from commit ebf0094)
- Renamed public function`update_new_bom` to `update_new_bom_in_bom_items`
- Replaced `get_cached_doc` with `get_doc`
- Removed click progress bar (drive through update log)
- Removed `bom_obj.update_new_bom()`, was redundant. Did same job as `update_new_bom_in_bom_items`
- Removed `update_new_bom()` in `bom.py`, unused.
- Prettier query formatting
- `update_type` annotated as non optional Literal
- Removed redundant use of JobTimeoutException
- Corrected type annotations in `create_bom_update_log()`

(cherry picked from commit 620575a)

# Conflicts:
#	erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py
- Covers full validate function

(cherry picked from commit a945484)
@marination marination force-pushed the mergify/bp/version-13-hotfix/pr-30146 branch from 2f4073f to ec646a1 Compare April 5, 2022 13:16
@marination
Copy link
Collaborator

Unrelated failures

@marination marination merged commit 50e7533 into version-13-hotfix Apr 6, 2022
@marination marination deleted the mergify/bp/version-13-hotfix/pr-30146 branch April 6, 2022 08:20
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant