Skip to content

UIEXT-3491 WebUI-Migration Binary Objects to Strings#46

Open
tcrundall-tng wants to merge 2 commits intomasterfrom
enh/UIEXT-3491-webui-migration-binary-objects-to-strings
Open

UIEXT-3491 WebUI-Migration Binary Objects to Strings#46
tcrundall-tng wants to merge 2 commits intomasterfrom
enh/UIEXT-3491-webui-migration-binary-objects-to-strings

Conversation

@tcrundall-tng
Copy link

No description provided.

…oicesProvider

AP-23709 (Support username and password fields instead of flow variables in OAuth2 Authenticator nodes)
@tcrundall-tng tcrundall-tng requested a review from a team as a code owner March 25, 2026 16:07
@tcrundall-tng tcrundall-tng requested review from Copilot and knime-ghub-bot and removed request for a team March 25, 2026 16:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR advances the WebUI migration effort by moving nodes/settings away from legacy “binary object / flow-variable string” representations toward structured WebUI parameters (including credentials widgets) and programmatic node descriptions.

Changes:

  • Migrates Binary Objects to Strings to WebUI NodeParameters, programmatic NodeDescription, and snapshot-based dialog/settings tests.
  • Updates Box Authenticator app credentials from a credentials-flow-variable string to a LegacyCredentials widget with validation/migration wiring.
  • Bumps plugin/test bundle versions to 5.12.0 and updates related snapshots/manifests.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
org.knime.ext.box.authenticator/src-deprecated/org/knime/ext/box/authenticator/node/BoxAuthenticatorSettings.java Adds @ValueReference for nested Box app settings to enable validator referencing.
org.knime.ext.box.authenticator/src-deprecated/org/knime/ext/box/authenticator/node/BoxAppSettings.java Replaces flow-variable string with LegacyCredentials + migration + custom validation hook.
org.knime.ext.box.authenticator/META-INF/MANIFEST.MF Updates bundle version to 5.12.0.
org.knime.ext.box.authenticator.tests/pom.xml Updates test artifact revision to 5.12.0.
org.knime.ext.box.authenticator.tests/files/test_snapshots/org.knime.ext.box.authenticator.node.BoxAuthenticatorSettingsTest.snap Updates snapshots for new credentials widget schema/state.
org.knime.ext.box.authenticator.tests/META-INF/MANIFEST.MF Updates fragment version and host range to align with 5.12.0.
org.knime.base.filehandling/src/org/knime/base/filehandling/binaryobjectstostrings/BinaryObjectsToStringsNodeParameters.java Introduces WebUI parameters, persistence, migration annotations, and effect logic.
org.knime.base.filehandling/src/org/knime/base/filehandling/binaryobjectstostrings/BinaryObjectsToStringsNodeModel.java Adds configure-time auto-guessing of the selected binary-object column when unset.
org.knime.base.filehandling/src/org/knime/base/filehandling/binaryobjectstostrings/BinaryObjectsToStringsNodeFactory.xml Removes legacy XML node description in favor of programmatic description.
org.knime.base.filehandling/src/org/knime/base/filehandling/binaryobjectstostrings/BinaryObjectsToStringsNodeFactory.java Implements WebUI dialog factory + KAI interface + programmatic node description.
org.knime.base.filehandling.tests/src/org/knime/base/filehandling/binaryobjectstostrings/BinaryObjectsToStringsNodeParametersTest.java Replaces legacy dialog test with snapshot test for NodeParameters and settings structure.
org.knime.base.filehandling.tests/files/test_snapshots/org.knime.base.filehandling.binaryobjectstostrings.BinaryObjectsToStringsNodeParametersTest1.snap Adds snapshot for loading a concrete settings instance.
org.knime.base.filehandling.tests/files/test_snapshots/org.knime.base.filehandling.binaryobjectstostrings.BinaryObjectsToStringsNodeParametersTest0.settings.xml.snap Adds snapshot for persisted settings XML structure.
org.knime.base.filehandling.tests/files/test_snapshots/org.knime.base.filehandling.binaryobjectstostrings.BinaryObjectsToStringsNodeParametersTest.snap Adds snapshot for default model/schema/UI schema/persist metadata.
org.knime.base.filehandling.tests/files/node_settings/BinaryObjectsToStringsNodeParameters.xml Adds settings fixture used by snapshot tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +96 to +100
static final class BoxCredentialValidator extends AbstractCredentialsValidator<BoxAppSettings> {
BoxCredentialValidator() {
super(Ref.class);
}
}
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AbstractCredentialsValidator is referenced here but the class is neither defined in this plugin nor imported. This will fail compilation unless a same-package class exists (which is unlikely). Add the correct import (or fully qualify the type) so the validator resolves unambiguously.

Copilot uses AI. Check for mistakes.
Comment on lines +160 to +168
public Decoding load(final NodeSettingsRO settings) throws InvalidSettingsException {
final String value = settings.getString(CFG_KEY);
for (final Decoding decoding : Decoding.values()) {
if (decoding.getName().equals(value)) {
return decoding;
}
}
throw new InvalidSettingsException("Unknown decoding: \"" + value + "\"");
}
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DecodingPersistor.load() calls settings.getString("decoding") without handling the key being absent. If the setting is missing (e.g., older workflows or partially specified settings), this will throw even though the field has a default. Consider using containsKey/getString(key, default) and falling back to Decoding.UTF_8 to make loading robust.

Copilot uses AI. Check for mistakes.
Comment on lines +209 to +215
public OutputMode load(final NodeSettingsRO settings) throws InvalidSettingsException {
final String value = settings.getString(CFG_KEY);
if (ReplacePolicy.APPEND.getName().equals(value)) {
return OutputMode.APPEND;
}
return OutputMode.REPLACE;
}
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OutputModePersistor.load() reads settings.getString("replace") without a default / presence check. If the key is absent, this will throw even though m_outputMode has a default. Handle missing keys (e.g., containsKey or getString(key, ReplacePolicy.REPLACE.getName())) and return OutputMode.REPLACE for a safe fallback.

Copilot uses AI. Check for mistakes.
UIEXT-3491 (WebUI Migration Binary Objects to Strings)
@tcrundall-tng tcrundall-tng force-pushed the enh/UIEXT-3491-webui-migration-binary-objects-to-strings branch from b78e283 to 8091e7a Compare March 25, 2026 16:19
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
82.1% Coverage on New Code (required ≥ 85%)
5.8% Duplication on New Code (required ≤ 1%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants