[Misc] Use CAP Operator getDependency endpoint in the chart & minor updates#100
Conversation
…ration - Introduced SubscriptionDependencyMode with values Auto, Always, and Never. - Updated serviceInstanceExt to include SubscriptionDependency. - Modified schema generation to reflect changes in FieldsV1, Duration, Time, and IntOrString definitions. - Changed JSON marshaling to use indentation for better readability. - Ensured that generated schema files include a newline at the end. refactor(util): enhance prompt validation in ask function - Updated the ask function to support custom validators alongside mandatory checks. - Simplified the validation logic for user input. test: add validation test for runtime-values generation - Implemented a test case to ensure invalid app names raise appropriate errors during runtime-values generation. - Updated expected runtime-values YAML files to reflect new callback URLs. chore: clean up unnecessary annotations in templates - Removed commented-out annotations related to x-forwarded-client-cert from CAPApplication templates.
There was a problem hiding this comment.
The PR makes several good changes: updating dependency endpoints to use the CAP Operator's centralized routes, adding startupProbe and subscriptionDependency schema fields, fixing schema types for Duration/Time/IntOrString/FieldsV1, and adding input validation for the app name prompt. Two issues were found: (1) the custom validator in lib/util.js is invoked even for empty optional fields, which could surface misleading format errors on fields the user intentionally left blank; and (2) the app name format validation is skipped entirely for service-only charts even though the app name is still used in domain/URL construction where the same character constraints apply.
PR Bot Information
Version: 1.20.43
- LLM:
anthropic--claude-4.6-sonnet - Correlation ID:
3e886b12-1f13-4a3a-b4ce-2d3e72d382c8 - Event Trigger:
pull_request.opened - File Content Strategy: Full file content
…lDomainRefs parameters Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
The PR is generally well-structured with clear, coherent changes. The main substantive issues found are: the validator in lib/util.js passes the raw (non-trimmed) value to the custom validator function, creating an inconsistency with the mandatory check; the --with-input-yaml invalid-appName path lacks test coverage; and the jsonschema enum tag on SubscriptionDependency alongside the named type may interact unexpectedly with invopop/jsonschema v0.14.0 and should be verified against the actual generated output.
PR Bot Information
Version: 1.20.47
- Event Trigger:
pull_request.ready_for_review - Correlation ID:
9e0110a0-382b-424e-8747-a0c5c0915fb0 - LLM:
anthropic--claude-4.6-sonnet - File Content Strategy: Full file content
v0.16.0: Use CAP Operator
getDependencyEndpoint & Schema ImprovementsNew Feature / Misc
🔧 This release updates the Helm chart to use the CAP Operator's native
getDependenciesendpoint for subscription dependency callbacks (replacing app/provider subdomain-based URLs), addsSubscriptionDependencyModesupport to service instances, improves input validation for app names, and bumps several dependencies.Changes
files/runtime-values.yaml.hbs: UpdatedgetDependenciesURL for both XSUAA (saasRegistry) and IAS (subscriptionManager) flows to use the CAP Operator endpoint format (https://{{capOperatorSubdomain}}.{{clusterDomain}}/dependencies/...), removing provider subdomain-based callback URLs.lib/util.js: Extended theask()prompt utility to support a customvalidatorfunction. SimplifiedwriteCAPApplicationCROby removing the IAS-specificsme.sap.com/vs-route-request-header-setannotation and theOptionalMutualTLS certificate config, applying a unified annotation block and always usingtlsMode: Simple.bin/cap-op-plugin.js: AddedappNameValidatorfor non-service-only charts enforcing lowercase alphanumeric and hyphen characters (^[a-z0-9-]+$). Validation now applies both in interactive prompts and when using--with-input-yaml.hack/schema-generation.go: AddedSubscriptionDependencyModetype (Auto/Always/Never). Fixed schema post-processing forFieldsV1,Duration,Time, andIntOrStringtypes. Switched to indented JSON marshaling and appended trailing newlines to output files.files/chart/values.schema.json&files/configurableTemplatesChart/values.schema.json: AddedsubscriptionDependencyenum field to service instance schema. AddedenableCleanupMonitoringboolean toappschema. FixedDuration,Time,FieldsV1, andIntOrStringtype definitions. AddedstartupProbereference to workload schema.hack/go.mod/hack/go.sum: Bumped Go to1.26.3, updatedcap-operatortov0.29.1,sap-btp-service-operatortov0.10.7,invopop/jsonschematov0.14.0, andk8s.io/*tov0.36.0,controller-runtimetov0.24.0.test/cap-op-plugin.test.js: Added test case validating that an invalid app name (containing uppercase letters) triggers the error'Only a-z, 0-9 and - are allowed'.test/files/domain-ias.yaml: Removed — IAS-specific domain template no longer needed; tests now reference the unifieddomain.yaml.README.md: Rewrote the "Configure Your Chart" section with clearer design-time vs. runtime value documentation, addedsubscriptionDependencyreferences, and documented theappNamecharacter restriction.package.json/package-lock.json/CHANGELOG.md: Bumped version to0.16.0.PR Bot Information
Version:
1.20.47532e0a7c-ca3e-48fe-bc1d-f84427123d45issue_comment.edited