feat(calm-hub): refactored namespaces from simple string to full object and added description#2084
Conversation
|
@grahampacker-ms @willosborne could we have a wider discussion on the roadmap for CalmHub and how these individual changes align to how entitlements, immutable artifact repository, etc, are aligned? |
70d5a49 to
e3278ef
Compare
17a4b90 to
f366d11
Compare
|
@grahampacker-ms and I had a conversation. happy for this PR to proceed - in fact it is definitely necessary. |
There was a problem hiding this comment.
Pull request overview
This PR refactors the namespace representation from a simple string to a full object with name and description fields. This is a breaking change that enables future extensibility without additional breaking changes. The refactoring affects both the calm-hub backend and calm-hub-ui frontend.
Changes:
- Introduced a new
NamespaceInfoclass with name and description fields - Updated
NamespaceRequestto include a description field alongside the name field - Modified all store implementations (Nitrite and MongoDB) to handle the new namespace structure
- Updated database initialization scripts and integration tests to use the new format
- Adapted the UI service to extract name values from the new namespace objects
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| calm-hub/src/main/java/org/finos/calm/domain/namespaces/NamespaceInfo.java | New domain class representing namespace information with name and description |
| calm-hub/src/main/java/org/finos/calm/domain/NamespaceRequest.java | Updated to replace namespace field with name and added description field |
| calm-hub/src/main/java/org/finos/calm/store/NamespaceStore.java | Updated interface to return NamespaceInfo objects and accept separate name/description parameters |
| calm-hub/src/main/java/org/finos/calm/store/nitrite/NitriteNamespaceStore.java | Updated to store and retrieve namespace objects with name and description fields |
| calm-hub/src/main/java/org/finos/calm/store/mongo/MongoNamespaceStore.java | Updated to store and retrieve namespace objects with name and description fields |
| calm-hub/src/main/java/org/finos/calm/resources/NamespaceResource.java | Updated to handle the new namespace structure in API requests and responses |
| calm-hub/src/test/java/org/finos/calm/store/nitrite/TestNitriteNamespaceStoreShould.java | Updated tests to work with NamespaceInfo objects |
| calm-hub/src/test/java/org/finos/calm/store/mongo/TestMongoNamespaceStoreShould.java | Updated tests to work with NamespaceInfo objects |
| calm-hub/src/test/java/org/finos/calm/resources/TestNamespaceResourceShould.java | Updated tests for new API structure and removed redundant comments |
| calm-hub/src/integration-test/java/integration/PermittedScopesIntegration.java | Updated to verify both name and description fields in responses |
| calm-hub/src/integration-test/java/integration/MongoNamespaceIntegration.java | Updated to verify both name and description fields in responses |
| calm-hub/src/integration-test/java/integration/MongoSetup.java | Updated test data to include description field |
| calm-hub/mongo/init-mongo.js | Updated initialization script to use new namespace structure |
| calm-hub-ui/src/service/calm-service.tsx | Updated to extract name values from the new namespace object structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ct and added description # Conflicts: # package-lock.json
f366d11 to
d5884f6
Compare
Description
Changed the namespace to a full object from a simple string. This will allow future extension without breaking change. This is a data model change so will break existing calm hubs. Given calm-hub is not ready for proper usage I don't think a migration guide is needed.
Type of Change
Affected Components
cli/)shared/)calm-widgets/)calm-hub/)calm-hub-ui/)docs/)calm-plugins/vscode/)Commit Message Format ✅
Testing
Checklist