-
Notifications
You must be signed in to change notification settings - Fork 66
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
feat: add support for fetching a greeting CTA as part of the update flow MONGOSH-1897 #2254
Draft
nirinchev
wants to merge
4
commits into
main
Choose a base branch
from
ni/cta
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
awsAccessKeyId: process.env.DOWNLOAD_CENTER_AWS_KEY, | ||
awsSecretAccessKey: process.env.DOWNLOAD_CENTER_AWS_SECRET, | ||
ctas: { | ||
// Define the ctas per version here. '*' is the default cta which will be shown if there's no specific cta | ||
// for the current version. | ||
// '*': { | ||
// runs: [ | ||
// { text: 'Example', style: 'bold' }, | ||
// ] | ||
// }, | ||
// '1.2.3': { | ||
// runs: [ | ||
// { text: 'Example', style: 'mongosh:uri' }, | ||
// ] | ||
// } | ||
}, | ||
isDryRun: false, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back 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.
I think this is the only step in this approach that I don't fully follow – is the idea that we'd locally run the
update-cta
command? How would we get the credentials to access the relevant S3 bucket?We're definitely moving towards a world in which less and less access will be given to individual developers' machines, so I don't think this is something we could easily do, and we may just need to fall back to a variant in which we update the CTA entries along with the version feed during releases only – I think that would be okay though, we're generally free to do mongosh releases whenever necessary.
(In the future, we'll need to make sure that even this kind of flow where we update an existing file in S3 as part of the releases is supported – see e.g. https://jira.mongodb.org/browse/WRITING-16730)
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 was hoping we could decouple releases from CTA updates. I had the following in mind - let me know how it sounds:
cta.conf.js
is updated. This will have to go through the normal PR flow of accepting changes.main
, a github action triggers that has access to the S3 credentials through environment secrets and runs theupdate-cta
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.
We can do that but I think we'd be going for Evergreen rather than GHA here? That's the only platform I'd really expect to be available to access release infrastructure in the long run. I think we'd encounter some resistance if we wanted to put downloads.mongodb.com secrets into another CI environment
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.
We could sort it out - my personal preference is towards GHA and we already have a handful of products being signed and released with secrets stored in GHA, as well as all our code being hosted by github. That being said, if there's a strong desire to only do that on evergreen, we could work with those limitations - the important part here is that the flow of publishing CTA updates happens on CI and in a somewhat automated and reviewable fashion.