-
Notifications
You must be signed in to change notification settings - Fork 229
feat(save-user-data): extend user data abstract class for api backend COMPASS-9558 #7114
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
base: main
Are you sure you want to change the base?
Conversation
Merge branch 'user-data-interface' of https://github.com/mongodb-js/compass into user-data-interface
Merge branch 'extend-user-data' of https://github.com/mongodb-js/compass into extend-user-data
} | ||
|
||
return true; | ||
} catch (error) { |
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.
How does the logging look? Are there any changes that I should make to make this more consistent with Compass behavior?
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.
Pull Request Overview
This PR extends the user data abstract class system by implementing a new AtlasUserData
class that communicates with Atlas backend API endpoints for cloud-based user data storage, as an alternative to the existing file-based storage.
- Adds
AtlasUserData
class implementing theIUserData
interface for API-based storage - Includes comprehensive test coverage for all CRUD operations and URL construction
- Updates exports to make the new class available to consumers
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
packages/compass-user-data/src/user-data.ts | Implements AtlasUserData class with HTTP-based CRUD operations |
packages/compass-user-data/src/user-data.spec.ts | Adds comprehensive test suite for AtlasUserData functionality |
packages/compass-user-data/src/index.ts | Exports the new AtlasUserData class |
Merge branch 'extend-user-data' of https://github.com/mongodb-js/compass into extend-user-data
Merge branch 'main' into extend-user-data
Merge branch 'extend-user-data' of https://github.com/mongodb-js/compass into extend-user-data
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.
@gribnoysup @Anemy
Do you guys have any clue where these may have come from? I haven't personally modified any of them, so I wonder whether it's due to command line commands?
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.
Yeah, those are not really related. Probably accidentally run a compile command across all packages? We haven't updated this in a while, so I guess there might be some slight formatting variations or something, probably better to just revert those from your patch
@@ -6,9 +6,8 @@ export class HistoryStorage { | |||
userData; | |||
|
|||
constructor(basePath?: string) { | |||
this.userData = new FileUserData(z.string().array(), { | |||
this.userData = new FileUserData(z.string().array(), getAppName() ?? '', { | |||
// Todo: https://jira.mongodb.org/browse/COMPASS-7080 |
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.
Nit: this todo should probably still point at the getAppName()
part
Description
Extend the IUserData abstract class to create an AtlasUserData class that uses the endpoints created in CCS. Contains unit testing.
Checklist
Motivation and Context
Open Questions
See comments
Dependents
Types of changes