Repository navigation
chore: skip pushing docker images for dependabot - #4714
Conversation
Summary by CodeRabbit
WalkthroughAdds a Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor GH as GitHub Actions
participant Check as check_actor
participant BuildA as build-transformer-image-amd64
participant BuildR as build-transformer-image-arm64
participant BP as docker/build-push-action@v6
participant DH as DockerHub
participant Manifest as create-manifest
GH->>Check: run -> outputs.is_dependabot
Check->>GH: outputs.is_dependabot
alt start builds (needs includes check_actor)
GH->>BuildA: start
GH->>BuildR: start
BuildA->>BP: build & load (amd64, push:false)
BuildR->>BP: build & load (arm64, push:false)
BP->>BuildA: image loaded locally
BP->>BuildR: image loaded locally
end
alt is_dependabot == false
BuildA->>DH: docker login (guarded) & push multi-arch
BuildR->>DH: docker login (guarded) & push multi-arch
GH->>Manifest: create manifest (guarded)
else is_dependabot == true
note right of GH #F3F7FF: login/push/manifest steps skipped
end
GH->>GH: echo messages / docker run --rm ... yarn test (conditional on should_execute_tests)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
|
Allure Test reports for this run are available at:
|
|
Allure Test reports for this run are available at:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4714 +/- ##
===========================================
+ Coverage 91.80% 91.90% +0.09%
===========================================
Files 650 650
Lines 34486 34486
Branches 8098 8088 -10
===========================================
+ Hits 31660 31694 +34
+ Misses 2596 2562 -34
Partials 230 230 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/build-push-docker-image.yml (1)
239-257: Manifest job still pushes for Dependabot
The manifest job still executes itsdocker buildx imagetools createcommands even when the actor isdependabot[bot]. Because those commands push tags, they require Docker Hub auth; with the login step skipped, the calls fail with 401 and the workflow breaks. Gate the whole job (or at least the push steps) on the same actor check so Dependabot runs exit cleanly without pushing.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/build-push-docker-image.yml(5 hunks)
⏰ 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 / 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 (javascript-typescript)
- GitHub Check: Analyze (go)
|
Allure Test reports for this run are available at:
|
|
Allure Test reports for this run are available at:
|
|
Allure Test reports for this run are available at:
|
|
Allure Test reports for this run are available at:
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.github/workflows/build-push-docker-image.yml (3)
47-63: Good early gating for Dependabot; consider broader match.Actor check and output wiring look solid. Optional: broaden to match legacy “dependabot-preview[bot]” too.
Apply:
- if [[ "${{ github.actor }}" == "dependabot[bot]" ]]; then + if [[ "${{ github.actor }}" == dependabot* ]]; then echo "is_dependabot=true" >> $GITHUB_OUTPUT echo "Actor is dependabot[bot] - skipping certain steps" else echo "is_dependabot=false" >> $GITHUB_OUTPUT echo "Actor is ${{ github.actor }} - proceeding normally" fi
131-145: Local-load build swap looks good; add cache to speed CI.Using docker/build-push-action@v6 with load:true is the right move. Add GHA cache to accelerate local test builds.
Example (tune scopes as needed):
- name: Build and load Docker Image id: build-and-push uses: docker/build-push-action@v6 with: context: . file: ${{ inputs.dockerfile }} load: true - platforms: linux/arm64 + platforms: linux/arm64 push: false tags: ${{ inputs.build_tag }} target: ${{ inputs.load_target }} + cache-from: type=gha,scope=arm64-load + cache-to: type=gha,mode=max,scope=arm64-loadAnd similarly for amd64:
- platforms: linux/amd64 + platforms: linux/amd64 + cache-from: type=gha,scope=amd64-load + cache-to: type=gha,mode=max,scope=amd64-loadAlso applies to: 196-206
155-167: Avoid redundant second build for Dependabot; skip the multi-platform build step entirely.With push=false, the build-scan-push step still performs a full build (and possibly scan) again, duplicating work after the local-load build. Gate the whole step to save CI time for bots.
Apply:
- - name: Build and Push Multi-platform Images + - name: Build and Push Multi-platform Images + if: ${{ needs.check_actor.outputs.is_dependabot == 'false' }} uses: rudderlabs/[email protected] with: context: . file: ${{ inputs.dockerfile }} target: ${{ inputs.push_target }} - push: ${{ needs.check_actor.outputs.is_dependabot == 'false' }} + push: trueRepeat the same guard for the amd64 job’s step.
Also applies to: 216-229
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/build-push-docker-image.yml(8 hunks)
⏰ 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 AMD64
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Code Coverage
- GitHub Check: check-health
- GitHub Check: UT Tests
- GitHub Check: test_and_publish
- GitHub Check: Analyze (go)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (3)
.github/workflows/build-push-docker-image.yml (3)
121-126: DockerHub login correctly skipped for bots.Step-level if guards are correct and align with the goal of avoiding pushes for Dependabot. LGTM.
Also applies to: 182-188
149-153: Test steps via docker run look fine.Clear progress output and containerized test execution. LGTM.
Also applies to: 210-214
235-237: Manifest job correctly skipped for bots.Job-level if is clean and matches the intent. LGTM.
|
Allure Test reports for this run are available at:
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
.github/workflows/build-push-docker-image.yml (2)
73-79: Fix bash conditional for use_merge_sha to avoid brittle behaviorUse a POSIX test instead of embedding a workflow expression directly in a shell if.
Apply this diff:
- if ${{inputs.use_merge_sha}} == true; then + if [ "${{ inputs.use_merge_sha }}" = 'true' ]; then sha=$(echo ${{github.sha}}) else sha=$(echo ${{ github.event.pull_request.head.sha }}) fi
97-109: Replace deprecated ::set-output and clean up file checksUsing ::set-output is deprecated and no-ops in modern runners, so your job output is likely empty. Also remove duplicate Dockerfile entry and make logging of arrays clearer.
Apply this diff:
- readarray -t modified_files <<<"$(jq -r '.[]' <<<'${{ steps.files.outputs.modified }}')" - echo "Modified files: $modified_files" + readarray -t modified_files <<<"$(jq -r '.[]' <<<'${{ steps.files.outputs.modified }}')" + printf 'Modified files:\n%s\n' "${modified_files[@]}" found=false for modified_file in "${modified_files[@]}"; do - if [[ "$modified_file" == "Dockerfile" || "$modified_file" == "docker-compose.yml" || "$modified_file" == "Dockerfile" || "$modified_file" == "Dockerfile-ut-func" ]]; then + if [[ "$modified_file" == "Dockerfile" || "$modified_file" == "docker-compose.yml" || "$modified_file" == "Dockerfile-ut-func" ]]; then found=true break fi done echo "Match Found: $found" - echo "::set-output name=should_execute_tests::$found" + echo "should_execute_tests=$found" >> "$GITHUB_OUTPUT"
🧹 Nitpick comments (2)
.github/workflows/build-push-docker-image.yml (2)
155-169: Use the same SHA you checked out in build argsYou checkout needs.get_sha.outputs.sha but pass github.sha to the build. Align them to avoid mismatches when use_merge_sha is enabled.
Apply this diff:
build-args: | version=${{ inputs.img_tag }}-arm64 - GIT_COMMIT_SHA=${{ github.sha }} + GIT_COMMIT_SHA=${{ needs.get_sha.outputs.sha }}build-args: | version=${{ inputs.img_tag }}-amd64 - GIT_COMMIT_SHA=${{ github.sha }} + GIT_COMMIT_SHA=${{ needs.get_sha.outputs.sha }}Also applies to: 217-231
141-145: Optional: drop platforms when load: true for local test buildsWith load: true, Buildx loads a single-platform image into the local daemon. Specifying platforms is unnecessary and can confuse readers. The host arch already matches each self-hosted runner.
Apply this diff:
- load: true - platforms: linux/arm64 - push: false + load: true + push: false tags: ${{ inputs.build_tag }} target: ${{ inputs.load_target }}And similarly for the AMD64 job.
Also applies to: 203-207
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/build-push-docker-image.yml(8 hunks)
⏰ 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). (6)
- GitHub Check: Code Coverage
- 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: test_and_publish
🔇 Additional comments (2)
.github/workflows/build-push-docker-image.yml (2)
47-62: Actor check looks good and addresses earlier feedbackCentralizing the Dependabot gate via a dedicated job output is clean and reused consistently across jobs and steps.
Confirm that the caller workflow forwards the original actor (Dependabot) into this reusable workflow; if not, use github.triggering_actor.
234-239: Manifest job correctly skipped for DependabotThis satisfies the objective to avoid pushes for Dependabot while still allowing builds/tests.
|
Allure Test reports for this run are available at:
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.github/workflows/build-push-docker-image.yml (2)
131-144: ✅ Build-and-load implementation correctly resolves tar-file issue.The switch to
docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83withload: trueandpush: falsecleanly addresses the prior concern about tar files. The action now builds and loads images directly to the local daemon for testing, then delegates the actual multi-platform push to the downstreamrudderlabs/build-scan-push-actionstep.Minor observation: The
id: build-and-pushis assigned but its outputs are not referenced elsewhere in the workflow. If this ID is not needed for future extensibility, consider removing it for clarity. Otherwise, a comment explaining its intended use would be helpful.Also applies to: 195-208
238-242: ✅ Manifest creation properly skipped for Dependabot.The entire
create-manifestjob is gated onis_dependabot == 'false', preventing unnecessary multi-arch manifest creation for Dependabot runs. Since all nested steps are already protected by the job condition, no credential exposure or wasted work occurs.Optional enhancement for future clarity: Consider adding explicit
ifconditions to the nested Docker login step (line 245) to make the gating more obvious at a glance, though it is not strictly necessary.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/build-push-docker-image.yml(8 hunks)
⏰ 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 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: 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)
🔇 Additional comments (5)
.github/workflows/build-push-docker-image.yml (5)
47-63: ✅ Excellent implementation of early Dependabot detection.The
check_actorjob correctly identifies Dependabot and exports a reusableis_dependabotflag that gates downstream steps throughout the workflow. The string-based output format ensures reliable downstream conditions in GitHub Actions.
113-113: ✅ Dependencies correctly ordered.Both build jobs now depend on
check_actor, ensuring the Dependabot flag is available before login/push gates are evaluated.Also applies to: 177-177
122-122: ✅ Correct gating of DockerHub login.Login steps are properly guarded to prevent credential exposure and unnecessary authentication for Dependabot-triggered runs.
Also applies to: 186-186
146-155: ✅ Test execution properly structured with environment variables and correct string comparisons.The refactoring improves readability: test conditions now correctly quote the job output (
should_execute_tests == 'true'), and the environment variable pattern (BUILD_TAG) makes the docker run commands clearer. Echo statements add useful debugging context. Notably, tests are not gated by the Dependabot check—they run when code is modified, which is appropriate since Dependabot PRs may still require validation.Also applies to: 210-219
159-159: ✅ Multi-platform push steps correctly gated for Dependabot.The conditional prevents image pushes for Dependabot-triggered runs, directly fulfilling the PR objective.
Also applies to: 223-223
|
Allure Test reports for this run are available at:
|
|
* feat: introduce e2e tests UT (#4686) * chore: update slack notification list (#4706) * chore: skip pushing docker images for dependabot (#4714) * chore: skip building images for debendabot * chore: review comments * chore: skip docker login for dependabot * chore: skip docker login for dependabot * chore: misc * chore: misc * chore: misc * chore: misc * chore: review comments * chore: review comments * chore: review comments * chore: review comments * chore: review comments * chore: add dub to new test structure (#4717) * chore: add readme for campaign_manager (#4710) * chore: update GAOC readme with quota link (#4723) * chore: apply security best practices (#4708) [StepSecurity] Apply security best practices Signed-off-by: StepSecurity Bot <[email protected]> * feat: add validation of diff in staging deployment workflow (#4722) * chore(deps-dev): bump commander from 10.0.1 to 14.0.2 Bumps [commander](https://github.com/tj/commander.js) from 10.0.1 to 14.0.2. - [Release notes](https://github.com/tj/commander.js/releases) - [Changelog](https://github.com/tj/commander.js/blob/master/CHANGELOG.md) - [Commits](tj/commander.js@v10.0.1...v14.0.2) --- updated-dependencies: - dependency-name: commander dependency-version: 14.0.2 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps-dev): bump supertest from 6.3.4 to 7.1.4 (#4525) --- updated-dependencies: - dependency-name: supertest dependency-version: 7.1.4 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: add env vars for controlling the connection pooling on python transformations (#4738) * chore: update facebook conversion api version from 22.0 to 24.0 (#4734) * chore: update facebook conversion api version from 22.0 to 23.0 * chore: update facebook conversion api version from 23.0 to 45.0 * chore: fix typo * chore: update facebook custom audience api version from 22.0 to 23.0 (#4735) * chore: update facebook custom audience api version from 22.0 to 23.0 * chore: update facebook custom audience api version from 23.0 to 24.0 * chore: update facebook custom audience api version from 24.0 to 23.0 as it has some breaking changes * chore: update facebook pixel api version from 22.0 to 24.0 (#4737) * chore: update facebook pixel api version from 22.0 to 24.0 * chore: update facebook app events api version from 22.0 to 24.0 (#4736) * chore: move rs-ai memory bank to transformer * chore: add nodemon for hot reloading (#4748) * chore: refactor code to update variable name in more readable format (#4747) * feat: source transformation endpoint for facebook_lead_ads_native source (#4746) * chore: disable clustering in nodemon configuration (#4749) * chore: run format check on all files (#4750) * fix: intercom rETL flow when user_id only provided as identifier (#4739) * chore: apply security best practices from step security (#4727) [StepSecurity] Apply security best practices Signed-off-by: StepSecurity Bot <[email protected]> Co-authored-by: stepsecurity-app[bot] <188008098+stepsecurity-app[bot]@users.noreply.github.com> * chore(deps): bump actions/setup-node from 5.0.0 to 6.0.0 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5.0.0 to 6.0.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v5.0.0...v6.0.0) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * chore: remove logs logging request/response body (#4754) * chore: disable pyroscope for primary process in cluster mode (#4756) * feat(reddit): onboard v3 api (#4699) * feat(reddit): onboard v3 api * chore: implement router batching flow * feat: enable batching scenario * chore: add test cases * chore: address coderabbit comments * chore: add mock for timestamp * chore: add documentation for reddit * fix: use crypto for hashing * chore: address coderabbit comment * chore: address comments * chore: add validation and remove double type assertion * chore: remove undefined files from final palyload * chore: fix test case * feat(reddit): onboard v3 api * chore: implement router batching flow * feat: enable batching scenario * chore: add test cases * chore: address coderabbit comments * chore: add mock for timestamp * chore: add documentation for reddit * fix: use crypto for hashing * chore: address coderabbit comment * chore: address comments * chore: add validation and remove double type assertion * chore: remove undefined files from final palyload * chore: fix test case * chore: apply format * chore: apply format * chore(deps): bump actions/checkout from 4.3.0 to 5.0.0 Bumps [actions/checkout](https://github.com/actions/checkout) from 4.3.0 to 5.0.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4.3.0...08c6903) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * feat: add advertiser_tracking_enabled mapping for pinterest without featureFlag (#4740) * chore(deps): bump actions/stale from 10.0.0 to 10.1.0 Bumps [actions/stale](https://github.com/actions/stale) from 10.0.0 to 10.1.0. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](actions/stale@v10.0.0...v10.1.0) --- updated-dependencies: - dependency-name: actions/stale dependency-version: 10.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * chore: handle breaking changes for commander * chore: fix breaking commander changes * chore(release): 1.112.0 --------- Signed-off-by: StepSecurity Bot <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Rohith BCS <[email protected]> Co-authored-by: Vinay Teki <[email protected]> Co-authored-by: Mahesh Kutty <[email protected]> Co-authored-by: Sudip Paul <[email protected]> Co-authored-by: stepsecurity-app[bot] <188008098+stepsecurity-app[bot]@users.noreply.github.com> Co-authored-by: Krishna Chaitanya <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jayachand Mopidevi <[email protected]> Co-authored-by: GitHub Actions <[email protected]> Co-authored-by: shekhar-rudder <[email protected]>



What are the changes introduced in this PR?
Write a brief explainer on your code changes.
What is the related Linear task?
Resolves INT-4232
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.