Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Conversation

@bobheadxi
Copy link
Member

For a bug noted in https://github.com/sourcegraph/sourcegraph/issues/16207, where providing an invalid version during the confirmation would cause a lot of pains. This change:

  • Removes cached version if validation fails
  • Improves error messages about release configuration
  • Adds a utility command for clearing the cache

Validated new behaviour by failing confirmation a few times before I get it right:

~/Projects/sourcegraph/sourcegraph main* 6s
❯ yarn run release release:status
yarn run v1.22.4
$ cd dev/release && yarn run release release:status
$ ../../node_modules/.bin/ts-node --transpile-only ./src/main.ts release:status
Please confirm the upcoming release version (configured: '3.23.0'): 3.21.0
Error: Provided version '3.21.0' and config.upcomingRelease '3.23.0' to not match - please update the release configuration at 'release-config.jsonc' and try again

~/Projects/sourcegraph/sourcegraph main*
❯ yarn run release release:status
yarn run v1.22.4
$ cd dev/release && yarn run release release:status
$ ../../node_modules/.bin/ts-node --transpile-only ./src/main.ts release:status
Please confirm the upcoming release version (configured: '3.23.0'): 3.22.0
Error: Provided version '3.22.0' and config.upcomingRelease '3.23.0' to not match - please update the release configuration at 'release-config.jsonc' and try again

~/Projects/sourcegraph/sourcegraph main* 7s
❯ yarn run release release:status
yarn run v1.22.4
$ cd dev/release && yarn run release release:status
$ ../../node_modules/.bin/ts-node --transpile-only ./src/main.ts release:status
Please confirm the upcoming release version (configured: '3.23.0'): 3.23.0
Using versions: { upcoming: 3.23.0, previous: 3.22.0 }

@codecov
Copy link

codecov bot commented Dec 12, 2020

Codecov Report

Merging #16689 (554cf3b) into main (59d5822) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main   #16689   +/-   ##
=======================================
  Coverage   52.45%   52.46%           
=======================================
  Files        1690     1690           
  Lines       84474    84474           
  Branches     7614     7671   +57     
=======================================
+ Hits        44314    44316    +2     
+ Misses      36259    36258    -1     
+ Partials     3901     3900    -1     
Flag Coverage Δ
go 51.85% <ø> (+<0.01%) ⬆️
integration 29.69% <ø> (ø)
storybook 28.06% <ø> (ø)
typescript 53.90% <ø> (ø)
unit 34.69% <ø> (ø)
Impacted Files Coverage Δ
.../internal/codeintel/resolvers/graphql/locations.go 85.56% <0.00%> (+2.06%) ⬆️

@bobheadxi bobheadxi linked an issue Dec 14, 2020 that may be closed by this pull request
14 tasks
Co-authored-by: Gonzalo Peci <pecigonzalo@users.noreply.github.com>
@bobheadxi bobheadxi changed the title dev(release): improve caching behaviour for version confirmation dev(release): fix caching behaviour for version confirmation Dec 15, 2020
@bobheadxi bobheadxi merged commit ff8e2b1 into main Dec 15, 2020
@bobheadxi bobheadxi deleted the release/caching branch December 15, 2020 14:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracking: release rough edges

3 participants