Skip to content

fix(rust): remove deprecated set-output GitHub Actions command#27

Merged
konard merged 5 commits intomainfrom
issue-26-059a356f2ae4
Jan 7, 2026
Merged

fix(rust): remove deprecated set-output GitHub Actions command#27
konard merged 5 commits intomainfrom
issue-26-059a356f2ae4

Conversation

@konard
Copy link
Copy Markdown
Member

@konard konard commented Jan 7, 2026

Summary

Fixes the deprecation warnings in CI/CD and enforces changelog fragment requirements.

Problem

  1. Set-output deprecation: The CI/CD pipeline was generating 2 deprecation warnings during the "Instant Release" job:

    The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files.
    
  2. Changelog check too lenient: The changelog fragment check only produced a warning when source code changed without a changelog entry, allowing PRs to pass without proper documentation.

Solutions

Fix 1: Remove deprecated set-output command

Root Cause: The setOutput function in rust/scripts/version-and-commit.mjs was using both:

  1. The new GITHUB_OUTPUT environment file approach (correct)
  2. The deprecated ::set-output stdout command (causes warnings)

Solution: Removed the deprecated console.log(::set-output name=${key}::${value}) line and replaced it with a plain console.log(Output: ${key}=${value}) for visibility.

Fix 2: Enforce changelog fragment requirement

Root Cause: The changelog fragment check in .github/workflows/rust.yml used ::warning:: and exit 0, so it would only warn but still pass CI even when source code changed without a changelog entry.

Solution: Changed ::warning:: to ::error:: and exit 0 to exit 1 so that CI fails when Rust source code (src/, tests/, scripts/, Cargo.toml) is changed without a changelog fragment.

Changes

  • rust/scripts/version-and-commit.mjs: Remove deprecated set-output command
  • .github/workflows/rust.yml: Enforce changelog fragment requirement as error instead of warning
  • rust/changelog.d/: Add changelog fragment for this PR
  • docs/case-studies/issue-26/: Add case study documentation with CI logs and analysis
  • experiments/test-setOutput.mjs: Add test script to verify the fix

Test Plan

  • Verified the set-output fix works correctly with a local test script
  • Confirmed no other files use the deprecated ::set-output command
  • Compared with the JS version (js/scripts/version-and-commit.mjs) which was already correctly implemented
  • Added changelog fragment so the enforced check will pass

References

Fixes #26

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #26
@konard konard self-assigned this Jan 7, 2026
konard and others added 2 commits January 7, 2026 18:22
Replace deprecated `::set-output` command with plain console.log for
visibility. The script already writes to GITHUB_OUTPUT file which is
the recommended approach.

Fixes #26

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add detailed case study analysis including:
- Problem description and root cause analysis
- CI log evidence of the deprecation warnings
- Research on GitHub Actions set-output deprecation
- Timeline of events and impact assessment
- Proposed solution and testing strategy

Also adds test script in experiments/ folder to verify the fix.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard changed the title [WIP] These warnings must be fixed in CI/CD fix(rust): remove deprecated set-output GitHub Actions command Jan 7, 2026
CLAUDE.md was used for task setup and is no longer needed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review January 7, 2026 17:27
@konard
Copy link
Copy Markdown
Member Author

konard commented Jan 7, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $3.626281 USD
  • Calculated by Anthropic: $2.388065 USD
  • Difference: $-1.238216 (-34.15%)
    📎 Log file uploaded as GitHub Gist (452KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Member Author

konard commented Jan 7, 2026

https://github.com/link-foundation/lino-env/actions/runs/20790260825/job/59710513024#step:3:28, changelog fragment check should be never a warning, it must be an error, so it will be impossible to skip it if the source code in rust is changed.

@konard konard marked this pull request as draft January 7, 2026 17:41
@konard
Copy link
Copy Markdown
Member Author

konard commented Jan 7, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-01-07T17:41:43.603Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback.

Change the changelog fragment check from a warning to an error. When
Rust source code changes without a corresponding changelog entry, the
CI will now fail instead of just showing a warning and passing.

Also adds a changelog fragment for all changes in this PR.

Addresses feedback from PR #27

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review January 7, 2026 17:48
@konard
Copy link
Copy Markdown
Member Author

konard commented Jan 7, 2026

Changes Made

Addressed the feedback to enforce changelog fragment requirements:

Changelog Fragment Check Now Fails CI

Changed the changelog fragment check in .github/workflows/rust.yml from a warning to an error:

  • Before: ::warning:: + exit 0 → Warning annotation but CI passes
  • After: ::error:: + exit 1 → Error annotation and CI fails

This ensures that when Rust source code (src/, tests/, scripts/, Cargo.toml) is changed without a changelog entry, the CI will fail instead of just showing a warning.

Added Changelog Fragment

Added rust/changelog.d/20260107_184452_fix_ci_deprecation_warnings.md documenting:

  • Removal of deprecated set-output GitHub Actions command
  • Enforcement of changelog fragment requirement

CI Results

All checks are passing:

  • ✅ Changelog Fragment Check: Passed (fragment found)
  • ✅ Lint and Format Check: Passed
  • ✅ Tests (ubuntu, macos, windows): Passed
  • ✅ Build Package: Passed

The PR is ready for review.

🤖 Generated with Claude Code

@konard
Copy link
Copy Markdown
Member Author

konard commented Jan 7, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $2.275274 USD
  • Calculated by Anthropic: $1.363686 USD
  • Difference: $-0.911588 (-40.06%)
    📎 Log file uploaded as GitHub Gist (364KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Member Author

konard commented Jan 7, 2026

🔄 Auto-restart 1/3

Detected uncommitted changes from previous run. Starting new session to review and commit them.

Uncommitted files:

?? pr-conversation-comments.json
?? pr-details.json
?? pr-review-comments.json
?? pr-reviews.json

Auto-restart will stop after changes are committed or after 2 more iterations. Please wait until working session will end and give your feedback.

@konard
Copy link
Copy Markdown
Member Author

konard commented Jan 7, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $0.718459 USD
  • Calculated by Anthropic: $0.391287 USD
  • Difference: $-0.327172 (-45.54%)
    📎 Log file uploaded as GitHub Gist (506KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard konard merged commit d17a120 into main Jan 7, 2026
10 checks passed
konard added a commit to link-foundation/rust-ai-driven-development-pipeline-template that referenced this pull request Jan 7, 2026
This commit applies best practices discovered in link-foundation repositories
(start, lino-env) to improve the Rust CI/CD pipeline.

Changes:
- Fix deprecated ::set-output GitHub Actions command in version-and-commit.mjs
- Change changelog fragment check from warning to error (exit 1)
- Add always() && !cancelled() to job conditions to fix workflow_dispatch skipping
- Add release_mode input with "instant" and "changelog-pr" options
- Add crates.io publishing support to auto-release and manual-release jobs
- Add --tag-prefix and --crates-io-url options to create-github-release.mjs
- Add comprehensive case study documentation in docs/case-studies/issue-11/

References:
- link-foundation/start#58
- link-foundation/lino-env#27
- link-foundation/lino-env#25
- link-foundation/lino-env#23

Fixes #11

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

These warnings must be fixed in CI/CD

1 participant