Repository navigation
chore: restart deployment after creating a develop image - #4528
Conversation
|
Warning Rate limit exceeded@maheshkutty has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 5 minutes and 39 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📥 CommitsReviewing files that changed from the base of the PR and between 1b22842ebeb131325acd914ae62b963c8af3ea4a and 44edf6c. 📒 Files selected for processing (2)
Summary by CodeRabbit
WalkthroughA new composite GitHub Action for restarting Kubernetes deployments in EKS clusters was introduced, along with integration of this action into the CI/CD workflow. The workflow now includes a job that triggers a rollout restart for a specified deployment across multiple namespaces after building the transformer image. Changes
Sequence Diagram(s)sequenceDiagram
participant Workflow
participant RestartAction
participant AWS
participant EKS
participant K8s
Workflow->>RestartAction: Trigger with inputs (role, region, cluster, namespaces, deployment)
RestartAction->>AWS: Assume IAM role & configure credentials
RestartAction->>EKS: Update kubeconfig for cluster/region
loop For each namespace
RestartAction->>K8s: kubectl rollout restart deployment (by label)
RestartAction->>K8s: kubectl rollout status deployment
end
RestartAction-->>Workflow: Output completion message
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggestions for Improvement:
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
.github/actions/restart-deployment/action.yml (2)
24-26: Remove the checkout step to shave ~5-10 s off runtimeThe action never reads the repository contents, so
actions/checkout@v4can be safely dropped.
Less I/O, faster workflows.
50-58: Eliminate trailing whitespace to appease YAMLlintThe blank lines at 52 & 57 contain stray spaces, tripping
trailing-spaceswarnings.- +.github/workflows/prepare-for-dev-deploy.yml (1)
88-102: Add missing newline at EOFKeeps POSIX tools & linters quiet.
- deployment-name: rudder-transformer + deployment-name: rudder-transformer +
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 73262d8 and 88d199153c1f42ee0cb7661e8925f05cd2b0324b.
📒 Files selected for processing (2)
.github/actions/restart-deployment/action.yml(1 hunks).github/workflows/prepare-for-dev-deploy.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/prepare-for-dev-deploy.yml
[error] 102-102: no new line character at the end of file
(new-line-at-end-of-file)
.github/actions/restart-deployment/action.yml
[error] 52-52: trailing spaces
(trailing-spaces)
[error] 57-57: trailing spaces
(trailing-spaces)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Analyze (go)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
.github/workflows/prepare-for-dev-deploy.yml (1)
88-92: Verify thatrestart-k8s-deploymenttruly depends on all required image builds
needs: [generate-tag-names, build-transformer-image]omitsbuild-user-transformer-image.
If the restarted deployment consumes the UT image too, the job might run before the image is available.Please double-check the intended ordering.
|
Allure Test reports for this run are available at:
|
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (1)
.github/actions/restart-deployment/action.yml (1)
40-42: Addset -euo pipefailfor safer script execution
The run-block still starts without Bash strict mode, so silent failures or unset variables can slip through.run: | + # Fail fast on any error, undefined variable, or pipe failure + set -euo pipefail # Split comma-separated namespaces and restart deployment in each
🧹 Nitpick comments (2)
.github/actions/restart-deployment/action.yml (2)
51-56: Strip trailing whitespace to satisfy YAML lintTwo lines flagged (
51,56) contain superfluous spaces. Trimming them keeps the Action YAML-lint clean.- namespace=$(echo "$namespace" | xargs)␠ + namespace=$(echo "$namespace" | xargs) … - fi␠ + fi
24-24: Pinazure/setup-kubectlto a commit SHAUsing a floating version (
v4) leaves you open to unexpected upstream changes. Pinning to a full SHA keeps the workflow reproducible and protects against supply-chain attacks.Example:
- - uses: azure/setup-kubectl@v4 + - uses: azure/[email protected] # or pin to the latest commit SHA
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 88d199153c1f42ee0cb7661e8925f05cd2b0324b and 8eb54419f36f7214c94de2e8d916a36dd33d79ce.
📒 Files selected for processing (1)
.github/actions/restart-deployment/action.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/actions/restart-deployment/action.yml
[error] 51-51: trailing spaces
(trailing-spaces)
[error] 56-56: trailing spaces
(trailing-spaces)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Code Coverage
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: test_and_publish
- GitHub Check: UT Tests
- GitHub Check: Analyze (javascript-typescript)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4528 +/- ##
========================================
Coverage 91.44% 91.44%
========================================
Files 639 639
Lines 33774 33774
Branches 7978 7985 +7
========================================
Hits 30885 30885
+ Misses 2655 2627 -28
- Partials 234 262 +28 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (1)
.github/actions/restart-deployment/action.yml (1)
39-44: Addset -euo pipefailfor safer script execution
We flagged this earlier but it’s still missing. Without strict mode the loop may silently continue when akubectlcommand fails, leaving the workflow green while the rollout actually broke.- run: | - # Split comma-separated namespaces and restart deployment in each + run: | + # Fail fast on any error, unset variable, or pipe failure + set -euo pipefail + + # Split comma-separated namespaces and restart deployment in each
🧹 Nitpick comments (2)
.github/actions/restart-deployment/action.yml (1)
50-57: Strip trailing whitespace to keep YAML-lint happy
Lines 52 and 57 contain only spaces. They do nothing but trigger linter warnings.- - + +.github/workflows/prepare-for-dev-deploy.yml (1)
101-102: Add a newline at EOF (YAML-lint warning)
YAML-lint flags a missing trailing newline. Cheap to fix and keeps the linter quiet.- deployment-name: rudder-transformer,source-transformer,delivery-transformer + deployment-name: rudder-transformer,source-transformer,delivery-transformer +
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 8eb54419f36f7214c94de2e8d916a36dd33d79ce and 36f398ca4a6c9f7fc41920c1b84c7164fdbd1a75.
📒 Files selected for processing (2)
.github/actions/restart-deployment/action.yml(1 hunks).github/workflows/prepare-for-dev-deploy.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/actions/restart-deployment/action.yml
[error] 52-52: trailing spaces
(trailing-spaces)
[error] 57-57: trailing spaces
(trailing-spaces)
.github/workflows/prepare-for-dev-deploy.yml
[error] 102-102: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: Code Coverage
- GitHub Check: UT Tests
- GitHub Check: test_and_publish
- GitHub Check: Analyze (go)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
.github/workflows/prepare-for-dev-deploy.yml (1)
88-102: Verify job dependencies
restart-k8s-deploymentdepends onbuild-transformer-imagebut not onbuild-user-transformer-image. If the “UT” image is also required in the cluster, the restart might pick up a partially updated set of images. Please confirm the dependency matrix.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.github/workflows/prepare-for-dev-deploy.yml (2)
88-102: Consider addingbuild-user-transformer-imageto the dependency listThe restart job currently has:
needs: [generate-tag-names, build-transformer-image]If any of the restarted deployments rely on the user-transformer image built in
build-user-transformer-image, they may pick up an outdated image. Add the job toneeds(or justify omission) to guarantee all images are available before the rollout.
102-102: Add a trailing newlineYAML-lint flags the absence of a newline at EOF.
It’s a tiny nit, but keeping files POSIX-friendly avoids noise in future diffs.deployment-name: rudder-transformer,source-transformer,delivery-transformer +
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 36f398ca4a6c9f7fc41920c1b84c7164fdbd1a75 and 1b22842ebeb131325acd914ae62b963c8af3ea4a.
📒 Files selected for processing (1)
.github/workflows/prepare-for-dev-deploy.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/prepare-for-dev-deploy.yml
[error] 102-102: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Build Transformer Docker Image - PR / Get Changed files
- GitHub Check: Build Transformer Docker Image - PR / Get SHA information
- GitHub Check: Build User Transformer Docker Image - PR / Get Changed files
- GitHub Check: Code Coverage
- GitHub Check: test_and_publish
- GitHub Check: UT Tests
- GitHub Check: Analyze (go)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
.github/workflows/prepare-for-dev-deploy.yml (1)
88-102: Confirm the composite action supports comma-separated lists
k8s-namespaceanddeployment-nameare provided as comma-separated strings.
Unless the underlying.github/actions/restart-deploymentaction explicitly splits on commas, this will be passed as a single literal value, causing only the first namespace/deployment to be restarted or the command to fail.Please double-check the action’s
action.ymlimplementation (or add a quick unit test) to ensure list handling is correct, or switch to newline/space-separated inputs if required.
|
Allure Test reports for this run are available at:
|
491bcdb to
44edf6c
Compare
|
Allure Test reports for this run are available at:
|
|
* chore: ai generated docs for airship * chore: migrate some streaming destination to new test format (#4435) * chore: migrate some streaming destination to new test format * chore: rebase to develop * fix: type * chore: review comments * chore: ing-svc workflow takes latest go tests * chore: restart deployment after creating a develop image (#4528) * chore: restart deployment after creating a develop image * fix: review comments * fix: add dependencies for kubectl * chore: review comments * chore: review comments * chore: add another job for dedicated deployment * chore: update sku mappings for product viewed event (#4467) * chore: update sku mappings for product viewed event, fix skipped tests * chore: remove skip false --------- Co-authored-by: Mahesh Kutty <[email protected]> * chore: add checkout step for deployment restart action (#4532) * chore: auto create ing-svc pr for go-tests * chore: restructure workflows * chore: workflow add permissions * chore: address security and compatibility issues * refactor: remove unused marketo bulk upload metrics (#4537) - Remove 13 unused marketo_bulk_upload metrics that were defined but not collected - These metrics were from old implementation and not actively used - Reduces Prometheus cardinality and improves performance - Keeps only actively used marketo metrics: fetch_token, lead_lookup, activity Fixes INT-3978 * chore: use latest vars for pod restart (#4538) * chore: gitworkflow version upgrades * chore: scan push revert to old version * chore: add lint rules to catch invalid or unresolved imports (#4531) * feat: onboard postscript destination (#4438) * feat: onboard postscript destination * chore: add nwhandler tests * chore: add comments, update tests, fix properties inconsistencies * chore: address comments * chore: add util tests * feat: onboard postscript destination * chore: add nwhandler tests * chore: add comments, update tests, fix properties inconsistencies * chore: address comments * chore: add util tests * chore: address comments * fix: subscriber updation logic * chore: add tests for code coverage * chore: address comments * chore: address comments, add docs * chore: remove catch --------- Co-authored-by: Mahesh Kutty <[email protected]> Co-authored-by: Mahesh Kutty <[email protected]> * chore(release): 1.106.0 --------- Co-authored-by: Vinay Teki <[email protected]> Co-authored-by: Dilip Kola <[email protected]> Co-authored-by: Manish Kumar <[email protected]> Co-authored-by: Mahesh Kutty <[email protected]> Co-authored-by: Yashasvi Bajpai <[email protected]> Co-authored-by: Mahesh Kutty <[email protected]> Co-authored-by: GitHub Actions <[email protected]>



What are the changes introduced in this PR?
This pull request introduces a new GitHub Action for restarting Kubernetes deployments and integrates it into the development deployment workflow. The main changes include the creation of the custom action and its usage in the workflow configuration.
New GitHub Action for Kubernetes Deployment Restart:
.github/actions/restart-deployment/action.yml: Added a custom composite GitHub Action namedK8s Deployment Restart. This action allows for restarting deployments in specified Kubernetes namespaces, with support for multiple namespaces and deployments. It configures AWS credentials, updates the kubeconfig, and executes thekubectl rollout restartcommand for each deployment in the provided namespaces.Workflow Integration:
.github/workflows/prepare-for-dev-deploy.yml: Added two new jobs (restart-k8s-deploymentandrestart-k8s-deployment-dedicated) to the workflow. These jobs use the newK8s Deployment Restartaction to restart specific deployments in predefined namespaces as part of the development deployment process.What is the related Linear task?
Resolves INT-3811
Please explain the objectives of your changes below
Put down any required details on the broader aspect of your changes. If there are any dependent changes, mandatorily mention them here
Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
N/A
Any new dependencies introduced with this change?
N/A
Any new generic utility introduced or modified. Please explain the changes.
N/A
Any technical or performance related pointers to consider with the change?
N/A
@coderabbitai review
Developer checklist
My code follows the style guidelines of this project
No breaking changes are being introduced.
All related docs linked with the PR?
All changes manually tested?
Any documentation changes needed with this change?
Is the PR limited to 10 file changes?
Is the PR limited to one linear task?
Are relevant unit and component test-cases added in new readability format?
Reviewer checklist
Is the type of change in the PR title appropriate as per the changes?
Verified that there are no credentials or confidential data exposed with the changes.