-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(ci): capture correct deployment version output #1512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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
1 file reviewed, 1 comment
| 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 |
There was a problem hiding this comment.
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.
Summary
Modifies trigger ci to capture correct version for upsert to ssm
Fixes #(issue)
Type of Change
Testing
n/a
Checklist