-
Notifications
You must be signed in to change notification settings - Fork 3
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
ci: ensure publishing of npm schema happens regardless of if app deploy is skipped #1289
Conversation
📝 WalkthroughWalkthroughThe pull request modifies the CI/CD workflow configurations in two YAML files, Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Quality Gate passedIssues Measures |
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.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (1)
.github/workflows/ci-cd-staging.yml (1)
Line range hint
104-104
: Approved with suggestion: Consider deployment status for E2E testsThe change ensures E2E tests run more consistently, which is good for catching issues. However, consider adding a check for successful deployment before running tests to avoid potentially misleading results.
if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasBackendChanges == 'true') && needs.deploy-apps-staging.result == 'success' }}This would ensure tests only run if the deployment was successful.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
- .github/workflows/ci-cd-main.yml (1 hunks)
- .github/workflows/ci-cd-staging.yml (1 hunks)
🧰 Additional context used
🔇 Additional comments (4)
.github/workflows/ci-cd-staging.yml (3)
93-93
: Approved: Enhanced robustness for npm schema publishingThis change ensures that the
publish-schema-npm
job runs even if previous jobs fail or are cancelled, while still maintaining the original logic. This aligns perfectly with the PR objective of ensuring npm package publishing happens independently of app deployment status.
Line range hint
119-119
: Approved: Improved error reportingThis change enhances the workflow's error reporting by ensuring that a Slack notification is sent whenever any job in the workflow fails, regardless of the trigger or specific changes. This will help maintain better visibility into CI/CD issues.
Line range hint
93-119
: Summary: Changes align well with PR objectivesThe modifications to the job conditions in this workflow file successfully address the PR's main objective of ensuring npm package publishing occurs independently of app deployment status. Additionally, these changes improve the overall robustness and error reporting of the CI/CD process.
Key improvements:
- npm schema publishing is now more resilient to failures in other jobs.
- E2E tests have increased chances of running, potentially catching more issues.
- Error reporting via Slack has been enhanced to cover all potential failure scenarios.
These changes contribute to a more reliable and informative CI/CD process.
.github/workflows/ci-cd-main.yml (1)
129-129
: Approval: Enhanced npm package publishing reliabilityThis change improves the workflow by ensuring that the
publish-schema-npm
job runs more consistently. The new condition${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasSchemaChanges == 'true') }}
achieves the following:
- It allows the job to run even if previous jobs (like
deploy-apps-test
) fail, thanks to thealways()
condition.- It still prevents execution if any previous job has failed (
!failure()
), maintaining overall workflow integrity.- It respects manual cancellations (
!cancelled()
).- It preserves the original triggers: manual dispatch or detected schema changes.
This change aligns perfectly with the PR objective of ensuring npm package publication independently of application deployment status, enhancing the reliability of the npm package availability.
Description
Ensures that the npm package is published when:
Related Issue(s)
Verification
Documentation
docs
-directory, Altinnpedia or a separate linked PR in altinn-studio-docs., if applicable)Summary by CodeRabbit
New Features
Bug Fixes