Skip to content

fix: correct tag variable usage in UT deploy workflow - #4623

Merged
koladilip merged 1 commit into
developfrom
fix/ut-deploy-workflow-tag-consistency
Sep 11, 2025
Merged

koladilip merged 1 commit into
developfrom
fix/ut-deploy-workflow-tag-consistency

Conversation

@koladilip

@koladilip koladilip commented Sep 10, 2025 •

Copy link
Copy Markdown
Contributor

What are the changes introduced in this PR?

Fixed inconsistent tag variable usage in the prepare-for-prod-ut-deploy.yml workflow file to ensure proper UT (User Transformer) deployment.

What is the related Linear task?

Resolves https://linear.app/rudderstack/issue/INT-4108/on-call-sep-10-16-dilip-progress-on-following-tasks

Please explain the objectives of your changes below

This PR fixes several inconsistencies in the UT deployment workflow:

Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?

  • Shared services: Changed from using TAG_NAME to UT_TAG_NAME for proper UT-specific tagging
  • Hosted transformer: Fixed yq path from .user-transformer.image.tag to .spec.user-transformer.image.version
  • Dedicated transformer: Fixed yq path from .spec.user_transformer.enabled to .spec.user-transformer.enabled and updated image version to use UT_TAG_NAME
  • Directory navigation: Fixed relative path navigation in the workflow

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?

This ensures that UT deployments use the correct tag naming convention and proper YAML paths, preventing deployment failures.

@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.

- Use UT_TAG_NAME instead of TAG_NAME for shared services
- Fix yq path for hosted transformer image properties
- Fix yq path for dedicated transformer enabled check
- Use UT_TAG_NAME for dedicated transformer image version
@koladilip
koladilip requested a review from a team September 10, 2025 11:59
@coderabbitai

coderabbitai Bot commented Sep 10, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Refactor

    • Updated configuration schema for the User Transformer across hosted and dedicated setups, nesting settings under a unified spec structure and standardizing key names and enablement flags for consistency.
  • Chores

    • Standardized image tagging across environments to a single convention for all deployments.
    • Aligned automation and update workflows to the new naming and schema.
    • Adjusted related configuration references to ensure compatibility and smoother production deployments.

Walkthrough

The workflow updates switch all TAG_NAME references to UT_TAG_NAME and adjust YAML paths to new schema (kebab-case keys and .spec nesting) across hosted/dedicated/multi-tenant Helm chart edits, including config-be-rudder-transformer. Enabled checks and PR creation steps are aligned to the updated paths and UT tag convention.

Changes

Cohort / File(s) Summary
GitHub Actions workflow updates
.github/workflows/prepare-for-prod-ut-deploy.yml
- Replace TAG_NAME with UT_TAG_NAME for user-transformer tagging in all yq commands and PR steps
- Update YAML schema: move image fields to .spec.user-transformer.image.*; rename user_transformer → user-transformer; enabled flag at .spec.user-transformer.enabled
- Adjust config-be pathing and tag key: use config-be-user-transformer.image.tag and updated cd flow
- Align dedicated/hosted customer updates to new paths for image.version and image.repository
- Ensure enabled checks read .spec.user-transformer.enabled

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor GH as GitHub Actions Runner
  participant Repo as helm-charts repos
  participant YQ as yq
  participant PR as GitHub PR API

  Note over GH: Start prepare-for-prod-ut-deploy
  GH->>GH: Read UT_TAG_NAME
  GH->>Repo: Checkout helm-charts (prod/enterprise/multi-tenant)
  loop Update YAML paths
    GH->>YQ: Set .spec.user-transformer.image.version = UT_TAG_NAME
    GH->>YQ: Set .spec.user-transformer.image.repository = <repo>
    GH->>YQ: Check .spec.user-transformer.enabled
  end
  GH->>Repo: Update config-be-* path\n(config-be-user-transformer.image.tag)
  GH->>PR: Create PRs with UT changes
  Note right of PR: PR titles/paths reflect UT schema/tag updates
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • sivashanmukh
  • maheshkutty
  • utsabc

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title accurately and concisely summarizes the primary change of correcting tag variable usage in the UT deploy workflow, clearly indicating the purpose and scope of the update without extraneous details.
Description Check ✅ Passed The description comprehensively follows the repository’s PR template by including each required section, clearly summarizing changes, linking the related Linear task, detailing objectives and behavior changes, and completing all subsections and checklists.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/ut-deploy-workflow-tag-consistency

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

