qiwi / multi-semantic-release

Proof of concept that wraps semantic-release to work with monorepos.
BSD Zero Clause License
86 stars 34 forks source link

6.0.X does not bump dependencies as expected #65

Open martinstark opened 2 years ago

martinstark commented 2 years ago

Our release broke after the second run on 6.0.X, and we tracked the cause down to dependencies not being bumped as expected.

With 6.0.X:

package A (no dependencies) package B (depends on A)

make change in A

run release script

A gets a new release B gets no new release, does not get a bumped dependency on A UNEXPECTED BEHAVIOUR

With 5.0.X (and earlier versions):

package A (no dependencies) package B (depends on A)

make change in A

run release script

A gets a new release B gets a new release (bumped dep A) EXPECTED BEHAVIOUR


The same issue applies even if we make changes to both package A and B, when on 6.0.X. B will not get a bumped dependency on A.

Is this expected behaviour? I'm not sure how to interpret the drop support for cycled monorepos line from the release notes.

antongolub commented 2 years ago

Hey, @martinstark,

In v6 we introduced a new toposort-based workspace traverser, so new issues may arise.

Could you plz add a test fixture for your case to help us to dig the issue?

martinstark commented 2 years ago

@antongolub is there documentation describing how to add fixtures, or do I have to study what's there to try to understand what I need to do?

We just ran into issues on the 5.0.3 release too, this is a run that detected a next version of 5 different packages ("The next release version is"), but proceeded to only do a release of one of them (we've been running @qiwi/multi-semantic-release flawlessly for almost 2 years):

Run yarn run multi-semantic-release
yarn run v1.19.1
$ /home/runner/work/web-player/web-player/node_modules/.bin/multi-semantic-release
multi-semantic-release version: 5.0.3
semantic-release version: 19.0.2
flags: {
  "sequentialInit": false,
  "sequentialPrepare": true,
  "firstParent": false,
  "debug": false,
  "deps": {
    "bump": "override",
    "release": "patch"
  },
  "tagFormat": "${name}@${version}",
  "dryRun": false
}
package paths [
  '/home/runner/work/web-player/web-player/cc-sender/package.json',
  '/home/runner/work/web-player/web-player/reference-app/package.json',
  '/home/runner/work/web-player/web-player/service-layer/package.json',
  '/home/runner/work/web-player/web-player/shaka-engine/package.json',
  '/home/runner/work/web-player/web-player/shaka-util/package.json',
  '/home/runner/work/web-player/web-player/shared/package.json',
  '/home/runner/work/web-player/web-player/telia-icons/package.json',
  '/home/runner/work/web-player/web-player/ui/package.json'
]
[12:45:48 PM] › 🎉  Started multirelease! Loading 8 packages...
[12:45:49 PM] › ✔  Loaded package @tv4/web-player-cc-sender
[12:45:49 PM] › ✔  Loaded package reference-app
[12:45:49 PM] › ✔  Loaded package @tv4/web-player-service-layer
[12:45:49 PM] › ✔  Loaded package @tv4/web-player-shaka
[12:45:49 PM] › ✔  Loaded package @tv4/web-player-shaka-util
[12:45:49 PM] › ✔  Loaded package @tv4/web-player-shared
[12:45:49 PM] › ✔  Loaded package @tv4/web-player-telia-icons
[12:45:49 PM] › ✔  Loaded package @tv4/web-player-ui
[12:45:49 PM] › 🎉  Queued 8 packages! Starting release...
[12:45:49 PM] [@tv4/web-player-cc-sender] › ℹ  Running semantic-release version 19.0.2
[12:45:49 PM] [reference-app] › ℹ  Running semantic-release version 19.0.2
[12:45:49 PM] [@tv4/web-player-service-layer] › ℹ  Running semantic-release version 19.0.2
[12:45:49 PM] [@tv4/web-player-shaka] › ℹ  Running semantic-release version 19.0.2
[12:45:49 PM] [@tv4/web-player-shaka-util] › ℹ  Running semantic-release version 19.0.2
[12:45:49 PM] [@tv4/web-player-shared] › ℹ  Running semantic-release version 19.0.2
[12:45:49 PM] [@tv4/web-player-telia-icons] › ℹ  Running semantic-release version 19.0.2
[12:45:49 PM] [@tv4/web-player-ui] › ℹ  Running semantic-release version 19.0.2
[12:45:49 PM] [@tv4/web-player-cc-sender] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
[12:45:49 PM] [@tv4/web-player-cc-sender] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-cc-sender] › ✔  Loaded plugin "success" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-cc-sender] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-service-layer] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
[12:45:49 PM] [@tv4/web-player-service-layer] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-service-layer] › ✔  Loaded plugin "success" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-service-layer] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-shaka] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
[12:45:49 PM] [@tv4/web-player-shaka] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-shaka] › ✔  Loaded plugin "success" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-shaka] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-shaka-util] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
[12:45:49 PM] [@tv4/web-player-shaka-util] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-shaka-util] › ✔  Loaded plugin "success" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-shaka-util] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-shared] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
[12:45:49 PM] [@tv4/web-player-shared] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-shared] › ✔  Loaded plugin "success" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-shared] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-telia-icons] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
[12:45:49 PM] [@tv4/web-player-telia-icons] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-telia-icons] › ✔  Loaded plugin "success" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-telia-icons] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-ui] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
[12:45:49 PM] [@tv4/web-player-ui] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-ui] › ✔  Loaded plugin "success" from "@semantic-release/github"
[12:45:49 PM] [@tv4/web-player-ui] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[12:45:49 PM] [reference-app] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
[12:45:49 PM] [reference-app] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[12:45:49 PM] [reference-app] › ✔  Loaded plugin "success" from "@semantic-release/github"
[12:45:49 PM] [reference-app] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[12:46:02 PM] [@tv4/web-player-cc-sender] › ✔  Run automated release from branch master on repository https://github.com/TV4/web-player.git
[12:46:02 PM] [@tv4/web-player-cc-sender] › ✔  Allowed to push to the Git repository
[12:46:02 PM] [@tv4/web-player-cc-sender] › ℹ  Start step "verifyConditions" of plugin "Inline plugin"
[12:46:02 PM] [@tv4/web-player-cc-sender] › ✔  Completed step "verifyConditions" of plugin "Inline plugin"
[12:46:02 PM] [@tv4/web-player-cc-sender] › ℹ  Found git tag @tv4/web-player-cc-sender@1.8.12 associated with version 1.8.12 on branch master
[12:46:02 PM] [@tv4/web-player-cc-sender] › ℹ  Found 25 commits since last release
[12:46:02 PM] [@tv4/web-player-cc-sender] › ℹ  Start step "analyzeCommits" of plugin "Inline plugin"
[12:46:03 PM] [@tv4/web-player-telia-icons] › ✔  Run automated release from branch master on repository https://github.com/TV4/web-player.git
[12:46:03 PM] [@tv4/web-player-shaka-util] › ✔  Run automated release from branch master on repository https://github.com/TV4/web-player.git
[12:46:03 PM] [@tv4/web-player-telia-icons] › ✔  Allowed to push to the Git repository
[12:46:03 PM] [@tv4/web-player-telia-icons] › ℹ  Start step "verifyConditions" of plugin "Inline plugin"
[12:46:03 PM] [@tv4/web-player-shaka-util] › ✔  Allowed to push to the Git repository
[12:46:03 PM] [@tv4/web-player-shaka-util] › ℹ  Start step "verifyConditions" of plugin "Inline plugin"
[12:46:04 PM] [@tv4/web-player-telia-icons] › ✔  Completed step "verifyConditions" of plugin "Inline plugin"
[12:46:04 PM] [@tv4/web-player-telia-icons] › ℹ  Found git tag @tv4/web-player-telia-icons@1.1.0 associated with version 1.1.0 on branch master
[12:46:04 PM] [@tv4/web-player-telia-icons] › ℹ  Found 448 commits since last release
[12:46:04 PM] [@tv4/web-player-telia-icons] › ℹ  Start step "analyzeCommits" of plugin "Inline plugin"
[12:46:04 PM] [@tv4/web-player-shaka-util] › ✔  Completed step "verifyConditions" of plugin "Inline plugin"
[12:46:04 PM] [@tv4/web-player-shaka-util] › ℹ  Found git tag @tv4/web-player-shaka-util@2.1.3 associated with version 2.1.3 on branch master
[12:46:04 PM] [@tv4/web-player-shaka-util] › ℹ  Found 37 commits since last release
[12:46:04 PM] [@tv4/web-player-shaka-util] › ℹ  Start step "analyzeCommits" of plugin "Inline plugin"
[12:46:06 PM] [@tv4/web-player-service-layer] › ✔  Run automated release from branch master on repository https://github.com/TV4/web-player.git
[12:46:06 PM] [@tv4/web-player-shared] › ✔  Run automated release from branch master on repository https://github.com/TV4/web-player.git
[12:46:06 PM] [@tv4/web-player-service-layer] › ✔  Allowed to push to the Git repository
[12:46:06 PM] [@tv4/web-player-service-layer] › ℹ  Start step "verifyConditions" of plugin "Inline plugin"
[12:46:06 PM] [@tv4/web-player-shaka] › ✔  Run automated release from branch master on repository https://github.com/TV4/web-player.git
[12:46:07 PM] [@tv4/web-player-service-layer] › ✔  Completed step "verifyConditions" of plugin "Inline plugin"
[12:46:07 PM] [@tv4/web-player-shared] › ✔  Allowed to push to the Git repository
[12:46:07 PM] [@tv4/web-player-shared] › ℹ  Start step "verifyConditions" of plugin "Inline plugin"
[12:46:07 PM] [@tv4/web-player-service-layer] › ℹ  Found git tag @tv4/web-player-service-layer@6.0.7 associated with version 6.0.7 on branch master
[12:46:07 PM] [@tv4/web-player-service-layer] › ℹ  Found 35 commits since last release
[12:46:07 PM] [@tv4/web-player-service-layer] › ℹ  Start step "analyzeCommits" of plugin "Inline plugin"
[12:46:07 PM] [@tv4/web-player-shaka] › ✔  Allowed to push to the Git repository
[12:46:07 PM] [@tv4/web-player-shaka] › ℹ  Start step "verifyConditions" of plugin "Inline plugin"
[12:46:07 PM] [reference-app] › ✔  Run automated release from branch master on repository https://github.com/TV4/web-player.git
[12:46:07 PM] [@tv4/web-player-shared] › ✔  Completed step "verifyConditions" of plugin "Inline plugin"
[12:46:07 PM] [@tv4/web-player-shared] › ℹ  Found git tag @tv4/web-player-shared@11.0.2 associated with version 11.0.2 on branch master
[12:46:07 PM] [@tv4/web-player-shared] › ℹ  Found 39 commits since last release
[12:46:07 PM] [@tv4/web-player-shared] › ℹ  Start step "analyzeCommits" of plugin "Inline plugin"
[12:46:07 PM] [@tv4/web-player-shaka] › ✔  Completed step "verifyConditions" of plugin "Inline plugin"
[12:46:07 PM] [@tv4/web-player-shaka] › ℹ  Found git tag @tv4/web-player-shaka@5.2.2 associated with version 5.2.2 on branch master
[12:46:07 PM] [@tv4/web-player-shaka] › ℹ  Found 36 commits since last release
[12:46:07 PM] [@tv4/web-player-shaka] › ℹ  Start step "analyzeCommits" of plugin "Inline plugin"
[12:46:07 PM] [reference-app] › ✔  Allowed to push to the Git repository
[12:46:07 PM] [reference-app] › ℹ  Start step "verifyConditions" of plugin "Inline plugin"
[12:46:07 PM] [reference-app] › ✔  Completed step "verifyConditions" of plugin "Inline plugin"
[12:46:07 PM] [reference-app] › ℹ  Found git tag reference-app@7.1.5 associated with version 7.1.5 on branch master
[12:46:07 PM] [reference-app] › ℹ  Found 9 commits since last release
[12:46:07 PM] [reference-app] › ℹ  Start step "analyzeCommits" of plugin "Inline plugin"
[12:46:07 PM] [@tv4/web-player-ui] › ✔  Run automated release from branch master on repository https://github.com/TV4/web-player.git
[12:46:07 PM] [@tv4/web-player-ui] › ✔  Allowed to push to the Git repository
[12:46:07 PM] [@tv4/web-player-ui] › ℹ  Start step "verifyConditions" of plugin "Inline plugin"
[12:46:07 PM] [@tv4/web-player-ui] › ✔  Completed step "verifyConditions" of plugin "Inline plugin"
[12:46:07 PM] [@tv4/web-player-ui] › ℹ  Found git tag @tv4/web-player-ui@13.0.3 associated with version 13.0.3 on branch master
[12:46:07 PM] [@tv4/web-player-ui] › ℹ  Found 10 commits since last release
[12:46:07 PM] [@tv4/web-player-ui] › ℹ  Start step "analyzeCommits" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-cc-sender] › ✔  Completed step "analyzeCommits" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-telia-icons] › ✔  Completed step "analyzeCommits" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-shaka-util] › ✔  Completed step "analyzeCommits" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-service-layer] › ✔  Completed step "analyzeCommits" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-shared] › ✔  Completed step "analyzeCommits" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-shaka] › ✔  Completed step "analyzeCommits" of plugin "Inline plugin"
[12:46:08 PM] [reference-app] › ✔  Completed step "analyzeCommits" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-ui] › ✔  Completed step "analyzeCommits" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-cc-sender] › ℹ  There are no relevant changes, so no new version is released.
[12:46:08 PM] [@tv4/web-player-telia-icons] › ℹ  There are no relevant changes, so no new version is released.
[12:46:08 PM] [@tv4/web-player-shaka-util] › ℹ  The next release version is 2.1.4
[12:46:08 PM] [@tv4/web-player-shaka-util] › ℹ  Start step "generateNotes" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-service-layer] › ℹ  The next release version is 6.0.8
[12:46:08 PM] [@tv4/web-player-service-layer] › ℹ  Start step "generateNotes" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-shared] › ℹ  There are no relevant changes, so no new version is released.
[12:46:08 PM] [@tv4/web-player-shaka] › ℹ  The next release version is 5.2.3
[12:46:08 PM] [@tv4/web-player-shaka] › ℹ  Start step "generateNotes" of plugin "Inline plugin"
[12:46:08 PM] [reference-app] › ℹ  The next release version is 7.1.6
[12:46:08 PM] [reference-app] › ℹ  Start step "generateNotes" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-ui] › ℹ  The next release version is 13.1.0
[12:46:08 PM] [@tv4/web-player-ui] › ℹ  Start step "generateNotes" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-service-layer] › ✔  Completed step "generateNotes" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-service-layer] › ℹ  Start step "prepare" of plugin "Inline plugin"
[12:46:08 PM] [reference-app] › ✔  Completed step "generateNotes" of plugin "Inline plugin"
[12:46:08 PM] [reference-app] › ℹ  Start step "prepare" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-shaka-util] › ✔  Completed step "generateNotes" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-shaka-util] › ℹ  Start step "prepare" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-shaka] › ✔  Completed step "generateNotes" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-shaka] › ℹ  Start step "prepare" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-ui] › ✔  Completed step "generateNotes" of plugin "Inline plugin"
[12:46:08 PM] [@tv4/web-player-ui] › ℹ  Start step "prepare" of plugin "Inline plugin"
@tv4/web-player-shaka-util
v2.1.4
[12:46:36 PM] [@tv4/web-player-shaka-util] › ✔  Completed step "prepare" of plugin "Inline plugin"
[12:46:36 PM] [@tv4/web-player-shaka-util] › ℹ  Start step "generateNotes" of plugin "Inline plugin"
[12:46:36 PM] [@tv4/web-player-shaka-util] › ✔  Completed step "generateNotes" of plugin "Inline plugin"
[12:46:38 PM] [@tv4/web-player-shaka-util] › ✔  Created tag @tv4/web-player-shaka-util@2.1.4
[12:46:38 PM] [@tv4/web-player-shaka-util] › ℹ  Start step "publish" of plugin "Inline plugin"

> @tv4/web-player-shaka-util@2.1.4 prepublishOnly
> yarn build:ci

$ webpack --config webpack.prod.js && tsc -p tsconfig.json --emitDeclarationOnly
asset shaka-util.min.js 5.89 KiB [compared for emit] [minimized] (name: main) 1 related asset
orphan modules 11.7 KiB [orphan] 10 modules
runtime modules 937 bytes 4 modules
./src/index.ts + 10 modules 11.9 KiB [not cacheable] [built] [code generated]
webpack 5.70.0 compiled successfully in 1393 ms
npm notice 
npm notice 📦  @tv4/web-player-shaka-util@2.1.4
npm notice === Tarball Contents === 
npm notice 70B    .babelrc                                                  
npm notice 74B    .yarnignore                                               
npm notice 69B    .yarnrc                                                   
npm notice 2.9kB  CHANGELOG.md                                              
npm notice 1.9kB  README.md                                                 
npm notice 6.0kB  dist/shaka-util.min.js                                    
npm notice 20.7kB dist/shaka-util.min.js.map                                
npm notice 41B    dist/typings/constants.d.ts                               
npm notice 234B   dist/typings/error-handling/error-code-override.d.ts      
npm notice 762B   dist/typings/error-handling/shaka-error-converter.d.ts    
npm notice 126B   dist/typings/error-handling/shaka-error-description.d.ts  
npm notice 153B   dist/typings/error-handling/shaka-to-youbora-category.d.ts
npm notice 1.1kB  dist/typings/error-handling/types.d.ts                    
npm notice 311B   dist/typings/index.d.ts                                   
npm notice 42B    dist/typings/network-filter/index.d.ts                    
npm notice 234B   dist/typings/network-filter/session-timeout-filter.d.ts   
npm notice 1.1kB  package.json                                              
npm notice 31B    src/@types/global.d.ts                                    
npm notice 33B    src/constants.ts                                          
npm notice 2.6kB  src/error-handling/error-code-override.ts                 
npm notice 6.1kB  src/error-handling/shaka-error-converter.ts               
npm notice 957B   src/error-handling/shaka-error-description.ts             
npm notice 830B   src/error-handling/shaka-to-youbora-category.ts           
npm notice 1.1kB  src/error-handling/types.ts                               
npm notice 322B   src/index.ts                                              
npm notice 42B    src/network-filter/index.ts                               
npm notice 673B   src/network-filter/session-timeout-filter.ts              
npm notice 115B   tsconfig.json                                             
npm notice 352B   webpack.analyze.js                                        
npm notice 512B   webpack.prod.js                                           
npm notice === Tarball Details === 
npm notice name:          @tv4/web-player-shaka-util              
npm notice version:       2.1.4                                   
npm notice filename:      @tv4/web-player-shaka-util-2.1.4.tgz    
npm notice package size:  14.5 kB                                 
npm notice unpacked size: 49.4 kB                                 
npm notice shasum:        b8fca515305b95ed59d2364ac10479a76c92ada2
npm notice integrity:     sha512-7wyjRyyfuHdn0[...]igK1rAYElPjrg==
npm notice total files:   30                                      
npm notice 
npm notice Publishing to https://npm.pkg.github.com/
+ @tv4/web-player-shaka-util@2.1.4
Done in 58.80s.
martinstark commented 2 years ago

Downgrading to 3.17.1 successfully released all 5 packages, with the same versions detected in the unsuccessful runs on 5.0.3.

antongolub commented 2 years ago

@antongolub is there documentation describing how to add fixtures, or do I have to study what's there to try to understand what I need to do?

@martinstark,

Any of:

martinstark commented 2 years ago

@antongolub I set up a minimum fixture and wrote new test for the case described in the opening post and could not reproduce it in the test suite. The test I wrote are very similar to, if not the same as, the already existing yarnWorkspaces2Packages test, so it's probably not worth me creating a PR for it.

I'll see if I can strip out all the source code in our repo and publish it publicly with the same setup.

martinstark commented 1 year ago

We recently moved to Yarn Berry and a more modern Node version, and with it bumped multi-semantic-release. I was worried we'd see this issue again, but releases have been running perfectly since the migration with the latest multi version. This issue might be related to yarn v1, as we were originally locked in on v1.19.1 due to workspace bugs introduced in later v1 versions.

This issue could probably be closed, as I won't be following up on creating reproducible samples.