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

sg: add command to fetch versions from release registry#63079

Merged
burmudar merged 1 commit into
mainfrom
wb/sg/release-registry
Jun 4, 2024
Merged

sg: add command to fetch versions from release registry#63079
burmudar merged 1 commit into
mainfrom
wb/sg/release-registry

Conversation

@burmudar

@burmudar burmudar commented Jun 4, 2024

Copy link
Copy Markdown
Contributor

Added a small command to fetch a list of versions from the release registry

  • Output the list of versions with some cherry picked information
  • Allow one to output the list in json and since the fancy stuff printed on stderr you can sg release registry list --format json | jq '.[] | .version

Test plan

Tested locally

go run ./dev/sg release registry list
✅ Fetched 31 versions from release registry
ID  Product             Version     Created                SHA
42  docker              v5.4.4217   2024-06-01T00:06:23Z   8826b10639682f465d365f7957a0f71014135dce
41  sourcegraph         v5.4.4217   2024-05-31T23:20:01Z   21cfcfea8dcf31d2a2a9c39d67c1e154a8c0e6c9
40  sourcegraph         v5.4.3842   2024-05-29T21:04:17Z   17a5fdb1d280ffe99f352a05967dbb89a09d692e
39  k8s                 v5.4.3643   2024-05-28T19:18:40Z   322774df4f817237eb57b006a790a09090e72a24
38  docker              v5.4.3643   2024-05-28T19:17:50Z   11fb53c977c6afa247ae1d7a954446eb6fce4a89
36  helm                v5.4.3643   2024-05-28T19:08:47Z   2db46988852c5381632279238886454ba8f65ae0
35  deploy-sourcegraph  v5.4.3643   2024-05-28T19:06:15Z   41f05b684a0e6d3a22143611f48e47a598993bb0
33  sourcegraph         v5.4.3643   2024-05-28T18:59:10Z   3083588ca5a94bad8ff816c1beab3232b7777bca

Filtering

sg release registry list --format json | jq '.[] | .version'
Fetching versions from the release registry......
✅ Fetched 31 versions from release registry
"v5.4.4217"
"v5.4.4217"
"v5.4.3842"
"v5.4.3643"

Changelog

  • add sg release registry list to list versions from the release registry

added a commnad to list versions from the release registry
@burmudar burmudar requested review from a team June 4, 2024 15:37
@burmudar burmudar self-assigned this Jun 4, 2024
@cla-bot cla-bot Bot added the cla-signed label Jun 4, 2024
@craigfurman craigfurman requested review from a team and craigfurman and removed request for a team June 4, 2024 15:38

@craigfurman craigfurman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@burmudar burmudar merged commit 8f3a9d5 into main Jun 4, 2024
@burmudar burmudar deleted the wb/sg/release-registry branch June 4, 2024 15:42
@BolajiOlajide

Copy link
Copy Markdown
Contributor

Very minor suggestion, but I think this should be sg release list as opposed to sg release registry list.
Curious to hear your thoughts on this.

@burmudar

burmudar commented Jun 5, 2024

Copy link
Copy Markdown
Contributor Author

Very minor suggestion, but I think this should be sg release list as opposed to sg release registry list. Curious to hear your thoughts on this.

Happy to move it! Only reason why I did it this way was to make it clear where the information was coming from. Since I figured that sg release list could be misconstruded to think that it operates on the local repo to determine the releases

@craigfurman

Copy link
Copy Markdown
Contributor

Loosely-held opinion, but I agree with @BolajiOlajide. Encapsulation is good - it doesn't really matter where the data comes from. I happily approved the PR of course, because an improvement is an improvement! 😁

@burmudar

burmudar commented Jun 5, 2024

Copy link
Copy Markdown
Contributor Author

Loosely-held opinion, but I agree with @BolajiOlajide. Encapsulation is good - it doesn't really matter where the data comes from. I happily approved the PR of course, because an improvement is an improvement! 😁

🚀 Lemme move it 🚚

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.

3 participants