@codecov

codecov Bot commented Sep 10, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.78%. Comparing base (c53b909) to head (63bd4e3).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4623   +/-   ##
========================================
  Coverage    91.78%   91.78%           
========================================
  Files          642      642           
  Lines        33941    33941           
  Branches      8045     8035   -10     
========================================
  Hits         31152    31152           
  Misses        2559     2559           
  Partials       230      230           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
.github/workflows/prepare-for-prod-ut-deploy.yml (2)

131-132: Minor: prefer pushd/popd over cd - for clarity.

cd - works but prints the path and relies on shell dir stack semantics; pushd/popd makes the intent explicit. Optional.


186-187: Align dedicated branch name and commit message with UT tag variable.

You bumped image.version to UT_TAG_NAME; keep branch name and commit message consistent to reduce confusion.

Apply:

-          git checkout -b dedicated-user-transformer-$TAG_NAME
+          git checkout -b dedicated-user-transformer-$UT_TAG_NAME
@@
-          git commit -m "chore: upgrade dedicated user transformers to $TAG_NAME"
-          git push -u origin dedicated-user-transformer-$TAG_NAME
+          git commit -m "chore: upgrade dedicated user transformers to $UT_TAG_NAME"
+          git push -u origin dedicated-user-transformer-$UT_TAG_NAME

Also applies to: 191-193, 165-165

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b4c9d50 and 63bd4e3.

📒 Files selected for processing (1)
  • .github/workflows/prepare-for-prod-ut-deploy.yml (4 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 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: Build Transformer Docker Image - PR / Build Transformer Docker Image AMD64
  • GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image ARM64
  • GitHub Check: Code Coverage
  • GitHub Check: test_and_publish
  • GitHub Check: UT Tests
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (3)
.github/workflows/prepare-for-prod-ut-deploy.yml (3)

150-151: Confirm file path and YAML schema
Verify that customer-objects/multi-tenant-us/hostedmtedmt.yaml is present in the checkout and that it defines .spec.user-transformer.image.version and .spec.user-transformer.image.repository before applying the yq updates.


169-181: Schema preflight and tool availability

  • Add a preflight check to fail fast on schema drift, e.g.:
    yq eval '.spec.user-transformer.enabled' "$f" >/dev/null \
      || { echo "Schema mismatch in $f"; exit 1; }
  • Verify your CI runner installs yq v4+ (so yq eval is available) and update any bulk-verification script to use the correct customer-objects directory paths in this repo.

119-119: Confirm shared-services key path in target YAMLs
The CI script couldn’t locate or clone the rudder-devops repo, so please manually verify that in
  • helm-charts/shared-services/per-az/environment/production/production.yaml
  • helm-charts/shared-services/per-az/environment/production/enterprise/enterprise.yaml
  • helm-charts/shared-services/per-az/environment/production/multi-tenant/multi-tenant.yaml
the keys .user-transformer.image.tag and .user-transformer.image.repository are defined and used. This ensures the yq eval command isn’t a no-op.

@sonarqubecloud

Copy link
Copy Markdown

@koladilip
koladilip enabled auto-merge September 11, 2025 03:26
@koladilip
koladilip merged commit 6b30364 into develop Sep 11, 2025
@koladilip
koladilip deleted the fix/ut-deploy-workflow-tag-consistency branch September 11, 2025 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants