Skip to content
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

Fix Github Action / Control Plane Pipeline #626

Merged
merged 19 commits into from
Mar 19, 2025
Merged

Conversation

Judahmeek
Copy link
Collaborator

@Judahmeek Judahmeek commented Mar 13, 2025

This change is Reviewable

Summary by CodeRabbit

  • New Features

    • Introduced a new environment variable PREFIX for enhanced configuration validation.
    • Updated deployment workflows to include explicit checks for required secrets and variables, improving error handling and feedback.
  • Bug Fixes

    • Replaced the previous action for validating required variables with a custom script, ensuring more reliable checks for necessary environment variables.
    • Improved error handling in the deployment process, providing clearer feedback on missing items.
  • Chores

    • Removed obsolete deployment actions, streamlining the deployment process.
    • Updated the version of the cpflow gem to 4.1.1 for improved functionality.

Copy link

coderabbitai bot commented Mar 13, 2025

Walkthrough

The pull request removes the GitHub Action "Validate Required Variables" and replaces it with custom shell scripts in workflows for validating necessary environment variables and secrets. The new implementation checks for CPLN_TOKEN, CPLN_ORG, and PREFIX, collecting any missing items into an array for error reporting. Additionally, the PREFIX environment variable is introduced to facilitate these checks. Overall, the changes streamline the validation process by utilizing direct script execution instead of a dedicated action.

Changes

File(s) Changes
.github/actions/validate-required-vars/action.yml Removed the "Validate Required Variables" action.
.github/workflows/deploy-to-control-plane-review-app.yml, Introduced a custom shell script for validating required secrets and variables, replacing the previous action. Added a new environment variable PREFIX.
.github/actions/deploy-to-control-plane/action.yml Removed the entire action for deploying applications to the Control Plane.
.github/workflows/delete-review-app.yml Replaced the previous validation action with a bash script for checking required secrets and variables, and added the PREFIX variable.
.github/actions/deploy-to-control-plane/scripts/deploy.sh Removed the deployment script that managed the deployment process and validations.
.github/actions/setup-environment/action.yml Updated the version of the cpflow gem from 4.1.0 to 4.1.1.

Possibly related PRs

  • delete-on-pr-close #617: The changes in the main PR involve the removal of a GitHub Action for validating required variables, while the retrieved PR modifies a workflow that includes a validation step for required variables, indicating a direct relationship in their functionality.
  • get PR review apps working again #623: The changes in the main PR involve the removal of a GitHub Action that validated required variables, while the retrieved PR modifies the same action by removing validation steps for required secrets, indicating a direct relationship in the context of deployment validation processes.

Poem

I'm a rabbit, swift and spry,
With secrets checked, we reach for the sky!
The PREFIX hops in, all set to play,
Validations clear, come what may.
In the code garden, we leap with delight—🐇✨
Happy coding, all day and night!

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

🚀 Quick Review App Commands

Welcome! Here are the commands you can use in this PR:

/deploy-review-app

Deploy your PR branch for testing

/delete-review-app

Remove the review app when done

/help

Show detailed instructions, environment setup, and configuration options.


Copy link

Hi 👋 Here are the commands available for this PR:

  • /deploy-review-app: Deploy your changes to a review environment
  • /delete-review-app: Clean up the review environment when you're done
  • /help: Show detailed information about all commands

Use /help to see full documentation, including configuration options.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/deploy-to-control-plane-review-app.yml (1)

73-77: New Input Parameters Passed to Validation Action
The step now passes the new inputs—prefix and org—to the composite action. This properly maps the environment variables (REVIEW_APP_PREFIX and CPLN_ORG_STAGING) for use during validation. Please verify that these vars are correctly defined in your repository configuration to avoid any runtime issues.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 586dac3 and 8f7c638.

📒 Files selected for processing (2)
  • .github/actions/validate-required-vars/action.yml (2 hunks)
  • .github/workflows/deploy-to-control-plane-review-app.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: test (22.x, 3.3.4)
  • GitHub Check: test (22.x, 3.3.4)
  • GitHub Check: test (22.x, 3.3.4)
🔇 Additional comments (3)
.github/actions/validate-required-vars/action.yml (3)

4-11: Addition of Required Inputs for Enhanced Validation
The composite action now explicitly requires two new input parameters: org (Organization name) and prefix (Review App Prefix), with clear descriptions. This addition improves the action’s flexibility and ensures that the necessary variables are explicitly provided.


17-20: Mapping Inputs to Environment Variables
The environment section now maps inputs.prefix to REVIEW_APP_PREFIX and inputs.org to CPLN_ORG_STAGING, in addition to the existing secret mapping for CPLN_TOKEN_STAGING. This is a clear and consistent improvement that aligns with the workflow changes.


29-36: Enhanced Missing Variable Checks
The check for required variables now includes a verification for REVIEW_APP_PREFIX (lines 33-36). This update ensures that missing inputs are captured early in the action's execution. The logic is consistent with the check for CPLN_ORG_STAGING, maintaining reliability in the validation process.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🔭 Outside diff range comments (1)
.github/workflows/delete-review-app.yml (1)

129-134: ⚠️ Potential issue

Duplicate body Key in Comment Object.
Within the create-delete-comment step, two body keys are defined in the object literal. This duplication can lead to unexpected behavior (with one definition overriding the other). Please remove the redundant body property and combine the intended message into a single string.

🧹 Nitpick comments (2)
.github/workflows/deploy-to-control-plane-review-app.yml (1)

77-77: Trailing Spaces Detected.
Static analysis indicates trailing spaces on several lines. Removing these will help maintain clean YAML formatting and avoid linter warnings.

Also applies to: 82-82, 91-91, 95-95

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 77-77: trailing spaces

(trailing-spaces)

.github/workflows/delete-review-app.yml (1)

50-50: Remove Trailing Spaces.
Trailing spaces are present on these lines. Cleaning up these extra spaces will improve the file’s adherence to YAML linting standards.

Also applies to: 55-55, 64-64, 68-68

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 50-50: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8f7c638 and d673802.

📒 Files selected for processing (4)
  • .github/actions/deploy-to-control-plane/action.yml (0 hunks)
  • .github/actions/validate-required-vars/action.yml (0 hunks)
  • .github/workflows/delete-review-app.yml (2 hunks)
  • .github/workflows/deploy-to-control-plane-review-app.yml (2 hunks)
💤 Files with no reviewable changes (2)
  • .github/actions/deploy-to-control-plane/action.yml
  • .github/actions/validate-required-vars/action.yml
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/delete-review-app.yml

[error] 50-50: trailing spaces

(trailing-spaces)


[error] 55-55: trailing spaces

(trailing-spaces)


[error] 64-64: trailing spaces

(trailing-spaces)


[error] 68-68: trailing spaces

(trailing-spaces)

.github/workflows/deploy-to-control-plane-review-app.yml

[error] 77-77: trailing spaces

(trailing-spaces)


[error] 82-82: trailing spaces

(trailing-spaces)


[error] 91-91: trailing spaces

(trailing-spaces)


[error] 95-95: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: test (22.x, 3.3.4)
🔇 Additional comments (2)
.github/workflows/deploy-to-control-plane-review-app.yml (1)

27-28: Environment Variable Addition: Verify PREFIX Integration.
The introduction of the PREFIX environment variable using ${{ vars.REVIEW_APP_PREFIX }} appears consistent with your intended naming. Please double-check that all subsequent steps correctly reference this variable.

.github/workflows/delete-review-app.yml (1)

21-27: Confirm PREFIX Variable Consistency.
The PREFIX environment variable defined as ${{ vars.REVIEW_APP_PREFIX }} is consistent with the deploy workflow. Ensure that any previous references to a differently named variable are updated accordingly.

Comment on lines 46 to 69
- name: Validate Required Secrets and Variables
uses: ./.github/actions/validate-required-vars
shell: bash
run: |
missing=()

# Check required secrets
if [ -z "$CPLN_TOKEN" ]; then
missing+=("Secret: CPLN_TOKEN_STAGING")
fi

# Check required variables
if [ -z "$CPLN_ORG" ]; then
missing+=("Variable: CPLN_ORG_STAGING")
fi

if [ -z "$"PREFIX" }} ]; then
missing+=("Variable: REVIEW_APP_PREFIX")
fi

if [ ${#missing[@]} -ne 0 ]; then
echo "Required secrets/variables are not set: ${missing[*]}"
exit 1
fi

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Validation Script: Critical Syntax Issue in Variable Check.
In the validation step (line 61), the condition

if [ -z "$"PREFIX" }} ]; then

is syntactically incorrect. Please change it to:

if [ -z "$PREFIX" ]; then

to correctly validate if PREFIX is set.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 50-50: trailing spaces

(trailing-spaces)


[error] 55-55: trailing spaces

(trailing-spaces)


[error] 64-64: trailing spaces

(trailing-spaces)


[error] 68-68: trailing spaces

(trailing-spaces)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (2)
.github/workflows/deploy-to-control-plane-review-app.yml (1)

88-90: ⚠️ Potential issue

Syntax Error in PREFIX Variable Check

The condition

if [ -z "$"PREFIX" ]; then

is malformed. It should be corrected to:

if [ -z "$PREFIX" ]; then

to properly check whether the PREFIX variable is set.

-          if [ -z "$"PREFIX" ]; then
+          if [ -z "$PREFIX" ]; then
.github/workflows/delete-review-app.yml (1)

61-63: ⚠️ Potential issue

Syntax Error in PREFIX Variable Check

The validation condition is written as

if [ -z "$"PREFIX" }} ]; then

which is syntactically incorrect. Please update it to:

if [ -z "$PREFIX" ]; then

to correctly validate that REVIEW_APP_PREFIX is set.

-          if [ -z "$"PREFIX" }} ]; then
+          if [ -z "$PREFIX" ]; then
🧹 Nitpick comments (2)
.github/workflows/deploy-to-control-plane-review-app.yml (1)

77-77: Trailing Whitespace Detected

Static analysis has flagged trailing spaces on these lines. Please remove them to adhere to YAML lint standards.

Also applies to: 82-82, 91-91, 95-95

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 77-77: trailing spaces

(trailing-spaces)

.github/workflows/delete-review-app.yml (1)

50-50: Trailing Whitespace Issues

Static analysis reports trailing spaces on lines 50, 55, 64, and 68. Removing these will help keep the YAML clean and compliant with formatting standards.

Also applies to: 55-55, 64-64, 68-68

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 50-50: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d673802 and 1454772.

📒 Files selected for processing (4)
  • .github/actions/deploy-to-control-plane/action.yml (0 hunks)
  • .github/actions/validate-required-vars/action.yml (0 hunks)
  • .github/workflows/delete-review-app.yml (2 hunks)
  • .github/workflows/deploy-to-control-plane-review-app.yml (2 hunks)
💤 Files with no reviewable changes (2)
  • .github/actions/deploy-to-control-plane/action.yml
  • .github/actions/validate-required-vars/action.yml
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/deploy-to-control-plane-review-app.yml

[error] 77-77: trailing spaces

(trailing-spaces)


[error] 82-82: trailing spaces

(trailing-spaces)


[error] 91-91: trailing spaces

(trailing-spaces)


[error] 95-95: trailing spaces

(trailing-spaces)

.github/workflows/delete-review-app.yml

[error] 50-50: trailing spaces

(trailing-spaces)


[error] 55-55: trailing spaces

(trailing-spaces)


[error] 64-64: trailing spaces

(trailing-spaces)


[error] 68-68: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: test (22.x, 3.3.4)
🔇 Additional comments (2)
.github/workflows/deploy-to-control-plane-review-app.yml (1)

27-27: Addition of PREFIX Environment Variable

The new environment variable PREFIX is introduced using the expression ${{ vars.REVIEW_APP_PREFIX }}. This addition looks good; please ensure that all subsequent steps that depend on this variable reference it correctly for consistency.

.github/workflows/delete-review-app.yml (1)

22-22: New PREFIX Environment Variable

The environment variable PREFIX is now set to ${{ vars.REVIEW_APP_PREFIX }}. This aligns with the changes seen in the deploy workflow and should help maintain consistency across workflows.

Copy link

github-actions bot commented Mar 14, 2025

🏗️ Building Docker image for PR #626, commit d70b546

📝 View Build Logs

@github-actions github-actions bot requested a deployment to review-app March 14, 2025 21:37 In progress
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/deploy-to-control-plane-review-app.yml (1)

71-94: Custom Secrets and Variables Validation Script:
The new bash script effectively checks for the required secrets (CPLN_TOKEN) and variables (CPLN_ORG and PREFIX), accumulating any missing items into an array before exiting with an error. This approach enhances flexibility compared to the previous action. However, static analysis indicates the presence of trailing whitespace on several lines (e.g., lines 75, 80, 89, and 93). Removing these extraneous spaces will improve the file’s readability and help avoid potential YAML parsing pitfalls.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 89-89: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1454772 and d70b546.

📒 Files selected for processing (1)
  • .github/workflows/deploy-to-control-plane-review-app.yml (3 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/deploy-to-control-plane-review-app.yml

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 89-89: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build
  • GitHub Check: test (22.x, 3.3.4)
🔇 Additional comments (2)
.github/workflows/deploy-to-control-plane-review-app.yml (2)

5-10: Event Trigger Restriction:
The workflow now restricts both push and pull_request events to the master branch. Please verify that this limitation aligns with your deployment strategy—especially if you expect to deploy review apps from feature branches or any other branch besides master.


24-26: Introducing the PREFIX Environment Variable:
The new PREFIX environment variable (set to ${{ vars.REVIEW_APP_PREFIX }}) is a clear improvement for standardizing naming in subsequent steps. Confirm that all downstream components correctly reference this variable.

Copy link

github-actions bot commented Mar 14, 2025

🏗️ Building Docker image for PR #626, commit 0562a28

📝 View Build Logs

@github-actions github-actions bot requested a deployment to review-app March 14, 2025 22:11 In progress
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/deploy-to-control-plane-review-app.yml (1)

71-94: Robust Validation Script for Required Secrets and Variables.
The custom shell script in this step now aggregates missing keys for CPLN_TOKEN, CPLN_ORG, and PREFIX before exiting with an error if any are absent. The check for "$PREFIX" has been properly fixed compared to earlier issues.

Additional Nitpick: Static analysis flagged trailing spaces on lines 75, 80, 89, and 93. Removing these extra spaces will improve readability and adhere to YAML style guidelines.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 89-89: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d70b546 and 0562a28.

📒 Files selected for processing (1)
  • .github/workflows/deploy-to-control-plane-review-app.yml (4 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/deploy-to-control-plane-review-app.yml

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 89-89: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build
  • GitHub Check: test (22.x, 3.3.4)
🔇 Additional comments (3)
.github/workflows/deploy-to-control-plane-review-app.yml (3)

5-10: Clarify Event Trigger Branch Filters.
The workflow now restricts both push and pull_request events to the "master" branch. Please verify that this branch filtering aligns with your deployment strategy—especially if PR review apps are expected to be triggered from branches other than master in any context.


24-30: New 'PREFIX' Environment Variable Defined.
The introduction of the PREFIX variable (set via ${{ vars.REVIEW_APP_PREFIX }}) in the environment block is correctly implemented. This variable will now be used for validating required secrets/variables and in constructing the app name. Ensure consistency across related workflows.


388-393: Verify Comment-ID Substitution in GitHub Script.
The update for the deployment status now uses the string '${{ steps.create-comment.outputs.comment-id }}' to reference the comment ID. Please confirm that this interpolation resolves to a valid identifier at runtime within the GitHub Script context. A quick validation in a staging run is recommended.

Copy link

github-actions bot commented Mar 17, 2025

🏗️ Building Docker image for PR #626, commit d17ca4e

📝 View Build Logs

@github-actions github-actions bot requested a deployment to review-app March 17, 2025 20:30 In progress
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
.github/workflows/deploy-to-control-plane-review-app.yml (2)

72-93: Enhanced Validation Script for Required Secrets and Variables.
The custom bash script now methodically checks for the existence of required secrets and variables (CPLN_TOKEN, CPLN_ORG, and PREFIX) by accumulating any missing ones before exiting. This enhancement improves clarity in error reporting and deployment reliability.

Nitpick: Please remove trailing whitespace on lines 75, 80, 89, and 93 to comply with YAML linting standards.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 89-89: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)


388-389: Review of Comment ID Substitution Syntax.
The update on line 388 wraps the expression ${{ needs.process-deployment.outputs.comment_id }} in single quotes. Confirm that this quoting yields the intended type and value when the GitHub Actions pre-processor substitutes the expression. If a numeric value is expected by the API, you might consider removing the quotes.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0562a28 and d17ca4e.

📒 Files selected for processing (1)
  • .github/workflows/deploy-to-control-plane-review-app.yml (5 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/deploy-to-control-plane-review-app.yml

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 89-89: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (4)
.github/workflows/deploy-to-control-plane-review-app.yml (4)

5-5: Note: New Blank Line Inserted for Readability.
A new blank line appears at line 5 to improve visual separation. This is fine and does not affect functionality.


6-10: Branch Trigger Restriction Updated.
The workflow now explicitly restricts both the push and pull_request events to the master branch. This ensures that deployments are only triggered from the main branch, which appears intentional for tighter control over deployments.


24-26: Addition of PREFIX Environment Variable.
Introducing the PREFIX environment variable as ${{ vars.REVIEW_APP_PREFIX }} centralizes configuration and makes its usage explicit in subsequent steps. Ensure that all references to the prefix in the workflow (and any related scripts) are updated consistently.


419-419: Deployment ID Output Reference.
The change to reference ${{ needs.process-deployment.outputs.deployment_id }} is clear and aligns with the updated outputs structure. Please verify that the output is properly defined in the preceding steps so that downstream steps receive the correct deployment identifier.

Copy link

github-actions bot commented Mar 17, 2025

🏗️ Building Docker image for PR #626, commit 1039020

📝 View Build Logs

@github-actions github-actions bot requested a deployment to review-app March 17, 2025 20:47 In progress
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🔭 Outside diff range comments (1)
.github/workflows/deploy-to-control-plane-review-app.yml (1)

357-359: 🛠️ Refactor suggestion

Deploy Job Dependency and Conditional Check Update Needed

The deploy job currently specifies needs: build but then references outputs from process-deployment (e.g., needs.process-deployment.outputs.comment_id and needs.process-deployment.outputs.do_deploy). To ensure these outputs are available, please update the deploy job’s dependency list to include process-deployment (for example, change it to needs: [process-deployment, build]) and modify the conditional check to reference needs.process-deployment.outputs.do_deploy instead of needs.build.outputs.do_deploy.

🧰 Tools
🪛 actionlint (1.7.4)

359-359: property "do_deploy" is not defined in object type {image_tag: string}

(expression)

🧹 Nitpick comments (1)
.github/workflows/deploy-to-control-plane-review-app.yml (1)

72-93: Validation Script Improvements & Trailing Whitespace Cleanup

The custom shell script properly checks for the required secrets and variables and aggregates missing items for error reporting. However, there are minor trailing whitespace issues (e.g., on lines 75, 80, 89, and 93). Removing these will enhance code cleanliness and reduce YAML lint warnings.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 89-89: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d17ca4e and 1039020.

📒 Files selected for processing (1)
  • .github/workflows/deploy-to-control-plane-review-app.yml (7 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/deploy-to-control-plane-review-app.yml

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 89-89: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)

🪛 actionlint (1.7.4)
.github/workflows/deploy-to-control-plane-review-app.yml

362-362: property "process-deployment" is not defined in object type {build: {outputs: {image_tag: string}; result: string}}

(expression)


374-374: property "process-deployment" is not defined in object type {build: {outputs: {image_tag: string}; result: string}}

(expression)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (2)
.github/workflows/deploy-to-control-plane-review-app.yml (2)

8-10: Refined Event Triggers Look Good

The workflow now restricts both push and pull_request events to the master branch. This aligns with the intended deployment scope.


25-25: New Environment Variable ‘PREFIX’ Added

The addition of the PREFIX environment variable (set to ${{ vars.REVIEW_APP_PREFIX }}) improves clarity and centralizes configuration.

Copy link

github-actions bot commented Mar 17, 2025

🏗️ Building Docker image for PR #626, commit ceb29f0

📝 View Build Logs

@github-actions github-actions bot requested a deployment to review-app March 17, 2025 20:58 In progress
Copy link

@coderabbitai coderabbitai bot left a comment

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 (4)
.github/workflows/deploy-to-control-plane-review-app.yml (4)

72-94: Custom Shell Script Validation & Formatting
The new “Validate Required Secrets and Variables” step correctly aggregates missing required items and exits if any are absent. However, several lines in this block (notably around lines 75, 80, 89, and 93) contain trailing spaces, which can lead to linting warnings. Please remove these extra spaces to maintain clean YAML/shell formatting.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 89-89: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)


247-247: Debug Logging in Comment Creation
The console.log(result); statement appears to be included for debugging purposes. If it isn’t required in production, consider removing it to reduce noise in the logs.


374-376: Ensure Correct Expression Interpolation
The step “Print Comment id as job output” uses single quotes:

echo '${{ needs.process-deployment.outputs.comment_id }}'

Using single quotes can sometimes inhibit proper interpolation. Consider switching to double quotes for consistency and to avoid any potential issues:

-        run: echo '${{ needs.process-deployment.outputs.comment_id }}'
+        run: echo "${{ needs.process-deployment.outputs.comment_id }}"
🧰 Tools
🪛 actionlint (1.7.4)

375-375: property "process-deployment" is not defined in object type {build: {outputs: {image_tag: string}; result: string}}

(expression)


75-75: YAML Formatting: Trailing Spaces
Static analysis tools have flagged trailing spaces in several lines (e.g. around lines 75, 80, 89, and 93) within the shell script block. Please remove these extra spaces to keep the file clean and avoid future linting errors.

Also applies to: 80-80, 89-89, 93-93

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 75-75: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1039020 and ceb29f0.

📒 Files selected for processing (1)
  • .github/workflows/deploy-to-control-plane-review-app.yml (8 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/deploy-to-control-plane-review-app.yml

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 89-89: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)

🪛 actionlint (1.7.4)
.github/workflows/deploy-to-control-plane-review-app.yml

363-363: property "process-deployment" is not defined in object type {build: {outputs: {image_tag: string}; result: string}}

(expression)


375-375: property "process-deployment" is not defined in object type {build: {outputs: {image_tag: string}; result: string}}

(expression)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build
  • GitHub Check: test (22.x, 3.3.4)
🔇 Additional comments (1)
.github/workflows/deploy-to-control-plane-review-app.yml (1)

25-26: New Environment Variable Added
The new env var PREFIX (sourced from vars.REVIEW_APP_PREFIX) improves the configurability of review app naming.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/actions/deploy-to-control-plane/scripts/deploy.sh (1)

16-17: Enhance Pipeline Error Handling with Pipefail

The script currently uses set -e, but without enabling pipefail, errors from the left-hand side of your pipeline (e.g. the cpflow command) may be masked by the succeeding tee command. To ensure that any non-zero exit in the pipeline is correctly detected, please consider adding set -o pipefail right after set -e.

 set -e
+set -o pipefail
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 328f25f and dfc82c4.

📒 Files selected for processing (1)
  • .github/actions/deploy-to-control-plane/scripts/deploy.sh (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (2)
.github/actions/deploy-to-control-plane/scripts/deploy.sh (2)

1-15: Documentation and Comment Updates

The updated comments clearly document the script’s purpose and the expected inputs/outputs. Ensure that the details (e.g. required variables) remain consistent with later validations, especially if you intend to validate additional variables (such as CPLN_TOKEN or PREFIX) as mentioned in the PR objectives.


19-21: Environment Variable Validation Consistency

At present, the script validates APP_NAME and CPLN_ORG. However, based on the PR objectives and AI summary notes, there is an expectation to check for additional variables (e.g. CPLN_TOKEN, PREFIX or REVIEW_APP_PREFIX). Please verify that all required environment variables for the new deployment process are properly validated either here or in an associated workflow.

Comment on lines 34 to 44
if timeout "$WAIT_TIMEOUT" cpflow deploy-image -a "$APP_NAME" --run-release-phase --org "$CPLN_ORG" --verbose | tee "$TEMP_OUTPUT"; then
# Extract Rails URL from deployment output
RAILS_URL=$(grep -oP 'https://rails-[^[:space:]]*\.cpln\.app(?=\s|$)' "$TEMP_OUTPUT" | head -n1)
if [ -n "$RAILS_URL" ]; then
echo "rails_url=$RAILS_URL" >> "$GITHUB_OUTPUT"
echo "✅ Deployment successful"
echo "🚀 Rails URL: $RAILS_URL"
else
echo "❌ Failed to extract Rails URL from deployment output"
exit 1
fi
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Ensure Reliable Deployment Command Execution

The deployment command is executed within a pipeline:

if timeout "$WAIT_TIMEOUT" cpflow deploy-image -a "$APP_NAME" --run-release-phase --org "$CPLN_ORG" --verbose | tee "$TEMP_OUTPUT"; then

Without pipefail enabled, the exit status of cpflow can be masked by the tee command—potentially causing the script to treat a failed or timed-out deployment as successful. With the addition of set -o pipefail (as suggested above), you will be better positioned to capture non-zero exit codes accurately.

Copy link

github-actions bot commented Mar 19, 2025

🚀 Deploying to Control Plane...

⏳ Waiting for deployment to be ready...

📝 View Deploy Logs

@github-actions github-actions bot requested a deployment to review-app March 19, 2025 00:45 In progress
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (2)
.github/actions/deploy-to-control-plane/scripts/deploy.sh (2)

48-54: 🛠️ Refactor suggestion

Improve Timeout and Failure Handling by Capturing the Exit Code Early
Relying on $? after a pipeline may not accurately capture the exit status from the cpflow command due to the influence of tee. Consider capturing the exit code right after the deployment command execution (e.g., using ${PIPESTATUS[0]}) and then testing it for a timeout (124) or other errors.

Example diff snippet:

- elif [ $? -eq 124 ]; then
-    echo "❌ Deployment timed out after $WAIT_TIMEOUT seconds"
-    exit 1
- else
-    echo "❌ Deployment to Control Plane failed"
-    exit 1
- fi
+ else
+   EXIT_CODE=${PIPESTATUS[0]}
+   if [ $EXIT_CODE -eq 124 ]; then
+     echo "❌ Deployment timed out after $WAIT_TIMEOUT seconds"
+   else
+     echo "❌ Deployment to Control Plane failed (exit code: $EXIT_CODE)"
+   fi
+   exit 1
+ fi

37-47: 💡 Verification agent

🧩 Analysis chain

Ensure Robust Error Handling for the Deployment Command
When piping the output of the cpflow deploy-image command into tee, there’s a risk that failures in cpflow might be masked by tee. It is recommended to enable the pipefail option (e.g., add set -o pipefail right after set -e) so that the exit code reflects any failure in the pipeline. Also, the extraction of the Rails URL with the specified regex looks good, ensuring that only valid URLs are captured.

Proposed diff snippet:

- set -e
+ set -e
+ set -o pipefail

Place the additional line immediately after set -e (around line 16).


Action Required: Enhance Pipeline Error Handling
To ensure that any failure within the pipeline (specifically the cpflow deploy-image command piped into tee) is properly detected, please add the line set -o pipefail immediately after the set -e statement (around line 16 in .github/actions/deploy-to-control-plane/scripts/deploy.sh). This change will prevent errors from being masked by the tee command. The regex extraction for the Rails URL is fine as-is.

Proposed diff snippet:

- set -e
+ set -e
+ set -o pipefail

🏁 Script executed:

#!/bin/bash
echo "Checking for 'set -o pipefail' in deploy.sh..."
grep -n "set -o pipefail" .github/actions/deploy-to-control-plane/scripts/deploy.sh || echo "No pipefail option found. It is recommended to add it."

Length of output: 313


Enhance Pipeline Error Handling in deploy.sh

The deployment script currently lacks the set -o pipefail option, which means that errors occurring in the cpflow deploy-image command might be masked by tee. Please add set -o pipefail immediately after set -e (around line 16) to ensure that the exit code correctly reflects any failure in the pipeline. The regex extraction for the Rails URL is functioning as expected.

Proposed diff snippet:

- set -e
+ set -e
+ set -o pipefail
🧹 Nitpick comments (3)
.github/actions/deploy-to-control-plane/scripts/deploy.sh (1)

32-34: Clarify Debug Logging for Workload Output
The block capturing and echoing the output of cpln workload get is useful for debugging. Consider wrapping this logging behind a verbose or debug flag so that production deployments aren’t cluttered with extra output.

.github/workflows/deploy-to-control-plane-review-app.yml (2)

372-372: Remove Trailing Spaces from the Deploy Job Section
There is a trailing-space issue at line 372. Cleaning up these extraneous spaces will help maintain consistency and avoid YAML linting errors.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 372-372: trailing spaces

(trailing-spaces)


408-457: Comprehensive Deployment Status Update with GitHub API
The steps for updating the deployment status and creating detailed success/failure messages are well structured. Consider adding error handling around the GitHub API calls (e.g., updateComment and createDeploymentStatus) to gracefully handle API failures.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 417-417: trailing spaces

(trailing-spaces)


[error] 419-419: trailing spaces

(trailing-spaces)


[error] 430-430: trailing spaces

(trailing-spaces)


[error] 432-432: trailing spaces

(trailing-spaces)


[error] 442-442: trailing spaces

(trailing-spaces)


[error] 450-450: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dfc82c4 and d63cfb9.

📒 Files selected for processing (2)
  • .github/actions/deploy-to-control-plane/scripts/deploy.sh (3 hunks)
  • .github/workflows/deploy-to-control-plane-review-app.yml (9 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/deploy-to-control-plane-review-app.yml

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 89-89: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)


[error] 372-372: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (3)
.github/workflows/deploy-to-control-plane-review-app.yml (3)

25-29: Validate and Centralize Environment Variable Setup
The introduction of the PREFIX variable (set from ${{ vars.REVIEW_APP_PREFIX }}) and its usage in constructing the APP_NAME is clear and consistent. Ensure that the upstream configuration reflects the expected value so that downstream steps (and the new variable validation) work seamlessly.


72-94: Robust Validation of Required Secrets and Variables
The custom validation script that checks for CPLN_TOKEN, CPLN_ORG, and PREFIX is straightforward and enhances clarity by accumulating missing items into an array. This approach improves feedback during deployment errors.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 89-89: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)


360-360: Correct Job Dependencies in the Deploy Job
Updating the deploy job’s needs field to include both build and process-deployment ensures that all necessary outputs are available. This change aligns with the updated workflow structure and addresses previous dependency warnings.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
.github/workflows/deploy-to-control-plane-review-app.yml (3)

72-94: Custom Secret and Variable Validation Script
The revamped "Validate Required Secrets and Variables" step now explicitly checks for the presence of CPLN_TOKEN, CPLN_ORG, and PREFIX. This makes the failure mode much clearer should any required secret or variable be missing.
Note: YAMLlint reports trailing whitespace on lines 75, 80, 89, and 93. Please remove these extraneous spaces to adhere to style guidelines.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 89-89: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)


372-372: Trailing Whitespace Detected
There is trailing whitespace at line 372. Removing it will help maintain clean YAML formatting.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 372-372: trailing spaces

(trailing-spaces)


75-75: Trailing Whitespace Cleanup Recommended
Multiple lines (75, 80, 89, 93, and 372) contain trailing spaces as flagged by YAMLlint. Removing these will improve consistency and prevent potential YAML parsing issues.

Also applies to: 80-80, 89-89, 93-93, 372-372

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 75-75: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d63cfb9 and 95415c1.

📒 Files selected for processing (1)
  • .github/workflows/deploy-to-control-plane-review-app.yml (9 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/deploy-to-control-plane-review-app.yml

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 89-89: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)


[error] 372-372: trailing spaces

(trailing-spaces)

🔇 Additional comments (8)
.github/workflows/deploy-to-control-plane-review-app.yml (8)

5-5: Trivial Formatting Change
An empty line was added at line 5 for readability. No action is required.


8-10: Restricting Workflow Triggers to Master Branch
The updated configuration now restricts both push and pull_request events to the master branch, which aligns with the intended deployment strategy.


25-25: Introducing the PREFIX Environment Variable
The new PREFIX variable is properly set to ${{ vars.REVIEW_APP_PREFIX }}. This addition standardizes naming conventions across the workflow.


181-182: Capturing App Status Output for Diagnostics
The change captures the output of the cpln workload get command into last_output and echoes it. This enhancement will aid in debugging by providing visibility into the status of the existing app.


360-360: Updated Deploy Job Dependencies
The deploy job’s needs field now correctly lists both build and process-deployment, ensuring that outputs from all prerequisite jobs are available.


373-374: Authentication Confirmation Step Added
The new "Confirm Auth" step running cpln profile get verifies that the CLI is properly authenticated before proceeding. Please ensure that any authentication failures are handled gracefully in the overall workflow.


399-399: Deploy Command Execution Verification
The deployment command using cpflow deploy-image is now correctly invoked with all necessary options (including --run-release-phase and --verbose). Confirm that its exit code reliably reflects the deployment’s success or failure for downstream steps.


448-448: Consistent Comment ID Usage
The update of the deployment status now correctly references comment_id from the process-deployment outputs. This ensures that status updates are applied to the correct GitHub issue comment.

Copy link

github-actions bot commented Mar 19, 2025

🚀 Deploying to Control Plane...

⏳ Waiting for deployment to be ready...

📝 View Deploy Logs

@github-actions github-actions bot requested a deployment to review-app March 19, 2025 01:35 In progress
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
.github/actions/deploy-to-control-plane/scripts/deploy.sh (1)

47-53: 🛠️ Refactor suggestion

Improve Timeout and Failure Handling
Currently, the script directly checks $? in the elif branch to determine a timeout (exit code 124), which may be unreliable when using a pipe with tee. It is recommended to capture the exit code immediately after the deployment command to differentiate a timeout from other errors. For example:

-if timeout "$WAIT_TIMEOUT" cpflow deploy-image -a "$APP_NAME" --run-release-phase --org "$CPLN_ORG" --verbose | tee "$TEMP_OUTPUT"; then
-    # Extract Rails URL from deployment output
-    RAILS_URL=$(grep -oP 'https://rails-[^[:space:]]*\.cpln\.app(?=\s|$)' "$TEMP_OUTPUT" | head -n1)
-    if [ -n "$RAILS_URL" ]; then
-        echo "rails_url=$RAILS_URL" >> "$GITHUB_OUTPUT"
-        echo "✅ Deployment successful"
-        echo "🚀 Rails URL: $RAILS_URL"
-    else
-        echo "❌ Failed to extract Rails URL from deployment output"
-        exit 1
-    fi
-elif [ $? -eq 124 ]; then
-    echo "❌ Deployment timed out after $WAIT_TIMEOUT seconds"
-    exit 1
-else
-    echo "❌ Deployment to Control Plane failed"
-    exit 1
-fi
+if timeout "$WAIT_TIMEOUT" cpflow deploy-image -a "$APP_NAME" --run-release-phase --org "$CPLN_ORG" --verbose | tee "$TEMP_OUTPUT"; then
+    # Extract Rails URL from deployment output
+    RAILS_URL=$(grep -oP 'https://rails-[^[:space:]]*\.cpln\.app(?=\s|$)' "$TEMP_OUTPUT" | head -n1)
+    if [ -n "$RAILS_URL" ]; then
+        echo "rails_url=$RAILS_URL" >> "$GITHUB_OUTPUT"
+        echo "✅ Deployment successful"
+        echo "🚀 Rails URL: $RAILS_URL"
+    else
+        echo "❌ Failed to extract Rails URL from deployment output"
+        exit 1
+    fi
+else
+  EXIT_CODE=$?
+  if [ "$EXIT_CODE" -eq 124 ]; then
+    echo "❌ Deployment timed out after $WAIT_TIMEOUT seconds"
+  else
+    echo "❌ Deployment to Control Plane failed (exit code: $EXIT_CODE)"
+  fi
+  exit 1
+fi

This change captures the exit code into a variable (EXIT_CODE) immediately after the command, thereby allowing you to make an informed decision about the failure.

🧹 Nitpick comments (3)
.github/workflows/deploy-to-control-plane-review-app.yml (2)

71-94: Validation Script: Variable Checks & Trailing Whitespace Cleanup
The custom shell script for validating required secrets/variables (CPLN_TOKEN, CPLN_ORG, and PREFIX) correctly gathers missing items and exits with an error when necessary.
However, YAMLlint flagged several trailing whitespace issues (notably on lines 75, 80, 89, and 93). These extra spaces can be removed to improve file cleanliness.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 89-89: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)


370-371: Minor Formatting: Remove Trailing Spaces
Static analysis identified trailing spaces around line 371. Removing these will help clean up the YAML formatting.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 371-371: trailing spaces

(trailing-spaces)

.github/actions/deploy-to-control-plane/scripts/deploy.sh (1)

32-33: Clarify Workload Status Command
The standalone invocation of cpln workload get | tee (line 32) appears to be included for logging or debugging purposes. If its output is not used in later logic, consider adding a comment to clarify its purpose or remove it to reduce noise in the deployment logs.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 95415c1 and 1442b41.

📒 Files selected for processing (2)
  • .github/actions/deploy-to-control-plane/scripts/deploy.sh (3 hunks)
  • .github/workflows/deploy-to-control-plane-review-app.yml (9 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/deploy-to-control-plane-review-app.yml

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 89-89: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)


[error] 371-371: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (4)
.github/workflows/deploy-to-control-plane-review-app.yml (3)

25-26: Environment Variable Addition: PREFIX and Derived APP_NAME
The introduction of the PREFIX environment variable (set from vars.REVIEW_APP_PREFIX) and its usage to compose the APP_NAME looks logical and improves clarity in naming your review app instances.


359-359: Job Dependency Update in Deploy Job
Updating the deploy job’s needs field to include both build and process-deployment correctly addresses the dependency issue from earlier reviews.


1-450: Overall Workflow Configuration
The workflow modifications—including refined trigger conditions on push and pull_request events, the updated validation of required variables, and the restructured deployment steps—align well with the PR objectives. No further functional issues are observed.

🧰 Tools
🪛 actionlint (1.7.4)

99-99: shellcheck reported issue in this script: SC2086:info:8:31: Double quote to prevent globbing and word splitting

(shellcheck)


99-99: shellcheck reported issue in this script: SC2086:info:56:32: Double quote to prevent globbing and word splitting

(shellcheck)


99-99: shellcheck reported issue in this script: SC2086:info:57:61: Double quote to prevent globbing and word splitting

(shellcheck)


99-99: shellcheck reported issue in this script: SC2086:info:58:21: Double quote to prevent globbing and word splitting

(shellcheck)


99-99: shellcheck reported issue in this script: SC2086:info:58:56: Double quote to prevent globbing and word splitting

(shellcheck)


99-99: shellcheck reported issue in this script: SC2086:info:59:21: Double quote to prevent globbing and word splitting

(shellcheck)


99-99: shellcheck reported issue in this script: SC2086:info:59:55: Double quote to prevent globbing and word splitting

(shellcheck)


170-170: shellcheck reported issue in this script: SC2086:info:9:30: Double quote to prevent globbing and word splitting

(shellcheck)


170-170: shellcheck reported issue in this script: SC2086:info:12:29: Double quote to prevent globbing and word splitting

(shellcheck)


187-187: shellcheck reported issue in this script: SC2086:info:20:28: Double quote to prevent globbing and word splitting

(shellcheck)


187-187: shellcheck reported issue in this script: SC2086:info:22:28: Double quote to prevent globbing and word splitting

(shellcheck)


187-187: shellcheck reported issue in this script: SC2086:info:24:28: Double quote to prevent globbing and word splitting

(shellcheck)


187-187: shellcheck reported issue in this script: SC2078:error:26:9: This expression is constant. Did you forget a $ somewhere?

(shellcheck)


187-187: shellcheck reported issue in this script: SC2086:info:30:32: Double quote to prevent globbing and word splitting

(shellcheck)


187-187: shellcheck reported issue in this script: SC2086:info:32:33: Double quote to prevent globbing and word splitting

(shellcheck)


187-187: shellcheck reported issue in this script: SC2086:info:36:31: Double quote to prevent globbing and word splitting

(shellcheck)


187-187: "github.event.comment.body" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details

(expression)


317-317: property "image_tag" is not defined in object type {}

(expression)


360-360: property "do_deploy" is not defined in object type {image_tag: string}

(expression)

🪛 YAMLlint (1.35.1)

[error] 43-43: trailing spaces

(trailing-spaces)


[error] 44-44: trailing spaces

(trailing-spaces)


[error] 75-75: trailing spaces

(trailing-spaces)


[error] 80-80: trailing spaces

(trailing-spaces)


[error] 89-89: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)


[error] 140-140: trailing spaces

(trailing-spaces)


[error] 153-153: trailing spaces

(trailing-spaces)


[error] 263-263: trailing spaces

(trailing-spaces)


[error] 270-270: trailing spaces

(trailing-spaces)


[error] 274-274: trailing spaces

(trailing-spaces)


[error] 277-277: trailing spaces

(trailing-spaces)


[error] 278-278: trailing spaces

(trailing-spaces)


[error] 290-290: trailing spaces

(trailing-spaces)


[error] 300-300: trailing spaces

(trailing-spaces)


[error] 309-309: trailing spaces

(trailing-spaces)


[error] 341-341: trailing spaces

(trailing-spaces)


[error] 371-371: trailing spaces

(trailing-spaces)


[error] 388-388: trailing spaces

(trailing-spaces)


[error] 409-409: trailing spaces

(trailing-spaces)


[error] 411-411: trailing spaces

(trailing-spaces)


[error] 422-422: trailing spaces

(trailing-spaces)


[error] 424-424: trailing spaces

(trailing-spaces)


[error] 434-434: trailing spaces

(trailing-spaces)


[error] 442-442: trailing spaces

(trailing-spaces)

.github/actions/deploy-to-control-plane/scripts/deploy.sh (1)

36-38: Deployment Command and Output Extraction
The deployment command now uses a timeout and pipes its output to tee for later processing. The extraction of the Rails URL using grep -oP is appropriate. Ensure that the downstream steps (which depend on the existence of a non-empty RAILS_URL) are thoroughly tested under varying deployment outputs.

Copy link

github-actions bot commented Mar 19, 2025

✅ Deployment complete for PR #626, commit 62c6465

🚀 Review App for PR #626
🎮 Control Plane Console

📋 View Completed Action Build and Deploy Logs

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
.github/workflows/deploy-to-control-plane-review-app.yml (2)

63-85: Validation Script for Required Secrets/Variables

The custom shell script correctly checks for the presence of essential secrets and variables (CPLN_TOKEN, CPLN_ORG, and PREFIX).
Note: YAMLlint has flagged trailing spaces (e.g., on lines 67, 72, 81, and 85). Please remove these extra spaces to ensure clean YAML formatting.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 67-67: trailing spaces

(trailing-spaces)


[error] 72-72: trailing spaces

(trailing-spaces)


[error] 81-81: trailing spaces

(trailing-spaces)


[error] 85-85: trailing spaces

(trailing-spaces)


328-330: Docker Build Step Inputs and Formatting

The build step now explicitly passes the commit SHA and PR number via environment variables. This enhances consistency and traceability. Also, please address the trailing spaces noted on line 330 to comply with YAML style guidelines.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 330-330: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1442b41 and 62c6465.

📒 Files selected for processing (3)
  • .github/actions/deploy-to-control-plane/action.yml (0 hunks)
  • .github/actions/deploy-to-control-plane/scripts/deploy.sh (0 hunks)
  • .github/workflows/deploy-to-control-plane-review-app.yml (8 hunks)
💤 Files with no reviewable changes (2)
  • .github/actions/deploy-to-control-plane/scripts/deploy.sh
  • .github/actions/deploy-to-control-plane/action.yml
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/deploy-to-control-plane-review-app.yml

[error] 67-67: trailing spaces

(trailing-spaces)


[error] 72-72: trailing spaces

(trailing-spaces)


[error] 81-81: trailing spaces

(trailing-spaces)


[error] 85-85: trailing spaces

(trailing-spaces)


[error] 330-330: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: deploy
🔇 Additional comments (7)
.github/workflows/deploy-to-control-plane-review-app.yml (7)

7-10: Branch Restriction Limited to "master"

The push and pull_request events now trigger only when commits are made to the "master" branch. Please verify that this limitation aligns with your deployment strategy since commits on other branches will not initiate a deployment.


25-26: New Environment Variable: PREFIX

The addition of the PREFIX environment variable (set from ${{ vars.REVIEW_APP_PREFIX }}) is a good move for dynamic naming and consistency. Ensure that REVIEW_APP_PREFIX is correctly configured in your repository variables.


37-44: Deploy Job Condition Validation

The deploy job’s if-condition now robustly checks for multiple event types (pull_request, push, workflow_dispatch, and issue_comment with a specific deploy command). Confirm that these conditions fully cover your intended deployment triggers.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 42-42: trailing spaces

(trailing-spaces)


[error] 43-43: trailing spaces

(trailing-spaces)


307-313: Building Status Message Formatting

The building status message is constructed using templated variables such as ${{ env.PR_NUMBER }} and ${{ env.PR_SHA }}. Please verify that these variables are properly interpolated at runtime so that the final output displays the intended values.


331-336: Authentication and Workload Checks

The steps for confirming authentication (cpln profile get) and checking workloads (cpln workload get --gvc ${{ env.APP_NAME }}) are valuable for early failure detection. Ensure that the cpflow command is available and behaves as expected in the runtime environment.


358-361: Deploy Command Validation

The deployment step that invokes cpflow deploy-image (with the --verbose flag) appears correctly set up. Double-check that all parameters (such as the app name and organization) are accurate for a successful deployment.


374-384: Deployment Status Update Accuracy

The block updating the deployment status correctly references the output from the init-deployment step. Please verify that in both success and failure cases, the status is accurately reported and that any errors from the GitHub API are handled gracefully.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 384-384: trailing spaces

(trailing-spaces)

Copy link

github-actions bot commented Mar 19, 2025

🚀 Deploying to Control Plane...

⏳ Waiting for deployment to be ready...

📝 View Deploy Logs

🎮 Control Plane Console

@github-actions github-actions bot requested a deployment to review-app March 19, 2025 04:34 In progress
Copy link

@coderabbitai coderabbitai bot left a comment

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/deploy-to-control-plane-review-app.yml (2)

63-86: Validation of Required Secrets/Variables: Solid Approach with Minor Formatting Nits
The "Validate Required Secrets and Variables" step effectively checks for the presence of CPLN_TOKEN, CPLN_ORG, and PREFIX by accumulating any missing items into an array and exiting if issues are found.

Note: Static analysis detected trailing spaces on lines 67, 72, 81, and 85. Removing these trailing spaces would help comply with YAML linting guidelines.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 67-67: trailing spaces

(trailing-spaces)


[error] 72-72: trailing spaces

(trailing-spaces)


[error] 81-81: trailing spaces

(trailing-spaces)


[error] 85-85: trailing spaces

(trailing-spaces)


307-313: Status Update Message: Consider Template Literal Consistency
In the "Update Status - Building" step, the building message is composed as an array of strings containing expressions like ${{ env.PR_NUMBER }} and ${{ env.PR_SHA }}. While GitHub Actions will perform YAML-time interpolation, in a JavaScript context it might be clearer to use backticks (template literals) for dynamic string construction. Please verify that the current approach meets your needs.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 62c6465 and fd00379.

📒 Files selected for processing (1)
  • .github/workflows/deploy-to-control-plane-review-app.yml (8 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/deploy-to-control-plane-review-app.yml

[error] 67-67: trailing spaces

(trailing-spaces)


[error] 72-72: trailing spaces

(trailing-spaces)


[error] 81-81: trailing spaces

(trailing-spaces)


[error] 85-85: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: deploy
🔇 Additional comments (4)
.github/workflows/deploy-to-control-plane-review-app.yml (4)

6-10: Branch Trigger Restriction: Confirm the Deployment Branch Strategy
The workflow now limits triggers for both push and pull_request events to only the "master" branch. Please confirm that this restriction is intentional and aligns with your deployment strategy.


24-29: Environment Variable Introduction: "PREFIX" and "APP_NAME" Setup
A new environment variable, PREFIX, is defined using ${{ vars.REVIEW_APP_PREFIX }} and is then used in constructing APP_NAME. This approach is clear and helps standardize naming. Please ensure that REVIEW_APP_PREFIX is properly defined in your repository settings.


352-355: Deploy Command Execution: Clear and Concise
The deployment command using cpflow deploy-image is concise and correctly injects the environment variables (APP_NAME and CPLN_ORG_STAGING). If possible, consider enhancing error reporting (or logging) around this command to facilitate debugging on deployment failures.


361-369: Deployment Complete Status Update: Verify WORKLOAD_URL Extraction
In the "Update Status - Deployment Complete" step, the script correctly retrieves the app URL by referencing ${{ steps.workload.outputs.WORKLOAD_URL }}. However, please verify that the output from the previous "Retrieve App URL" step (after applying the command substitution fix) is correctly captured.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 369-369: trailing spaces

(trailing-spaces)

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link

github-actions bot commented Mar 19, 2025

🚀 Deploying to Control Plane...

⏳ Waiting for deployment to be ready...

📝 View Deploy Logs

🎮 Control Plane Console

@github-actions github-actions bot requested a deployment to review-app March 19, 2025 20:08 In progress
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/deploy-to-control-plane-review-app.yml (1)

63-86: Validation of Required Secrets and Variables
The custom bash script for validating required secrets/variables is well structured: it collects missing parameters into an array and exits if any are absent. A couple of minor suggestions:

  • The error messages refer to names like CPLN_TOKEN_STAGING and CPLN_ORG_STAGING even though the script checks CPLN_TOKEN and CPLN_ORG. Consider aligning these names for clarity.
  • Static analysis tools flagged minor trailing spaces on lines 67, 72, 81, and 85. Removing these will help keep the YAML clean.
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 67-67: trailing spaces

(trailing-spaces)


[error] 72-72: trailing spaces

(trailing-spaces)


[error] 81-81: trailing spaces

(trailing-spaces)


[error] 85-85: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fd00379 and 6f4ef1e.

📒 Files selected for processing (1)
  • .github/workflows/deploy-to-control-plane-review-app.yml (8 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/deploy-to-control-plane-review-app.yml

[error] 67-67: trailing spaces

(trailing-spaces)


[error] 72-72: trailing spaces

(trailing-spaces)


[error] 81-81: trailing spaces

(trailing-spaces)


[error] 85-85: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: deploy
  • GitHub Check: test (22.x, 3.3.4)
🔇 Additional comments (7)
.github/workflows/deploy-to-control-plane-review-app.yml (7)

6-11: Event Triggers: Restricting to Master Branch
The workflow’s trigger conditions now limit both push and pull_request events to the "master" branch while still allowing issue_comment and workflow_dispatch events. This aligns with your intent to deploy only from master; please confirm that this change meets your deployment policy.


24-29: Environment Variables: Introducing PREFIX
The addition of the PREFIX environment variable (sourced from vars.REVIEW_APP_PREFIX) is clear and necessary for the subsequent steps. Just ensure that the repository variables are properly set so that APP_NAME is constructed correctly.


37-44: Deploy Job Conditions: Comprehensive Event Handling
The deploy job’s conditional (if: block) now correctly covers pull_request, push, workflow_dispatch, and issue_comment events (with a check for the /deploy-review-app command). This ensures deployments trigger only under the desired circumstances. Verify that this logic accurately captures all intended cases.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 42-42: trailing spaces

(trailing-spaces)


[error] 43-43: trailing spaces

(trailing-spaces)


307-313: Update Status – Building Message Formatting
The building status message is constructed using an array joined by newline characters. The use of GitHub context expressions (e.g., ${{ env.PR_NUMBER }} and ${{ env.PR_SHA }}) appears correct. Just ensure that these substitutions are evaluated as expected when the workflow runs.


352-355: Deploy Command: Direct Invocation of cpflow
The deployment step now directly runs the command:

cpflow deploy-image -a ${{ env.APP_NAME }} --run-release-phase --org ${{ vars.CPLN_ORG_STAGING }} --verbose

This explicit invocation—with options like --run-release-phase and --verbose—improves clarity and control over the deployment process. Please verify that the provided flags and environment variable references meet the deployment requirements in your control plane.


356-359: Retrieve App URL: Correct Command Substitution
The step that retrieves the app URL now uses the $(...) syntax correctly:

echo "WORKLOAD_URL=$(cpln workload get rails --gvc ${{ env.APP_NAME }} | tee | grep -oP 'https://[^[:space:]]*\.cpln\.app(?=\s|$)' | head -n1)"  >> "$GITHUB_OUTPUT"

This ensures the output of the cpln workload get rails command is captured properly. Verify that the regex reliably extracts the URL across different outputs.


364-368: Referencing Step Output for Deployment Complete Status
Within the "Update Status - Deployment Complete" step, the output from the workload step is referenced as:

const appUrl = ${{ steps.workload.outputs.WORKLOAD_URL }};

This usage is correct given that the previous step sets the WORKLOAD_URL output. Please double-check that the output key is spelled consistently and is properly populated.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 368-368: trailing spaces

(trailing-spaces)

Copy link

github-actions bot commented Mar 19, 2025

✅ Deployment complete for PR #626, commit 99a6c33

🚀 Review App for PR #626
🎮 Control Plane Console

📋 View Completed Action Build and Deploy Logs

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
.github/workflows/deploy-to-control-plane-review-app.yml (4)

37-44: Deploy Job Conditional Logic:
The conditional expression for the deploy job now covers multiple event types (i.e. pull_request, push, workflow_dispatch, and specific issue_comment commands) to trigger deployment. This logic appears comprehensive; however, please double-check that it perfectly reflects your intended deployment triggers and does not lead to any unintended deployments.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 42-42: trailing spaces

(trailing-spaces)


[error] 43-43: trailing spaces

(trailing-spaces)


64-85: Validation Script for Secrets and Variables:
The new shell script is a clear and effective approach to ensure that the required secrets (CPLN_TOKEN) and variables (CPLN_ORG, PREFIX) are set before proceeding. It collects any missing values into an array and fails the job if something is missing.

Minor Cleanup: YAMLlint has flagged trailing spaces on several lines (e.g. around lines 67, 72, 81, and 85). Removing these extraneous spaces would improve readability and conform to standard formatting. For example:

-          missing=()␣
+          missing=()

Please remove any trailing whitespace in this block.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 67-67: trailing spaces

(trailing-spaces)


[error] 72-72: trailing spaces

(trailing-spaces)


[error] 81-81: trailing spaces

(trailing-spaces)


[error] 85-85: trailing spaces

(trailing-spaces)


307-313: Build Status Message Formatting:
Within the "Update Status - Building" step, the message string is defined with static quotes containing GitHub Actions expressions (e.g., ${{ env.PR_NUMBER }}). Consider using JavaScript template literals (backticks) for improved readability and native variable interpolation. This is a minor nitpick but worth considering if you want cleaner code.


365-370: Variable Quotation in Deployment Status:
In the deployment completion step, the code assigns the app URL with:

const appUrl = '${{ steps.workload.outputs.WORKLOAD_URL }}';

For consistency and to ensure proper evaluation of the GitHub Actions expression, consider switching to double quotes. For example:

- const appUrl = '${{ steps.workload.outputs.WORKLOAD_URL }}';
+ const appUrl = "${{ steps.workload.outputs.WORKLOAD_URL }}";

This is a minor nitpick meant to improve clarity in variable interpolation.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 369-369: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6f4ef1e and 99a6c33.

📒 Files selected for processing (1)
  • .github/workflows/deploy-to-control-plane-review-app.yml (8 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/deploy-to-control-plane-review-app.yml

[error] 67-67: trailing spaces

(trailing-spaces)


[error] 72-72: trailing spaces

(trailing-spaces)


[error] 81-81: trailing spaces

(trailing-spaces)


[error] 85-85: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: deploy
  • GitHub Check: test (22.x, 3.3.4)
🔇 Additional comments (4)
.github/workflows/deploy-to-control-plane-review-app.yml (4)

8-10: Event Trigger Restriction:
The workflow now limits the triggers for both push and pull_request events to the master branch. Please verify that this restriction is intentional and that no additional branches (e.g., develop or feature branches) should trigger deployments.


24-26: Environment Variable Addition – PREFIX:
A new environment variable PREFIX is introduced (sourced from ${{ vars.REVIEW_APP_PREFIX }}). This aligns with the updated validation logic. Confirm that the variable REVIEW_APP_PREFIX is properly configured in your organization/repository settings.


352-355: Deployment Command Review:
The Deploy to Control Plane step uses the command:

cpflow deploy-image -a ${{ env.APP_NAME }} --run-release-phase --org ${{ vars.CPLN_ORG_STAGING }} --verbose

This command is well structured and the use of the --verbose flag appears intentional for logging purposes. Please confirm that all required options for cpflow deploy-image are accurately provided.


356-359: App URL Retrieval:
The "Retrieve App URL" step correctly uses command substitution with $( ... ) and a regex to extract the URL. It’s a neat solution—just ensure that the regex pattern (https://[^[:space:]]*\.cpln\.app(?=\s|$)) correctly matches your expected URL format on all target systems.

@Judahmeek Judahmeek merged commit 15691e7 into master Mar 19, 2025
5 checks passed
@Judahmeek Judahmeek deleted the judahmeek/secrets branch March 19, 2025 20:36
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