Skip to content

Connector Development: Validate connector development scripts before saving them - #720

Open
johnstone3 wants to merge 2 commits into
masterfrom
feature/script-validation-on-save
Open

Connector Development: Validate connector development scripts before saving them#720
johnstone3 wants to merge 2 commits into
masterfrom
feature/script-validation-on-save

Conversation

@johnstone3

Copy link
Copy Markdown
Contributor

The script wizard step validates the edited script by the connector itself (executeScript on the testing resource, development mode only) before writing it to the connector file. A validation error is shown on the step with the failed phase and location, and the script is not saved. When the validation cannot be executed (no testing resource yet, older deployed connector), the save proceeds as before. Non-groovy artifacts are not validated.

Before a connector-development wizard step writes an edited script
to the connector's manifest, it now validates it against the
testing resource's own connector (ScriptOnResourceOp, development
mode) first. A schema candidate that itself builds cleanly is also
checked against every deployed operation script, since removing or
renaming an attribute can silently break a handler that still
references it - all resulting failures are reported, not just the
first.

The feedback alert only ever shows a one-line summary (files
affected); per-file, per-phase detail goes to the wizard's
right-side drawer instead, since a failure spanning several files
has nowhere else legible to show more than one message.

A failure to even run the check (testing resource unreachable, the
deployed connector currently broken, or too old to support script
validation) now blocks the save rather than letting it through
unvalidated, matching the intended invariant that only validated
scripts get written to disk.

Task: 11965
A schema change can legitimately break an obsolete operation script
still referencing what it removed or renamed - the fix is to update
or delete that script, but until then the user needs a way past the
schema save without either losing the schema edit or leaving a
broken script silently deployed.

The wizard's validation-error sidebar now reports each affected file
as its own entry, and a broken sibling's entry repurposes the fix
button as "Disable operation" instead of adding a second button next
to it, since there's nowhere to navigate to fix a script other than
editing its already-deployed content. Disabling marks the script's
manifest entry so the connector skips it both on real initialization
and when reloading siblings during validation; saving the script
again through its own step clears the flag automatically, since a
deliberate save is the user's declaration that it's back in use.

Task: 11995
@johnstone3
johnstone3 force-pushed the feature/script-validation-on-save branch from e924675 to b7efa61 Compare August 18, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant