Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 24.1.0 breaks pipeline #3429

Open
ppa007asr opened this issue Aug 21, 2024 · 2 comments
Open

Release 24.1.0 breaks pipeline #3429

ppa007asr opened this issue Aug 21, 2024 · 2 comments

Comments

@ppa007asr
Copy link

ppa007asr commented Aug 21, 2024

Current behavior

When using pipelines a task status for commands is checked with the stderr stream on linux. When its empty the task is succesful completed.
When something is found on the stderr stream the task fails and pipeline stops.

Some platforms give the option to ignore any messages on stderr. You could use that to ignore warning messages but that would mean any relevant error messages get ignored as well

Expected behavior

warning messages should be send to stdout and maybe create a featureflag to be able to send it to stderr. but not do this by default

semantic-release version

24.1.0

CI environment

azure

Plugins used

semantic-release/commit-analyzer
semantic-release/changelog
semantic-release/git
semantic-release-ado

semantic-release configuration

branches:
  - main
tagFormat: "v${version}"
plugins:
  - - "@semantic-release/commit-analyzer"
    - preset: conventionalcommits
      releaseRules:
        - type: docs
          release: patch
        - type: refactor
          release: patch
        - type: test
          release: patch
        - type: style
          release: patch
      parserOpts:
        mergePattern: "Merged PR .*:"
        noteKeywords:
          - BREAKING CHANGE
          - BREAKING CHANGES
          - BREAKING
  - - "@semantic-release/changelog"
    - changelogFile: CHANGELOG.md
  - - "@semantic-release/git"
    - assets:
        - CHANGELOG.md
  - - "semantic-release-ado"
    - isOutput: true
      setOnlyOnRelease: false
      assets:
        - CHANGELOG.md

CI logs

[8:51:30 AM] [semantic-release] › ℹ  Running semantic-release version 24.1.0
[8:51:30 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/changelog"
[8:51:30 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/git"
[8:51:30 AM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[8:51:30 AM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "semantic-release-ado"
[8:51:30 AM] [semantic-release] › ✔  Loaded plugin "verifyRelease" from "semantic-release-ado"
[8:51:30 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/changelog"
[8:51:30 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/git"
[8:51:33 AM] [semantic-release] › ⚠  Run automated release from branch main on repository ### in dry-run mode
[8:51:33 AM] [semantic-release] › ✔  Allowed to push to the Git repository
[8:51:33 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/changelog"
[8:51:33 AM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[8:51:33 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/git"
[8:51:33 AM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/git"
[8:51:33 AM] [semantic-release] › ℹ  Found git tag v1.9.3 associated with version 1.9.3 on branch main
[8:51:33 AM] [semantic-release] › ℹ  Found 2 commits since last release
[8:51:33 AM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[8:51:33 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: ###
[8:51:33 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
[8:51:33 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: chore: Add node files and folders to gitignore
[8:51:33 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[8:51:33 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 2 commits complete: patch release
[8:51:33 AM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[8:51:33 AM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "semantic-release-ado"
[8:51:33 AM] [semantic-release] [semantic-release-ado] › ℹ  Setting current version 1.9.3 to the env var nextRelease

[8:51:33 AM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "semantic-release-ado"
[8:51:33 AM] [semantic-release] › ℹ  The next release version is 1.9.4
[8:51:33 AM] [semantic-release] › ℹ  Start step "verifyRelease" of plugin "semantic-release-ado"
[8:51:33 AM] [semantic-release] [semantic-release-ado] › ℹ  Setting version 1.9.4 to the env var nextRelease

[8:51:33 AM] [semantic-release] › ✔  Completed step "verifyRelease" of plugin "semantic-release-ado"
[8:51:33 AM] [semantic-release] › ⚠  Skip step "prepare" of plugin "@semantic-release/changelog" in dry-run mode
[8:51:33 AM] [semantic-release] › ⚠  Skip step "prepare" of plugin "@semantic-release/git" in dry-run mode
[8:51:33 AM] [semantic-release] › ⚠  Skip v1.9.4 tag creation in dry-run mode
[8:51:33 AM] [semantic-release] › ✔  Published release 1.9.4 on default channel
[8:51:33 AM] [semantic-release] › ℹ  Release note for version 1.9.4:
##[error]Bash wrote one or more lines to the standard error stream.
##[error][8:51:33 AM] [semantic-release] › ⚠  Run automated release from branch main on repository ### in dry-run mode
##[error][8:51:33 AM] [semantic-release] › ⚠  Skip step "prepare" of plugin "@semantic-release/changelog" in dry-run mode
##[error][8:51:33 AM] [semantic-release] › ⚠  Skip step "prepare" of plugin "@semantic-release/git" in dry-run mode
##[error][8:51:33 AM] [semantic-release] › ⚠  Skip v1.9.4 tag creation in dry-run mode
@travi
Copy link
Member

travi commented Aug 21, 2024

When using pipelines a task status for commands is checked with the stderr stream on linux. When its empty the task is succesful completed.
When something is found on the stderr stream the task fails and pipeline stops.

please expand on the context of this statement. is this custom handling added by your team, or by the platform you are using for CI?

output written to stderr is not necessarily an indication that an error occurred, despite the stream name suggesting that. this is not specific to semantic-release, so i would be surprised if a CI platform treats all output written to stderr as an indication that an error occurred. the two streams are more intended to enable diagnostic output to be written to an alternative stream than the default so that output intended to be piped to another program is not broken by unrelated diagnostic output. see more explanation at this google result: https://stackoverflow.com/questions/3385201/confused-about-stdin-stdout-and-stderr#answer-3385261

@chhauss-a
Copy link

chhauss-a commented Sep 16, 2024

I am having the same problem trying to upgrade to semantic-release v24.1.1
Before it was not writing "info logs" to stderr and our ADOS (Azure devops) pipeline fails for that reason, meaning I can't upgrade to the newest version of semantic release.
In my opinion @ppa007asr is right and I don't want to just "ignore" everything written to stderr in the pipeline.

Also the logs that are put out to stderr by semantic-release should not be there but on stdout:

##[error]Bash wrote one or more lines to the standard error stream.
##[error][11:57:54 AM] [semantic-release] › ⚠  Run automated release from branch develop on repository <our-repository> in dry-run mode

##[error][11:57:55 AM] [semantic-release] › ⚠  Skip step "prepare" of plugin "@semantic-release/exec" in dry-run mode

##[error][11:57:55 AM] [semantic-release] › ⚠  Skip 2.1.0-dev.34 tag creation in dry-run mode
[11:57:55 AM] [semantic-release] › ⚠  Skip step "publish" of plugin "@semantic-release/exec" in dry-run mode
[11:57:55 AM] [semantic-release] › ⚠  Skip step "success" of plugin "@semantic-release/exec" in dry-run mode

This is part of the result of npx semantic-release --dry-run

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

No branches or pull requests

3 participants