Skip to content

Conversation

@Sg312
Copy link
Contributor

@Sg312 Sg312 commented Sep 30, 2025

Summary

Modifies trigger ci to capture correct version for upsert to ssm

Fixes #(issue)

Type of Change

  • Bug fix

Testing

n/a

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Sep 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Sep 30, 2025 11:41pm
sim Ready Ready Preview Comment Sep 30, 2025 11:41pm

Copy link
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.

Greptile Overview

Summary

This PR attempts to fix deployment version capture in the CI/CD workflow by simplifying how deployment versions are extracted from the trigger.dev CLI. The change removes complex shell scripting that previously parsed CLI output using grep with Perl-compatible regex to extract version numbers, and instead appears to rely on the assumption that the trigger.dev CLI natively provides a `deploymentVersion` output variable.

The workflow is responsible for deploying to both staging and production environments and storing the deployment versions in AWS Parameter Store for tracking purposes. The previous implementation manually captured CLI output, parsed it to extract version information, and set GitHub Actions step outputs that could be referenced by subsequent steps.

However, this change introduces a critical architectural flaw: while the deployment steps no longer capture or set any output variables, the Parameter Store update steps still reference steps.deploy-staging.outputs.deploymentVersion and steps.deploy-production.outputs.deploymentVersion. Without any mechanism shown to set these outputs, these references will resolve to empty values, breaking the version tracking functionality that the workflow depends on.

PR Description Notes:

  • The PR description is incomplete and uses the default template without providing actual details about the changes
  • No testing information or rationale for the changes is provided
  • The summary section lacks the required description and issue reference
Changed Files
Filename Score Overview
.github/workflows/trigger-deploy.yml 1/5 Removes deployment version capture logic but Parameter Store steps still reference non-existent outputs

Confidence score: 1/5

  • This PR introduces a breaking change that will cause deployment version tracking to fail with empty values
  • Score reflects a fundamental logical error where output references exist without corresponding output definitions
  • Pay immediate attention to the workflow file - this change will break production deployments and version tracking

Sequence Diagram

sequenceDiagram
    participant User
    participant GHA as GitHub Actions
    participant Node as Node.js Setup
    participant Bun as Bun Setup
    participant AWS as AWS Credentials
    participant Trigger as Trigger.dev
    participant SSM as AWS Parameter Store

    User->>GHA: "Push to staging/main or manual trigger"
    GHA->>GHA: "Checkout code"
    GHA->>Node: "Setup Node.js (latest)"
    Node-->>GHA: "Node.js ready"
    GHA->>Bun: "Setup Bun (latest)"
    Bun-->>GHA: "Bun ready"
    GHA->>GHA: "Install dependencies (bun install)"
    GHA->>AWS: "Configure AWS credentials"
    AWS-->>GHA: "AWS credentials configured"
    
    alt Branch is staging
        GHA->>Trigger: "Deploy to staging environment (skip promotion)"
        Trigger-->>GHA: "Return deployment version"
        GHA->>SSM: "Store staging version in Parameter Store"
        SSM-->>GHA: "Version stored"
    else Branch is main
        GHA->>Trigger: "Deploy to production environment (skip promotion)"
        Trigger-->>GHA: "Return deployment version"
        GHA->>SSM: "Store production version in Parameter Store"
        SSM-->>GHA: "Version stored"
    end
Loading

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

VERSION=$(echo "$OUTPUT" | grep -oP 'Successfully deployed version \K[0-9]+\.[0-9]+' || echo "$OUTPUT" | grep -oP 'version \K[0-9]+\.[0-9]+' | head -1)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Deployed version: $VERSION"
npx --yes trigger.dev@4.0.4 deploy -e staging --skip-promotion
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: This deploy command no longer captures output or sets any step outputs. The subsequent Parameter Store step will fail because deploymentVersion won't exist.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/trigger-deploy.yml
Line: 48:48

Comment:
logic: This deploy command no longer captures output or sets any step outputs. The subsequent Parameter Store step will fail because `deploymentVersion` won't exist.

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

@Sg312 Sg312 changed the title Capture correct deployment version output fix(ci): capture correct deployment version output Sep 30, 2025
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.

2 participants