Skip to content

fix(craft): allow more lenient tag names (for versioning)#7921

Merged
rohoswagger merged 1 commit intomainfrom
roshan/workflow-change
Jan 28, 2026
Merged

fix(craft): allow more lenient tag names (for versioning)#7921
rohoswagger merged 1 commit intomainfrom
roshan/workflow-change

Conversation

@rohoswagger
Copy link
Copy Markdown
Contributor

@rohoswagger rohoswagger commented Jan 28, 2026

Description

How Has This Been Tested?

Additional Options

  • [Required] I have considered whether this PR needs to be cherry-picked to the latest beta branch.
  • [Optional] Override Linear Check

Summary by cubic

Broadened tag matching in the deployment workflow to treat any "craft-*" tag as a craft release, not just "craft-latest". This ensures versioned craft tags are recognized and follow the correct build/deploy path.

Written for commit 2802049. Summary will update on new commits.

@rohoswagger rohoswagger requested a review from a team as a code owner January 28, 2026 04:32
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Jan 28, 2026

Greptile Overview

Greptile Summary

This PR updates the deployment workflow to recognize any tag matching the craft-* pattern (not just craft-latest) for triggering craft-enabled backend builds. The change allows for versioned craft releases by replacing an exact string match with a wildcard pattern match.

Key changes:

  • Modified tag matching from craft-latest (exact) to craft-* (pattern) on line 70
  • Enables workflow to handle versioned craft tags like craft-v1.0.0

Critical issue identified:

  • The Docker image tagging at line 1216 remains hardcoded to craft-latest, meaning all craft tag builds will overwrite the same Docker tag regardless of the source tag name. This prevents proper versioning of craft Docker images.

Confidence Score: 2/5

  • This PR has a critical logic flaw that prevents versioned craft tags from working as intended
  • The pattern match change is correct, but the hardcoded Docker tag at line 1216 means all craft builds will overwrite the same craft-latest tag. This defeats the purpose of supporting versioned craft tags and could cause production issues if multiple versions are deployed.
  • Line 1216 in .github/workflows/deployment.yml requires immediate attention to use dynamic tag naming

Important Files Changed

Filename Overview
.github/workflows/deployment.yml Changed craft tag matching from exact match to wildcard pattern, but Docker image tagging remains hardcoded to craft-latest

Sequence Diagram

sequenceDiagram
    participant Git as Git Tag Push
    participant Workflow as Deployment Workflow
    participant Check as determine-builds Job
    participant Build as build-backend-craft Jobs
    participant Merge as merge-backend-craft Job
    participant Docker as Docker Hub

    Git->>Workflow: Push craft-* tag (e.g., craft-v1.0.0)
    Workflow->>Check: Extract tag name
    Check->>Check: Match pattern craft-*
    Check->>Check: Set IS_CRAFT_LATEST=true
    Check->>Check: Set BUILD_BACKEND_CRAFT=true
    Check->>Build: Trigger build (AMD64 & ARM64)
    Build->>Build: Build with ENABLE_CRAFT=true
    Build->>Merge: Pass digests
    Note over Merge: Issue: Always tags as craft-latest<br/>regardless of actual tag name
    Merge->>Docker: Push manifest with tag "craft-latest"
    Docker-->>Merge: Image stored as craft-latest
Loading

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Jan 28, 2026

Additional Comments (2)

.github/workflows/deployment.yml
Docker image will always be tagged as craft-latest even when pushed from versioned tags like craft-v1.0.0. This defeats the purpose of supporting versioned craft tags. Consider using ${{ github.ref_name }} or ${{ needs.determine-builds.outputs.sanitized-tag }} to tag images with the actual tag name.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/deployment.yml
Line: 1216:1216

Comment:
Docker image will always be tagged as `craft-latest` even when pushed from versioned tags like `craft-v1.0.0`. This defeats the purpose of supporting versioned craft tags. Consider using `${{ github.ref_name }}` or `${{ needs.determine-builds.outputs.sanitized-tag }}` to tag images with the actual tag name.

How can I resolve this? If you propose a fix, please make it concise.

.github/workflows/deployment.yml
Variable name IS_CRAFT_LATEST is now misleading since it matches any craft-* tag, not just craft-latest. Consider renaming to IS_CRAFT or IS_CRAFT_TAG for clarity.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/deployment.yml
Line: 59:59

Comment:
Variable name `IS_CRAFT_LATEST` is now misleading since it matches any `craft-*` tag, not just `craft-latest`. Consider renaming to `IS_CRAFT` or `IS_CRAFT_TAG` for clarity.

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@rohoswagger rohoswagger merged commit 9cc71b7 into main Jan 28, 2026
86 of 95 checks passed
@rohoswagger rohoswagger deleted the roshan/workflow-change branch January 28, 2026 05:13
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.

1 participant