Skip to content

Fail deployment when static content deployment fails#539

Open
MariuszJozwiak wants to merge 1 commit into
rocky-developfrom
dev-deployerrors
Open

Fail deployment when static content deployment fails#539
MariuszJozwiak wants to merge 1 commit into
rocky-developfrom
dev-deployerrors

Conversation

@MariuszJozwiak

Copy link
Copy Markdown
Contributor

Currntly if deploy static throw error is not visible during deploy and deployment pass without any warning. This PR change this behaviour and in case of error throw error before bake ami. This allow to catch issues before it can broke frontend.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f3e3820740

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Error output (stderr):
{{ magento_scd_error_output | default('(no stderr output)', true) }}
when:
- (magento_scd_error_output | default('') | trim | length) > 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Avoid treating any stderr bytes as deployment failure

This condition aborts the deployment whenever setup:static-content:deploy writes anything to stderr, even if the command exits successfully (rc=0). In environments where PHP/Magento emits non-fatal notices or deprecation warnings to stderr, successful builds will now be blocked, which is a production-impacting regression from the prior behavior that only failed on command failure.

Useful? React with 👍 / 👎.

{{ magento_scd_error_output | default('(no stderr output)', true) }}
when:
- (magento_scd_error_output | default('') | trim | length) > 0
or (magento_scd_output | default('') is search('(?i)(error|exception|fatal)'))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Narrow stdout error matching to avoid false failures

The regex marks the run as failed if stdout contains error, exception, or fatal anywhere, which can trigger on benign summaries like “0 errors” or informational text and turn successful deployments into failures. This check should be constrained to known failure patterns (or structured status) rather than raw substring presence.

Useful? React with 👍 / 👎.

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