fix(deploy-candidate): Show app name in fetch error notification (backport #6622)#6624
Conversation
When the fetch error fires from send_build_instructions_and_add_build_steps (outside the "apps" stage), the else branch showed a generic message with no app name. The GithubFetchError already carries the app name in args[1], so extract it and include it in the notification message. (cherry picked from commit 70684d6)
|
| Filename | Overview |
|---|---|
| press/press/doctype/deploy_candidate/deploy_notifications.py | Adds app name extraction from GithubFetchError.args[1] in the else branch of update_with_app_not_fetchable; logic is correct and consistent with the if branch and similar handlers. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[GithubFetchError raised] --> B{stage_slug is apps?}
B -- Yes --> C[app_name from failed_step.step]
B -- No --> D{exc.args has 2 items?}
D -- Yes --> E[app_name from exc.args index 1]
D -- No --> F[app_name is empty string]
E --> G{app_name truthy?}
F --> G
G -- Yes --> H[app_str is bold app_name]
G -- No --> I[app_str is App]
C --> J[Notification with bold app name]
H --> K[Notification with bold app name]
I --> L[Notification with generic App text]
Reviews (1): Last reviewed commit: "fix(deploy-candidate): Show app name in ..." | Re-trigger Greptile
|
🎉 This PR is included in version 0.41.8 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #6624 +/- ##
=========================================
Coverage ? 49.97%
=========================================
Files ? 955
Lines ? 79069
Branches ? 374
=========================================
Hits ? 39511
Misses ? 39532
Partials ? 26
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
When the fetch error fires from send_build_instructions_and_add_build_steps (outside the "apps" stage), the else branch showed a generic message with no app name. The GithubFetchError already carries the app name in args[1], so extract it and include it in the notification message.
This is an automatic backport of pull request #6622 done by Mergify.