Skip to content

Fix Terraform plan output truncation in CI#2004

Open
mamu0 wants to merge 18 commits into
mainfrom
fix-truncated-terraform-plan-pr-comment
Open

Fix Terraform plan output truncation in CI#2004
mamu0 wants to merge 18 commits into
mainfrom
fix-truncated-terraform-plan-pr-comment

Conversation

@mamu0

@mamu0 mamu0 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

This PR updates the Infrastructure Review workflow to run Terraform-related Nx tasks with --outputStyle=stream-without-prefixes.
In our CI context, Nx grouped/static output was causing Terraform plan logs to appear truncated for large environments.

With this change:

  • full Terraform plan output is preserved in step logs;
  • noisy per-line project prefixes are removed;
  • no custom plan truncation or GitHub Step Summary fallback is needed in the dx-tasks plugin.

Resolves: CES-2197

@mamu0
mamu0 temporarily deployed to infra-prod-ci July 21, 2026 08:29 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to bootstrapper-prod-ci July 21, 2026 08:29 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to bootstrapper-dev-ci July 21, 2026 08:29 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-dev-ci July 21, 2026 08:29 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-dev-ci July 21, 2026 08:31 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-prod-ci July 21, 2026 08:31 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-prod-ci July 21, 2026 08:35 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-dev-ci July 21, 2026 08:35 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to bootstrapper-prod-ci July 21, 2026 08:35 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to bootstrapper-dev-ci July 21, 2026 08:35 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-dev-ci July 21, 2026 08:37 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-prod-ci July 21, 2026 08:37 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-dev-ci July 21, 2026 08:50 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to bootstrapper-dev-ci July 21, 2026 08:50 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to bootstrapper-prod-ci July 21, 2026 08:50 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-prod-ci July 21, 2026 08:50 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-dev-ci July 21, 2026 08:51 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-prod-ci July 21, 2026 08:52 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-prod-ci July 21, 2026 09:04 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-dev-ci July 21, 2026 09:05 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-prod-ci July 21, 2026 09:16 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to bootstrapper-dev-ci July 21, 2026 09:16 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to bootstrapper-prod-ci July 21, 2026 09:16 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-dev-ci July 21, 2026 09:16 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-dev-ci July 22, 2026 09:18 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-dev-ci July 22, 2026 09:21 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-prod-ci July 22, 2026 09:21 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to bootstrapper-prod-ci July 22, 2026 09:21 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to bootstrapper-dev-ci July 22, 2026 09:21 — with GitHub Actions Inactive
@mamu0
mamu0 requested a review from kin0992 July 22, 2026 09:26
@krusty93

krusty93 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Does the summary have any similar limit? Perhaps it can be solved by disabling NX groups? I sincerely don't know

@krusty93 What do you mean by summary limit? This PR addresses the issue where the terraform plan done in validate_v2.yaml was being truncated in the step logs. This happens because each step has a maximum limit of 65k characters, and large plans were exceeding this threshold. For example this is an execution without the PR fix.

I mean the summary where this PR is moving the output, perhaps it does have a similar limit as the PR comments?

About the example run you linked, it seems very short to hit a limit. We saw several times runs with bigger outputs there were not truncated. For example, this one is way longer than the example (227k characters vs 65k). Something is hinting the limit is imposed by the NX sub-groups instead

@krusty93 krusty93 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Something is not right

#2004 (comment)

@mamu0
mamu0 temporarily deployed to bootstrapper-prod-ci July 22, 2026 15:15 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-dev-ci July 22, 2026 15:15 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-prod-ci July 22, 2026 15:15 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to bootstrapper-dev-ci July 22, 2026 15:15 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-dev-ci July 22, 2026 15:16 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-prod-ci July 22, 2026 15:16 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-prod-ci July 22, 2026 15:24 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-dev-ci July 22, 2026 15:24 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to bootstrapper-prod-ci July 22, 2026 15:24 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to bootstrapper-dev-ci July 22, 2026 15:24 — with GitHub Actions Inactive
@mamu0
mamu0 temporarily deployed to infra-prod-ci July 22, 2026 15:25 — with GitHub Actions Inactive
@mamu0

mamu0 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

I mean the summary where this PR is moving the output, perhaps it does have a similar limit as the PR comments?

About the example run you linked, it seems very short to hit a limit. We saw several times runs with bigger outputs there were not truncated. For example, this one is way longer than the example (227k characters vs 65k). Something is hinting the limit is imposed by the NX sub-groups instead

@krusty93 Great point, thanks!
In this commit 87bea3f I've removed the GITHUB_STEP_SUMMARY workaround and the 50k truncation logic from the Terraform task, so we now emit the full plan output again.
I also switched nx affected to --outputStyle=stream in validate-v2.yaml to bypass Nx grouped/static output handling in CI, which looks like the likely source of the truncation behavior we were seeing.

Check this as result example

@mamu0
mamu0 temporarily deployed to infra-dev-ci July 22, 2026 15:25 — with GitHub Actions Inactive
@mamu0
mamu0 requested a review from krusty93 July 22, 2026 15:28
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.

3 participants