Skip to content
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

fix(logging): keep userId for old and new users MONGOSH-1143 #1229

Merged
merged 2 commits into from
Mar 15, 2022

Conversation

alenakhineika
Copy link
Contributor

@alenakhineika alenakhineika commented Mar 14, 2022

We need to keep userId for old and new users as well for backward compatibility with the older mongosh versions. If a user installed a newer version first, with code that is currently in main only anonymousId will be saved to a new config file. If the user then downgrades the version and tries to run mongosh, they will get the AssertionError: You must pass either an "anonymousId" or a "userId". error, because the config file stores only anonymousId, but the older version of mongosh doesn't know what it is and needs userId for telemetry.

@alenakhineika alenakhineika added the wip Work in Progress label Mar 14, 2022
Copy link
Contributor

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

Looks good! (with the changes to the package-lock.json files undone)

@alenakhineika
Copy link
Contributor Author

Yeah already on it, wrong node/npm locally.

@alenakhineika alenakhineika removed the wip Work in Progress label Mar 14, 2022
@alenakhineika alenakhineika merged commit 24c26b6 into main Mar 15, 2022
@alenakhineika alenakhineika deleted the MONGOSH-1143-keep-user-id-for-old-and-new-users branch March 15, 2022 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants