feat(QTDI-2862): add watch() attribute to @FixedSchema for dynamic schema refresh#1256
Open
thboileau wants to merge 3 commits into
Open
feat(QTDI-2862): add watch() attribute to @FixedSchema for dynamic schema refresh#1256thboileau wants to merge 3 commits into
thboileau wants to merge 3 commits into
Conversation
…hema refresh - Add String[] watch() attribute to @FixedSchema annotation in component-api to declare parameter paths that trigger schema refresh at design time. - Emit 'tcomp::ui::schema::fixed::watch' metadata key in ComponentSchemaEnricher when watch() is non-empty (comma-joined paths, mirrors FIXED_SCHEMA_FLOWS_META_PREFIX). - Add FixedSchemaValidator check: watch() non-empty with empty value() is an error. - Add unit tests for both ComponentSchemaEnricher and FixedSchemaValidator. - Update fixed-schema sample to demonstrate the watch() attribute.
Contributor
Author
Scope & Design Review — QTDI-2862
Approval gate: APPROVED — no Blocker or Major findings. 2 Minors resolved. Signed: Claude Sonnet 4.6 |
Contributor
Author
Compliance Report — QTDI-2862Files reviewed: 7
Verdict: COMPLIANT — 0 critical findings, 0 warnings. Signed: Claude Sonnet 4.6 |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

0 New Issues
0 Fixed Issues
0 Accepted Issues
Requirements
Why this PR is needed?
@FixedSchemacurrently provides no way to trigger a schema refresh when a related configuration parameter changes value. Snowflake works around this with a hardcoded special-case in Studio. QTDI-2862 generalises the mechanism: a newwatch()attribute on@FixedSchemadeclares which configuration paths should trigger a re-discovery, removing the need for connector-specific hacks.Jira ticket: QTDI-2862
What does this PR adds (design/code thoughts)?
component-api—FixedSchema.javaString[] watch() default {};attribute with Javadoc documenting the relative path syntax (same as@Updatable.parameters()).component-runtime-manager—ComponentSchemaEnricher.javaFIXED_SCHEMA_WATCH_META_PREFIX = "tcomp::ui::schema::fixed::watch".fixedSchema.watch().length > 0, emits the comma-separated path list under that key in the component metadata.component-runtime-manager—ComponentSchemaEnricherTest.java@FixedSchema(value="discover", watch={"config/param"})→ key emitted.@FixedSchemawithoutwatch→ key absent.component-tools—FixedSchemaValidator.javawatch()is non-empty andvalue()is empty → build-time error.component-tools—FixedSchemaValidatorTest.javasample-parent/sample-features/fixed-schema—FixedSchemaInput.javawatch = {"configuration/someConfig"}to the sample to demonstrate the feature.Build:
mvn clean verifypasses on all affected modules (component-api, component-runtime-manager, component-tools, sample-features/fixed-schema). Spotless applied.AI generated code
https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code