Repository navigation
fix!: follow the registry's camelCase names - #563
Conversation
Cloud Registry 1.0.0rc2 moved its API additions to camelCase, without aliases, so the create form no longer found the registration rules and silently offered its default environments. Read registrationRules and rename the fields of RegistrationRules, which also gains maxServicesPerUser. The form doesn't read the former names: against Cloud Registry 0.6.0 to 1.0.0rc1, and custom providers with those names, it warns and uses its properties, as the docs say. Also name mayAddServiceTypes of GET /me in the comments and docs. BREAKING CHANGE: custom providers must return registrationRules with the new field names, and the types of RegistrationRules changed. Closes #562 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Move it to a helper, ignore empty former names, and test those and a failing service info after a provider with rules. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideMigrates Cloud Registry integration and documentation to the 1.0.0rc2 camelCase service-info contract, with deliberate rejection and warning for legacy registration_rules data, while preserving defaults and property-based fallback behavior. Tests cover the new contract, legacy compatibility boundary, and provider changes. Sequence diagram for loading Cloud Registry registration rulessequenceDiagram
participant Form as ServiceCreateForm
participant Provider as CloudRegistryProvider
participant Registry as CloudRegistry
Form->>Provider: getServiceInfo()
Provider->>Registry: GET /service-info
Registry-->>Provider: RegistryServiceInfo.registrationRules
Provider-->>Form: RegistryServiceInfo
Form->>Form: Read registrationRules.environments
Form-->>Form: Offer registry environments
Sequence diagram for legacy registration rules fallbacksequenceDiagram
participant Form as ServiceCreateForm
participant Provider as CloudRegistryProvider
participant Registry as LegacyRegistry
Form->>Provider: getServiceInfo()
Provider->>Registry: GET /service-info
Registry-->>Provider: registration_rules
Provider-->>Form: RegistryServiceInfo
Form->>Form: hasOnlyFormerRules()
Form-->>Form: console.warn()
Form-->>Form: Use form properties and defaults
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Documentation build overview
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #563 +/- ##
==========================================
+ Coverage 70.89% 71.40% +0.51%
==========================================
Files 23 23
Lines 5638 5655 +17
Branches 190 199 +9
==========================================
+ Hits 3997 4038 +41
+ Misses 1636 1610 -26
- Partials 5 7 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Linked issues
#562 fix: follow the registry's camelCase names · 2 of 2 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Move the package to the new camelCase names for all registry additions. | ✅ Met | The form reads registrationRules; the interfaces use urlSchemes, serviceTypes, maxUnusedServiceTypes and maxServicesPerUser; and the docs/comments use mayAddServiceTypes. |
| 2 | Stay compatible with the UI wrapper that adds registration_rules while retaining registrationRules. |
✅ Met | The form uses the camelCase rules when both names are present and warns only when the former name is present alone; tests cover this behavior. |
Sourcery assessment
Approved.
anuragxxd
left a comment
There was a problem hiding this comment.
Looks good to me! Just a small change.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sourcery withdrew this approval because the latest commits introduced blocking findings.
Summary
Cloud Registry 1.0.0rc2 moved its API additions to camelCase, without aliases, so the create form no longer found the registration rules and silently offered its default environments. This moves
@elixir-cloud/cloud-registryto the new names.registrationRulesofGET /service-info.RegistrationRulesandRegistryServiceInfouseurlSchemes,serviceTypesandmaxUnusedServiceTypes, and gainmaxServicesPerUser, checked againstadditions.openapi.yamlof the registry at d3e4fd7.mayAddServiceTypesofGET /me, and 1.0.0rc2 as the first version with these names.Of the renamed fields, the package only used these. It has no calls to
/me, permissions, invitations, approvals or verifications, and no other package or the docs app reads the renamed fields. A search for all old names in the rename table finds only the deliberate mentions ofregistration_rules, and config keys such ascustom.access_control.service_types, which stay in snake_case.Breaking change
The form no longer reads
registration_rules. Against Cloud Registry 0.6.0 to 1.0.0rc1, and custom providers with those names, it logs a warning and uses its properties, asproviders.mdxsays. The registry has no aliases, and the issue asks to move to the new names, so there is no fallback to the old ones.The wrapper
withFormRules()of cloud-registry-ui keeps working with this change, since it addsregistration_rulesand leavesregistrationRulesin place; the form doesn't warn then, and the wrapper can go once the UI uses a release with this change.How it was verified
dev(3 failed in Chromium and in Firefox), and pass now.web-test-runner, Chromium and Firefox: 45 passed each, 0 failed.npm run lint, which includes the build of all packages and the docs, through the commit hook: passed.tscof the package: no errors outside test files, whose errors come from missing mocha globals and a duplicatelit-htmltype, not from this change.Not run locally:
Declined review findings
Closes #562
🤖 Generated with Claude Code
Summary by Sourcery
Adopt Cloud Registry 1.0.0rc2 camelCase registration rule names across the service creation form, provider types, tests, and documentation.
Bug Fixes:
Enhancements:
Documentation:
mayAddServiceTypes.Tests: