Skip to content

SRE-2560 Fix CDKTF Diff Output#15

Merged
jadabyte256 merged 5 commits into0.3.0-rcfrom
fix/cdktf_diff_output_ts
Mar 3, 2026
Merged

SRE-2560 Fix CDKTF Diff Output#15
jadabyte256 merged 5 commits into0.3.0-rcfrom
fix/cdktf_diff_output_ts

Conversation

@jadabyte256
Copy link
Contributor

@jadabyte256 jadabyte256 commented Mar 2, 2026

Closes snapsheettech.atlassian.net/browse/SRE-2560

What

Changes the jobs for writing the output/result to always run even if the diff fails and updates logic for determining whether a diff succeeded to prevent the issue when a plan is created, but the underlying diff command fails due to a data lookup failure (this was seen when the serverless DB cluster was not supported by the cdtkf-infra version).

Why

Previously, if one of the cdktf-diff matrix jobs failed, it would skip the output and no summary would be printed out. This makes it tedious to copy plan links into PRs for review. Additionally, the action would succeed in cases where an actual plan was generated even though the command returned a non-success exit code, which could potentially hide failures from teams in certain scenarios.

How

  • Adds additional output parsing and exit code checks.
  • Makes artifact upload run always so failures produce output in the summary.

Testing

You may run the cdktf-diff action in vice-backend using the workflow from SRE-2560-fix-cdktf-diff-output to test.

Example tests:

  • Failure from Serverless DB Dashboard - verify that vice-backend-release actually shows a failure for the ref diff.
  • State locked - verify that vice-backend-qa8 failed in both diffs. If you'd like to test this, run a locally apply and do not accept the plan - just let it set at the prompt so that the state is locked and run the action.

@jadabyte256 jadabyte256 changed the title fix: try similar parsing to the cdktf-apply SRE-3262 Fix CDKTF Diff Output Mar 2, 2026
@jadabyte256 jadabyte256 changed the title SRE-3262 Fix CDKTF Diff Output SRE-2560 Fix CDKTF Diff Output Mar 2, 2026
@jadabyte256 jadabyte256 marked this pull request as ready for review March 2, 2026 16:11
@jadabyte256 jadabyte256 merged commit fde7d81 into 0.3.0-rc Mar 3, 2026
1 check passed
jadabyte256 added a commit that referenced this pull request Mar 3, 2026
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