-
Notifications
You must be signed in to change notification settings - Fork 69
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
Conversation
* main: (34 commits) chore: update auto-generated files [skip actions] chore: update auto-generated files [skip actions] chore(ci): use github app tokens instead of bot user (#2282) chore: update auto-generated files [skip actions] chore(ci): cleanup auto generated file workflow MONGOSH-1927 (#2281) chore: update auto-generated files chore(ci): use a github app for the generated files credentials MONGOSH-1927 (#2280) chore(deps): bump driver, bson, oidc-plugin to latest MONGOSH-1916 (#2279) chore(ci): login to docker (#2277) chore(ci): don't download chrome for cron tasks (#2278) chore: update node.js (#2270) chore: push auto-generated files directly instead of using PRs (#2275) fix(ci): allocate more memory to fix test_vscode MONGOSH-1892 (#2239) chore: update auto-generated files (#2276) feat(shell-api): add options in stream processor start, stop, and drop MONGOSH-1920 (#2274) chore: update auto-generated files (#2273) chore: update auto-generated files (#2272) fix: include nonce in oidc request by default MONGOSH-1905 MONGOSH-1917 (#2269) chore(ci): filter for explictily set variants in unit tests (#2271) chore: update auto-generated files (#2268) ...
This is ready for review - I tested it with a custom S3 bucket and feel fairly confident that it works. The only remaining task is provisioning credentials for the downloads S3 bucket, adding them as a secret to GHA, and testing the workflow for updating the cta. Waiting on devprod there and I'll make sure to test it out before merging. |
@addaleax and @gagik, pinging you for another review as I had to rework nontrivially how the CTA config is read, because I realized we also needed it when publishing new mongosh versions. Now it's a simple json with an attached json schema that is properly validated at publishing time. All the fun changes are in I feel fairly confident this is now correct and ready for merging. |
Evergreen failures point to issues that exist on main, so going to go ahead and merge this. |
This adds support for fetching a greeting CTA via the versions json. The proposed design adds support for reading a
cta
field in the version objects:These are optional and nothing will be displayed if they're not present. If they are present and the version matches the current version, we'll format the chunks with their corresponding styles and display the message as part of the greeting.
Additionally, we add the following to the
update-metadata.json
:The greeting CTA for the current version based on package.json will be picked, but locally we're saving both the current and the latest version's CTAs to make it readily available once the user upgrades.