question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Manual release broken

See original GitHub issue

Projen version: 0.58.14

I recently upgraded projen to version 0.58.14 from 0.56.13 and it broke my manual release. I would get the error Error: Unable to determine version from /builds/Yivs1cyf/0/Eturi/devops/cdkconstructs/typescript/eks/dist/version.txt. Cannot proceed with changelog update. Did you run 'bump'? It appears that the bump task was not writing out dist/version.txt, but was writing out dist/dist/version.txt (same for changelog and releasetag). The only difference I found was the release » build » package command changed from if [ ! -z ${CI} ]; then mkdir -p dist && rsync -a . dist --exclude .git --exclude node_modules; else npx projen package-all; fi to | if [ ! -z ${CI} ]; then rsync -a . .repo --exclude .git --exclude node_modules && rm -rf dist && mv .repo dist; else npx projen package-all; fi. Doesn’t seem relevant to this issue though. Rolling back to 0.56.13 resolved the issue. I did not see anything in the changelogs that would account for this.

Below is the failed build output from ci (GitLab):

$ yarn release
yarn run v1.22.17
warning package.json: "dependencies" has dependency "aws-cdk-lib" with range "^2.22.0" that collides with a dependency in "devDependencies" of the same name with version "2.22.0"
warning package.json: "dependencies" has dependency "constructs" with range "^10.0.5" that collides with a dependency in "devDependencies" of the same name with version "10.0.5"
warning ../package.json: No license field
warning ../../../../../../../../package.json: No license field
$ npx projen release
👾 release | rm -fr dist
👾 release » bump | condition: ! git log --oneline -1 | grep -q "chore(release):"
👾 release » bump | /usr/local/bin/node /builds/Yivs1cyf/0/Eturi/devops/cdkconstructs/typescript/eks/node_modules/projen/lib/release/bump-version.task.js
👾 Update /builds/Yivs1cyf/0/Eturi/devops/cdkconstructs/typescript/eks/package.json to latest resolved version: 0.1.11
👾 Tags listed on current commit: 
✔ bumping version in /builds/Yivs1cyf/0/Eturi/devops/cdkconstructs/typescript/eks/package.json from 0.1.11 to 0.1.12
✔ created /builds/Yivs1cyf/0/Eturi/devops/cdkconstructs/typescript/eks/dist/changelog.md
✔ outputting changes to /builds/Yivs1cyf/0/Eturi/devops/cdkconstructs/typescript/eks/dist/changelog.md
👾 release » build » default | node .projenrc.js
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
👾 release » build » compile | jsii --silence-warnings=reserved-word
👾 release » build » post-compile » docgen | jsii-docgen -o API.md
👾 release » build » test | jest --passWithNoTests --all --updateSnapshot
PASS test/default.test.ts (7.21 s)
  DefaultStack
    ✓ test default (536 ms)
------------------|---------|----------|---------|---------|---------------------------------------------------------
File              | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                                       
------------------|---------|----------|---------|---------|---------------------------------------------------------
All files         |    38.2 |     47.2 |      25 |      40 |                                                         
 eks-construct.ts |    37.5 |     47.2 |      25 |   39.28 | 140,162,[181](https://gitlab.com/Eturi/devops/cdkconstructs/-/jobs/2596842822#L181)-[182](https://gitlab.com/Eturi/devops/cdkconstructs/-/jobs/2596842822#L182),[185](https://gitlab.com/Eturi/devops/cdkconstructs/-/jobs/2596842822#L185),[189](https://gitlab.com/Eturi/devops/cdkconstructs/-/jobs/2596842822#L189),[191](https://gitlab.com/Eturi/devops/cdkconstructs/-/jobs/2596842822#L191),194,196,203,228-279,301-762 
 index.ts         |     100 |      100 |     100 |     100 |                                                         
------------------|---------|----------|---------|---------|---------------------------------------------------------
Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        7.66 s
Ran all test suites.
👾 release » build » test » eslint | eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern src test build-tools .projenrc.js
👾 release » build » package | if [ ! -z ${CI} ]; then rsync -a . .repo --exclude .git --exclude node_modules && rm -rf dist && mv .repo dist; else npx projen package-all; fi
👾 release » unbump | /usr/local/bin/node /builds/Yivs1cyf/0/Eturi/devops/cdkconstructs/typescript/eks/node_modules/projen/lib/release/reset-version.task.js
👾 release | git diff --ignore-space-at-eol --exit-code
👾 release » publish:git | /usr/local/bin/node /builds/Yivs1cyf/0/Eturi/devops/cdkconstructs/typescript/eks/node_modules/projen/lib/release/update-changelog.task.js
Error: Unable to determine version from /builds/Yivs1cyf/0/Eturi/devops/cdkconstructs/typescript/eks/dist/version.txt. Cannot proceed with changelog update. Did you run 'bump'?
    at Object.updateChangelog (/builds/Yivs1cyf/0/Eturi/devops/cdkconstructs/typescript/eks/node_modules/projen/lib/release/update-changelog.js:24:15)
👾 Task "release » publish:git" failed when executing "/usr/local/bin/node /builds/Yivs1cyf/0/Eturi/devops/cdkconstructs/typescript/eks/node_modules/projen/lib/release/update-changelog.task.js" (cwd: /builds/Yivs1cyf/0/Eturi/devops/cdkconstructs/typescript/eks)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Running after_script
00:01
Running after script...
$ cd typescript/${DIR}
$ find . -not -path '*/node_modules/*'
.
./.eslintrc.json
./.gitattributes
./.github
./.github/pull_request_template.md
./.github/workflows
./.github/workflows/pull-request-lint.yml
./.github/workflows/upgrade-master.yml
./.gitignore
./.npmignore
./.projen
./.projen/deps.json
./.projen/files.json
./.projen/tasks.json
./.projenrc.js
./API.md
./CHANGELOG.md
./LICENSE
./README.md
./default.test.ts
./package.json
./src
./src/eks-construct.ts
./src/index.ts
./test
./test/default.test.ts
./tsconfig.dev.json
./tsconfig.eslint.json
./tsconfig.jest.json
./yarn.lock
./node_modules
./tsconfig.json
./.jsii
./lib
./lib/eks-construct.js
./lib/eks-construct.d.ts
./lib/index.js
./lib/index.d.ts
./lib/tsconfig.tsbuildinfo
./coverage
./coverage/coverage-final.json
./coverage/lcov.info
./coverage/lcov-report
./coverage/lcov-report/base.css
./coverage/lcov-report/block-navigation.js
./coverage/lcov-report/favicon.png
./coverage/lcov-report/sort-arrow-sprite.png
./coverage/lcov-report/sorter.js
./coverage/lcov-report/prettify.css
./coverage/lcov-report/prettify.js
./coverage/lcov-report/index.html
./coverage/lcov-report/eks-construct.ts.html
./coverage/lcov-report/index.ts.html
./coverage/clover.xml
./coverage/cobertura-coverage.xml
./test-reports
./test-reports/junit.xml
./dist
./dist/.github
./dist/.github/workflows
./dist/.github/workflows/pull-request-lint.yml
./dist/.github/workflows/upgrade-master.yml
./dist/.github/pull_request_template.md
./dist/.projen
./dist/.projen/deps.json
./dist/.projen/files.json
./dist/.projen/tasks.json
./dist/coverage
./dist/coverage/lcov-report
./dist/coverage/lcov-report/base.css
./dist/coverage/lcov-report/block-navigation.js
./dist/coverage/lcov-report/eks-construct.ts.html
./dist/coverage/lcov-report/favicon.png
./dist/coverage/lcov-report/index.html
./dist/coverage/lcov-report/index.ts.html
./dist/coverage/lcov-report/prettify.css
./dist/coverage/lcov-report/prettify.js
./dist/coverage/lcov-report/sort-arrow-sprite.png
./dist/coverage/lcov-report/sorter.js
./dist/coverage/clover.xml
./dist/coverage/cobertura-coverage.xml
./dist/coverage/coverage-final.json
./dist/coverage/lcov.info
./dist/dist
./dist/dist/changelog.md
./dist/dist/releasetag.txt
./dist/dist/version.txt
./dist/lib
./dist/lib/eks-construct.d.ts
./dist/lib/eks-construct.js
./dist/lib/index.d.ts
./dist/lib/index.js
./dist/lib/tsconfig.tsbuildinfo
./dist/src
./dist/src/eks-construct.ts
./dist/src/index.ts
./dist/test-reports
./dist/test-reports/junit.xml
./dist/test
./dist/test/default.test.ts
./dist/.eslintrc.json
./dist/.gitattributes
./dist/.gitignore
./dist/.jsii
./dist/.npmignore
./dist/.projenrc.js
./dist/API.md
./dist/CHANGELOG.md
./dist/LICENSE
./dist/README.md
./dist/default.test.ts
./dist/package.json
./dist/tsconfig.dev.json
./dist/tsconfig.eslint.json
./dist/tsconfig.jest.json
./dist/tsconfig.json
./dist/yarn.lock
$ cat dist/version.txt
cat: can't open 'dist/version.txt': No such file or directory

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
gradybarrettcommented, Jun 24, 2022

Depending on how your build workflow works you can try emptying the CI environment variable when running projen release, to avoid triggering the rsync, and instead just run package:all like happens locally. This works for us because all our tasks get executed in the same build container:

CI= projen release

I feel like Jsii project is assuming a release workflows a bit too much. The fact that it messes with the dist structure means that other tasks can’t rely on it being predictable. So I wonder if the stuff that’s in the CI conditional should be moved into the workflow model… 🤔

1reaction
jwsomiscommented, Jun 27, 2022

@gradybarrett It is an AwsCdkConstructLibrary, so it is JSII. I think you’re right that that fix would work for us as well. I’ll test it when I get the time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What To Do About A Damaged Manual Garage Door Release
The manual release handle may break off or crack. It may corrode or rust, making it difficult to maneuver. In some cases, the...
Read more >
How to Release and Reset the Emergency Cord on a Garage ...
1. Door Must Be in Down Position · 2. Pull the Emergency Release Cord · 3. Manually Move the Garage Door and Return...
Read more >
How do you replace the broken emergency release - Fixya
If the spring is ok, then release the emergency pull rope, red handle. Now move the door up and down by hand and...
Read more >
Garage Door Opener Running But Not Opening
1: Disengage the emergency release. ... Once you have done this try to manually open your garage door. ... Broken garage door springs...
Read more >
How to Open a Garage Door Manually When Your Opener is ...
Turn the key in the slot then pull the entire lock mechanism toward you. · The tumbler should come out with an emergency...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found