Skip to content

Conversation

@pjcdawkins
Copy link
Collaborator

Backports #1572 to main (4.x version, theoretically compatible with PHP 5.6+)

@pjcdawkins pjcdawkins requested a review from Copilot November 5, 2025 17:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR backports functionality to display failing activities correctly in the CLI by checking command exit codes. When any command within an activity has a non-zero exit code, the activity result is now displayed as "failure" regardless of the activity's reported result field.

Key Changes:

  • Modified formatResult() to accept an Activity object instead of a string result value
  • Added logic to inspect command exit codes and override the result to "failure" when any command fails
  • Updated all call sites to pass the full Activity object instead of just the result string

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Service/ActivityMonitor.php Core logic change: formatResult() now inspects activity commands and overrides result based on exit codes
src/Command/Integration/Activity/IntegrationActivityListCommand.php Updated to pass Activity object to formatResult()
src/Command/Environment/EnvironmentDeployCommand.php Updated to pass Activity object to formatResult()
src/Command/Activity/ActivityListCommand.php Updated to pass Activity object to formatResult()
src/Command/Activity/ActivityGetCommand.php Updated to pass Activity object to formatResult() and handle result property specially

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@akalipetis akalipetis left a comment

Choose a reason for hiding this comment

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

LGTM

@akalipetis akalipetis merged commit d68af1f into main Nov 17, 2025
4 checks passed
@akalipetis akalipetis deleted the backport-0c12e0c1-php56 branch November 17, 2025 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants