Skip to content

Restore the changelog comments in submit/apply after docs-builder#3995 - #438

Merged
theletterf merged 1 commit into
mainfrom
fix/changelog-apply-comment-conditions
Oct 26, 2026
Merged

theletterf merged 1 commit into
mainfrom
fix/changelog-apply-comment-conditions

Conversation

@theletterf

Copy link
Copy Markdown
Member

docs-builder#3995 merged today and removed the should-comment-success and should-comment-failure outputs from changelog evaluate-artifact. That change was meant to land after #324, but #324 is still open, and submit/apply still reads both outputs at lines 154 and 169. Since the 13:30 UTC edge build, those two steps never run. PRs that can't take a committed changelog get no comment-only entry, and PRs without a type label get no failure comment. Nothing errors, so the gap is silent.

This PR rewrites the two conditions to use outputs that evaluate-artifact still sets. The comment-only step now runs when status is success and should-commit isn't true. Before, it ran on Success && !CanCommit, and should-commit is Success && CanCommit, so the behavior is the same. The failure step now runs when status is no-label, the display name of PrEvaluationResult.NoLabel. GitHub expressions compare strings without regard to case, which matches the case-insensitive parse in docs-builder.

Nothing else changes, and #324 stays as it is. I didn't use #324 as the fix because its changelog-decision artifact is uploaded in the "Changelog file" run, and today no comments caller can read it: the callers skip workflow_run events, and the newest-run lookup resolves to main. That wiring needs Martijn's design.

I ran the repo's pre-commit hooks on the file (all pass, README unchanged). I can't run the composite action locally, so the real check is the first comment-only or no-label PR after v1 moves. Once this merges, publishing the next release moves v1 and restores the comments for docs-content and elastic-otel-java.

No tracking issue exists for this change, at the requester's request.

🤖 Generated with Claude Code

docs-builder#3995 removed the should-comment-success and
should-comment-failure outputs from changelog evaluate-artifact. The
comment-only and failure steps still gated on them, so they stopped
running. Gate them on the status and should-commit outputs instead,
which give the same conditions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@theletterf
theletterf requested a review from a team as a code owner October 26, 2026 13:37
@theletterf
theletterf requested a review from akira28 October 26, 2026 13:37
@theletterf theletterf added the fix label Oct 26, 2026
# author can still see what would have been recorded.
- name: Post comment-only changelog
if: steps.meta.outputs.should-comment-success == 'true' || steps.commit.outcome == 'failure'
if: (steps.meta.outputs.status == 'success' && steps.meta.outputs.should-commit != 'true') || steps.commit.outcome == 'failure'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Severity: P3 (Low)

Add automated regression coverage for the restored comment routing: success with should-commit true/false, no-label, and skipped/error statuses. No tests accompany this fix, so another output-contract mismatch can silently disable these comments again without CI detecting it. A fixture-based workflow check should verify which comment steps execute, rather than relying on the first production PR after release.

Generated by Libra. React with 👍 or 👎 to give feedback on this comment.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fair point: an output-contract mismatch caused this gap, and nothing caught it.

I'm keeping this PR to the two conditions, though. It's a stopgap to restore comments that have been silent since this afternoon's edge build, and #324 deletes both steps once Martijn rewires the comment path. A test that checks which steps run would need a live PR with a matching head SHA, because evaluate-artifact fetches the PR from GitHub, and it would test steps that are about to go away.

The check worth having is on the contract: run evaluate-artifact (edge) on a schedule and fail if submit/apply reads an output it no longer sets. That would have caught docs-builder#3995 before the edge build. I'll raise it as a follow-up rather than grow this hotfix.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Closing the loop on this: #439 replaced the steps this PR touched, so the test I mentioned would have covered code that no longer exists. We decided not to add a separate output-contract check.

@theletterf
theletterf merged commit 2b6167c into main Oct 26, 2026
6 checks passed
@theletterf
theletterf deleted the fix/changelog-apply-comment-conditions branch October 26, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant