-
Notifications
You must be signed in to change notification settings - Fork 249
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
createGithubReleases: true -> body is too long (max is 125000 characters) #304
Comments
This is not supposed to happen - if it happens then it should be considered a bug.
This is kinda what we do, IIRC. Could you recheck with the source code and your |
@Andarist OK I know why it's happening The top level entry in the CHANGELOG for the package that I was releasing is: # Change Log
## 2.5.0-rc.1
### Minor Changes
- some changes here however, the
This means that there is no changelog entry for the new manually changed 2.5.0-rc.2 The action is trying to push the whole CHANGELOG.md due to the implementation of getChangelogEntry. Here's a repro case where getChangelogEntry unexpectedly (?) returns the whole changelog: const contents = `
# Change Log
## 2.5.0-rc.2
### Minor Changes
- Changes from rc2
## 2.5.0-rc.1
### Minor Changes
- Changes from rc1
`
// rc.3 is not present in the changelog above, unlike rc.1 and rc.2
const versionThatDoesntExistInTheChangelog = '2.5.0-rc.3'
console.log(getChangelogEntry(contents, versionThatDoesntExistInTheChangelog)) Output of console.log (click to expand){
content: '# Change Log\n' +
'\n' +
'## 2.5.0-rc.2\n' +
'\n' +
'### Minor Changes\n' +
'\n' +
'- Changes from rc2\n' +
'\n' +
'## 2.5.0-rc.1\n' +
'\n' +
'### Minor Changes\n' +
'\n' +
'- Changes from rc1\n',
highestLevel: 2
} On one hand, I broke the repo (from changesets/action perspective) on my own wish due to the version bump commit to main, but on the other hand, I guess Perhaps a console.info saying "Can't find current package version in changelog, defaulting to whole changelog"? Additionally, in the case above, the |
* ci: build, lint and test on ci * ci: add release action * ci: cache coverage * ci: use inputs for sonarcloud * ci: use envs for inputs * ci: use env for inputs * ci: another try with inputs * ci: fix syntax * ci: add inputs * refactor: clean blank lines * ci: separate actions for sonarcloud * ci: fix separate actions for sonarcloud * ci: fix sonarcloud secrets * ci: add project name * ci: fix project name * ci: add ci name * ci: test structure * ci: download artifacts to root * ci: remove coverage * ci: collect coverage from integration tests * ci: prepare cd action * ci: use main * fix: input not required * fix: use enterprise flag as input * ci: remove publish script * don't install husky git hooks when releasing why would you do that? certain hooks like pre-commit (for the repos that still use the stupid `commitizen`) the release will outright fail * chore: don't use yarn built-in script because it doesn't shadow (#7) * don't create github releases when publishing changesets/action@v1 will try to create a GitHub release in the repo when publishing a new package version. changesets/action@v1 tries to publish the release using the entire contents of the CHANGELOG.md as release description. The changelog file is taken from the package folder that it's publishing. See here for the code: https://github.com/changesets/action/blob/main/src/run.ts#L66-L68 The max char limit of the release description is 125,000 characters. The problem is many of our packages actually have longer changelogs than 125,000. For example this one has 200k characters: https://github.com/vuestorefront/bigcommerce/blob/main/packages/api-client/CHANGELOG.md I admit Github releases would be very useful for e.g. registering the Slack-Github bot in a customer's channel to let them now a new package release had happened. Unfortunately, I can't really remove the changelog because it contains important historical information. For now, I'm disabling creation of github releases and waiting for changesets to implement truncation: changesets/action#174 (comment) * chore: add codeowners for PR notifications * allow publishing OSS packages (#12) * log in in open source packages too in open source packages, we often publish to NPM. To do that, we need to log in (so that changesets/actions know how to publish) * publish using NPM_TOKEN if not enterprise * re-enable creating gh releases see changesets/action#304 (comment) * stop linting pr title with conventional commits we use changesets now so it's not necessary * add abillity to inject environment variables for use by unified ci (#4) * feat: allow setting env var Sometimes, running `yarn test` can require env variables, e.g. in the case of integration test * ci: use alternative solution --------- Co-authored-by: Wojciech Sikora <35867383+WojtekTheWebDev@users.noreply.github.com> * BREAKING don't log into private repo if it's not necessary !! THIS WILL BREAK EXISTING REPOS !! Before this commit, the repos running the CI action had no choice but always log into our private NPM repo using NPM_USER and NPM_PASS secrets. If you didn't have those secrets, the CI would fail. The error that caused the failure was that "NPM_PASS" is not defined as a secret. Of course it's not, because there's no reason to log in to any NPM repository in a public package, since npmjs is public. After this commit, the CI action doesn't log in into verdaccio by default. For repos like magento2 which are public, and don't use private pacakges, this doesn't make sense. Especially now that we use NPM_RELEASE_TOKEN secret for releases (which allows you to publish without having to provide NPM_USER and NPM_PASS), passing NPM_USER and NPM_PASS for a public repo makes even less sense. --- The breaking change comes from the fact that in private GH repos where the CI workflow is reused without explicitly passing the param "enterprise: true" (it's not passed because this argument didn't exist before this commit), will now default to "enterprise: false". This will break our private GitHub repos that need to `npm install` private vsf packages to work. It will break because the CI NPM will not be logged in. * remove unused ENVIRONMENT_VARIABLES input I don't know how this got here, this is entirely unused * remove unused sonarcloud vars sonarcloud-related stuff lives in sonarcloud.yml now * NPM_* secrets are used only if enterprise = true, so should be optional * feat: add node versions matrix input --------- Co-authored-by: Wojciech Sikora <wsikora@vuestorefront.io> Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> Co-authored-by: Wojciech Sikora <35867383+WojtekTheWebDev@users.noreply.github.com> Co-authored-by: Artur Tagisow <atagisow@vuestorefront.io> Co-authored-by: John Doe <john.doe@gmail.com>
Closing as stale. Workaround is described above. |
* ci: build, lint and test on ci * ci: add release action * ci: cache coverage * ci: use inputs for sonarcloud * ci: use envs for inputs * ci: use env for inputs * ci: another try with inputs * ci: fix syntax * ci: add inputs * refactor: clean blank lines * ci: separate actions for sonarcloud * ci: fix separate actions for sonarcloud * ci: fix sonarcloud secrets * ci: add project name * ci: fix project name * ci: add ci name * ci: test structure * ci: download artifacts to root * ci: remove coverage * ci: collect coverage from integration tests * ci: prepare cd action * ci: use main * fix: input not required * fix: use enterprise flag as input * ci: remove publish script * don't install husky git hooks when releasing why would you do that? certain hooks like pre-commit (for the repos that still use the stupid `commitizen`) the release will outright fail * chore: don't use yarn built-in script because it doesn't shadow (#7) * don't create github releases when publishing changesets/action@v1 will try to create a GitHub release in the repo when publishing a new package version. changesets/action@v1 tries to publish the release using the entire contents of the CHANGELOG.md as release description. The changelog file is taken from the package folder that it's publishing. See here for the code: https://github.com/changesets/action/blob/main/src/run.ts#L66-L68 The max char limit of the release description is 125,000 characters. The problem is many of our packages actually have longer changelogs than 125,000. For example this one has 200k characters: https://github.com/vuestorefront/bigcommerce/blob/main/packages/api-client/CHANGELOG.md I admit Github releases would be very useful for e.g. registering the Slack-Github bot in a customer's channel to let them now a new package release had happened. Unfortunately, I can't really remove the changelog because it contains important historical information. For now, I'm disabling creation of github releases and waiting for changesets to implement truncation: changesets/action#174 (comment) * chore: add codeowners for PR notifications * allow publishing OSS packages (#12) * log in in open source packages too in open source packages, we often publish to NPM. To do that, we need to log in (so that changesets/actions know how to publish) * publish using NPM_TOKEN if not enterprise * re-enable creating gh releases see changesets/action#304 (comment) * stop linting pr title with conventional commits we use changesets now so it's not necessary * add abillity to inject environment variables for use by unified ci (#4) * feat: allow setting env var Sometimes, running `yarn test` can require env variables, e.g. in the case of integration test * ci: use alternative solution --------- Co-authored-by: Wojciech Sikora <35867383+WojtekTheWebDev@users.noreply.github.com> * BREAKING don't log into private repo if it's not necessary !! THIS WILL BREAK EXISTING REPOS !! Before this commit, the repos running the CI action had no choice but always log into our private NPM repo using NPM_USER and NPM_PASS secrets. If you didn't have those secrets, the CI would fail. The error that caused the failure was that "NPM_PASS" is not defined as a secret. Of course it's not, because there's no reason to log in to any NPM repository in a public package, since npmjs is public. After this commit, the CI action doesn't log in into verdaccio by default. For repos like magento2 which are public, and don't use private pacakges, this doesn't make sense. Especially now that we use NPM_RELEASE_TOKEN secret for releases (which allows you to publish without having to provide NPM_USER and NPM_PASS), passing NPM_USER and NPM_PASS for a public repo makes even less sense. --- The breaking change comes from the fact that in private GH repos where the CI workflow is reused without explicitly passing the param "enterprise: true" (it's not passed because this argument didn't exist before this commit), will now default to "enterprise: false". This will break our private GitHub repos that need to `npm install` private vsf packages to work. It will break because the CI NPM will not be logged in. * remove unused ENVIRONMENT_VARIABLES input I don't know how this got here, this is entirely unused * remove unused sonarcloud vars sonarcloud-related stuff lives in sonarcloud.yml now * NPM_* secrets are used only if enterprise = true, so should be optional * feat: add node versions matrix input --------- Co-authored-by: Wojciech Sikora <wsikora@vuestorefront.io> Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> Co-authored-by: Wojciech Sikora <35867383+WojtekTheWebDev@users.noreply.github.com> Co-authored-by: Artur Tagisow <atagisow@vuestorefront.io> Co-authored-by: John Doe <john.doe@gmail.com>
* ci: build, lint and test on ci * ci: add release action * ci: cache coverage * ci: use inputs for sonarcloud * ci: use envs for inputs * ci: use env for inputs * ci: another try with inputs * ci: fix syntax * ci: add inputs * refactor: clean blank lines * ci: separate actions for sonarcloud * ci: fix separate actions for sonarcloud * ci: fix sonarcloud secrets * ci: add project name * ci: fix project name * ci: add ci name * ci: test structure * ci: download artifacts to root * ci: remove coverage * ci: collect coverage from integration tests * ci: prepare cd action * ci: use main * fix: input not required * fix: use enterprise flag as input * ci: remove publish script * don't install husky git hooks when releasing why would you do that? certain hooks like pre-commit (for the repos that still use the stupid `commitizen`) the release will outright fail * chore: don't use yarn built-in script because it doesn't shadow (#7) * don't create github releases when publishing changesets/action@v1 will try to create a GitHub release in the repo when publishing a new package version. changesets/action@v1 tries to publish the release using the entire contents of the CHANGELOG.md as release description. The changelog file is taken from the package folder that it's publishing. See here for the code: https://github.com/changesets/action/blob/main/src/run.ts#L66-L68 The max char limit of the release description is 125,000 characters. The problem is many of our packages actually have longer changelogs than 125,000. For example this one has 200k characters: https://github.com/vuestorefront/bigcommerce/blob/main/packages/api-client/CHANGELOG.md I admit Github releases would be very useful for e.g. registering the Slack-Github bot in a customer's channel to let them now a new package release had happened. Unfortunately, I can't really remove the changelog because it contains important historical information. For now, I'm disabling creation of github releases and waiting for changesets to implement truncation: changesets/action#174 (comment) * chore: add codeowners for PR notifications * allow publishing OSS packages (#12) * log in in open source packages too in open source packages, we often publish to NPM. To do that, we need to log in (so that changesets/actions know how to publish) * publish using NPM_TOKEN if not enterprise * re-enable creating gh releases see changesets/action#304 (comment) * stop linting pr title with conventional commits we use changesets now so it's not necessary * add abillity to inject environment variables for use by unified ci (#4) * feat: allow setting env var Sometimes, running `yarn test` can require env variables, e.g. in the case of integration test * ci: use alternative solution --------- Co-authored-by: Wojciech Sikora <35867383+WojtekTheWebDev@users.noreply.github.com> * BREAKING don't log into private repo if it's not necessary !! THIS WILL BREAK EXISTING REPOS !! Before this commit, the repos running the CI action had no choice but always log into our private NPM repo using NPM_USER and NPM_PASS secrets. If you didn't have those secrets, the CI would fail. The error that caused the failure was that "NPM_PASS" is not defined as a secret. Of course it's not, because there's no reason to log in to any NPM repository in a public package, since npmjs is public. After this commit, the CI action doesn't log in into verdaccio by default. For repos like magento2 which are public, and don't use private pacakges, this doesn't make sense. Especially now that we use NPM_RELEASE_TOKEN secret for releases (which allows you to publish without having to provide NPM_USER and NPM_PASS), passing NPM_USER and NPM_PASS for a public repo makes even less sense. --- The breaking change comes from the fact that in private GH repos where the CI workflow is reused without explicitly passing the param "enterprise: true" (it's not passed because this argument didn't exist before this commit), will now default to "enterprise: false". This will break our private GitHub repos that need to `npm install` private vsf packages to work. It will break because the CI NPM will not be logged in. * remove unused ENVIRONMENT_VARIABLES input I don't know how this got here, this is entirely unused * remove unused sonarcloud vars sonarcloud-related stuff lives in sonarcloud.yml now * NPM_* secrets are used only if enterprise = true, so should be optional * feat: add node versions matrix input --------- Co-authored-by: Wojciech Sikora <wsikora@vuestorefront.io> Co-authored-by: Artur Tagisow <5359825+sethidden@users.noreply.github.com> Co-authored-by: Wojciech Sikora <35867383+WojtekTheWebDev@users.noreply.github.com> Co-authored-by: Artur Tagisow <atagisow@vuestorefront.io> Co-authored-by: John Doe <john.doe@gmail.com>
This is #174 but instead of PR descriptions it's about GitHUb release descriptions being too long when
createGithubReleases
is trueClick to expand
logs from changesets/action@v1
Indeed, my CHANGELOG.md is 231,000 and 609,000 lines long respectively (depends on which one you use :P), which is higher than the 125,000 limit imposed by GitHub.
I assume this is due to the fact that changesets/action created a release using the entire contents of CHANGELOG.md (which would have the changesets removed from repo and applied to changelog)? I guess it'd be possible to write some hacky regex to publish only the latest markdown headline, so it always shows only the latest version in the release.
This was actually discussed here as well #157 (comment)
I know this error was described as highly unlikely to happen in the above link, but it's legitimately happening to us. This is a 2 year old project that used to use the conventional commits PR generator, and the changelog is legitimately this large.
The text was updated successfully, but these errors were encountered: