-
Notifications
You must be signed in to change notification settings - Fork 88
CLOUDP-114066: [MongoCLI] The json file of the download center doesn’t contain the release version #1008
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
Conversation
VERSION=$(git describe | cut -d "v" -f 2) | ||
|
||
go run ../internal/release/main.go "${VERSION}" "${FEED_FILE_NAME}" | ||
go run ../internal/release/main.go --version "$(git describe | cut -d "v" -f 2)" --file "${FEED_FILE_NAME}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git describe may not work anymore with a mono repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the JSON files generated by the package tasks it seems to work properly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have also made some tests locally and on evergreen and I haven’t found any issue with git describe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry what I mean is that git describe will get you the latest tag, for now it works since we only release one thing, this may become flaky later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification!
I don't think this is an issue: you are right that the tag returned by git describe will be different when releasing atlascli v0.0.1 as the mongocli.json
file will contain the version 0.0.1 when running the packaging tasks. However, this won't happen when running releasing tasks as the latest tag will always be the correct one. Let me know if I am missing something here. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not missing much and why I say may become flaky, race conditions may happen if releasing both the same day
Also this leaves us in a position where master json files will always point to latest, ie, when we do 0.0.1 of atlas we'll have the mongocli json with 0.0.1 as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to create a ticket to see how to fix this issue. I will start working on it once I have pre-released atlascli
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
func Builder() *cobra.Command { | ||
opts := Opts{} | ||
cmd := &cobra.Command{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[non-blocking] using cobra for this is an overkill if you ask me, you could've used pflags with no need to bring cobra as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks for fixing the flags
Proposed changes
Jira ticket: CLOUDP-114066
Checklist
make fmt
and formatted my codeFurther comments
Issue: We are not adding the release version when generating the download center json file.
New download center JSON files: