Skip to content

Conversation

@sjd78
Copy link
Member

@sjd78 sjd78 commented Nov 7, 2025

Resolves: https://issues.redhat.com/browse/MTA-6326
Resolves: #2709
CloudFoundry schema update: konveyor/operator#484

Summary

Update the discover application wizard CloudFoundry source platform filter input and review to support organizations, spaces, and names.

Added the ability to validate that two JSON schemas are functionally equivalent. This is used to validate that the Cloud Foundry schema is functionally equivalent to the schema used to build the Cloud Foundry forms.

If a source platform is kind of "cloudfoundry", and the filter schema pulled from hub is functionally equivalent to the schema the components are based on, then show the custom components. If the schema is not equivalent, then show the generic schema defined fields components. This will most likely give the user a code editor to input a json document to define the filter.

Screenshots

No inputs required input and review:
Screenshot From 2025-11-07 17-13-30
Screenshot From 2025-11-07 17-13-44

Input for all fields in input and review:
Screenshot From 2025-11-07 17-14-22
Screenshot From 2025-11-07 17-14-32

Summary by CodeRabbit

  • New Features

    • Added Cloud Foundry discovery filters: separate Organizations, Spaces, and Names in import and review flows.
  • Chores

    • Updated dependency declarations and added lodash-es integration.
    • Moved and consolidated JSON Schema utilities for clearer schema handling and validation.
  • Tests

    • Expanded JSON Schema utility test coverage and removed tests for a deprecated combine helper.

sjd78 added 2 commits November 7, 2025 17:28
Resolves: https://issues.redhat.com/browse/MTA-6326
Resolves: konveyor#2709
CloudFoundry schema update: konveyor/operator#484

Update the discover application wizard CloudFoundry source platform
filter input and review to support organizations, spaces, and names.

Added the ability to validate that two JSON schemas are functionally
equivalent.  This is used to validate that the Cloud Foundry schema
is functionally equivalent to the schema used to build the Cloud Foundry
forms.

If a source platform is kind of "cloudfoundry", and the filter
schema pulled from hub is functionally equivalent to the schema
the components are based on, then show the custom components.  If
the schema is not equivalent, then show the generic schema defined
fields components.  This will most likely give the user a code editor
to input a json document to define the filter.

Signed-off-by: Scott J Dickerson <[email protected]>
Signed-off-by: Scott J Dickerson <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Nov 7, 2025

Walkthrough

Adds Cloud Foundry organization filtering to the Discover Applications wizard, introduces a Cloud Foundry schema validator and hook, moves JSON Schema utilities to a centralized module with tests, and updates imports, dependencies, and Jest handling for lodash‑es.

Changes

Cohort / File(s) Change Summary
Cloud Foundry Filter Components
client/src/app/components/discover-import-wizard/filter-input-cloudfoundry.tsx, client/src/app/components/discover-import-wizard/review-input-cloudfoundry.tsx, client/src/app/components/discover-import-wizard/validate-cloudfoundry-schema.tsx
Adds organizations field to Cloud Foundry filter form and review UI; introduces Cloud Foundry JSON schema, validateCloudFoundrySchema and useCloudFoundryCheck hook for schema-based detection/validation.
Wizard Integration
client/src/app/components/discover-import-wizard/filter-input.tsx, client/src/app/components/discover-import-wizard/review.tsx
Replaces direct platform.kind checks with useCloudFoundryCheck to route between Cloud Foundry-specific components and generic schema-defined fields.
JSON Schema Utilities & Tests
client/src/app/utils/json-schema.ts, client/src/app/utils/json-schema.test.ts
New centralized JSON Schema utilities: isSchemaEmpty, combineSchemas, stripAnnotations, isEquivalentSchema, validatorGenerator with comprehensive tests.
Legacy Utility Cleanup
client/src/app/components/schema-defined-fields/utils.tsx, client/src/app/components/schema-defined-fields/utils.test.tsx
Removes combineSchemas and isSchemaEmpty exports and related logic/tests from the old utils; retains isComplexSchema and jsonSchemaToYupSchema.
Import Updates
client/src/app/pages/applications/generate-assets-wizard/step-capture-parameters.tsx
Redirects imports to @app/utils/json-schema for relocated utilities.
Config & Dependencies
client/jest.config.ts, client/package.json, cspell.json
Adds lodash-es dependency and types, moves jest to devDependencies, updates Jest transformIgnorePatterns to treat lodash-es as ESM, updates spell-check dictionary (adds "cloudfoundry", removes "skopeo").

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant FilterInput as FilterInput (filter-input.tsx)
    participant CFCheck as useCloudFoundryCheck
    participant CFValidator as validate-cloudfoundry-schema
    participant CFFilter as FilterInputCloudFoundry
    participant Generic as SchemaDefinedField

    User->>FilterInput: Render filter component
    FilterInput->>CFCheck: shouldUseCloudFoundryInput(platform, schema)
    CFCheck->>CFValidator: validate schema against CF spec
    CFValidator-->>CFCheck: valid / invalid
    alt Cloud Foundry schema valid
        CFCheck-->>FilterInput: true
        FilterInput->>CFFilter: Render CF form (organizations → spaces → names)
        CFFilter->>User: Show CF-specific inputs
    else not CF or schema invalid
        CFCheck-->>FilterInput: false
        FilterInput->>Generic: Render generic SchemaDefinedField
        Generic->>User: Show generic schema-based editor
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Areas needing extra attention:
    • client/src/app/utils/json-schema.ts and its tests — deep equality, annotation stripping, required merging, lodash‑es usage.
    • validate-cloudfoundry-schema.tsx and useCloudFoundryCheck — accuracy of CF schema and detection logic.
    • Form components (filter-input-cloudfoundry.tsx, review-input-cloudfoundry.tsx) — shape of FormValues, defaults, and UI ordering.
    • Jest config and package.json changes — ensure test harness handles ESM lodash‑es.

Possibly related PRs

Suggested labels

cherry-pick/release-0.8

Suggested reviewers

  • ibolton336
  • rszwajko

Poem

🐰 Hopping through schemas, light and spry,

Organizations now leap into the sky,
Spaces and names in tidy rows,
A rabbit’s cheer for the filter that grows!

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change - updating the Cloud Foundry discover applications filter to support organizations in addition to existing fields.
Description check ✅ Passed The description provides comprehensive context including issue references, summary of changes, technical implementation details, and screenshots demonstrating the feature.
Linked Issues check ✅ Passed All objectives from linked issue #2709 are met: organizations filter added [#2709], zero or more support for organizations/spaces/names implemented [#2709], schema validation check added [#2709], conditional UI rendering implemented [#2709].
Out of Scope Changes check ✅ Passed All changes align with requirements in #2709: Cloud Foundry filter updates, schema validation utilities, and conditional rendering are all in scope per the issue objectives.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f8d83c and 0735bfc.

📒 Files selected for processing (2)
  • client/src/app/components/discover-import-wizard/filter-input.tsx (3 hunks)
  • client/src/app/components/discover-import-wizard/review.tsx (3 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: sjd78
Repo: konveyor/tackle2-ui PR: 2718
File: client/src/app/components/discover-import-wizard/validate-cloudfoundry-schema.tsx:16-41
Timestamp: 2025-11-07T22:56:18.566Z
Learning: In the Cloud Foundry discover applications filter schema (client/src/app/components/discover-import-wizard/validate-cloudfoundry-schema.tsx), the organizations field does not require any items and can be empty (no minItems constraint). Users can provide zero or more organization names.
📚 Learning: 2025-08-13T08:52:51.365Z
Learnt from: sjd78
Repo: konveyor/tackle2-ui PR: 2545
File: client/src/app/pages/source-platforms/discover-import-wizard/review.tsx:22-24
Timestamp: 2025-08-13T08:52:51.365Z
Learning: In the platform discovery import wizard, users can only provide filter documents when filterRequired is true. When filterRequired is false, no schema is available and the FilterInput component shows a "no filters available" message without rendering input fields. Therefore, filters.document will only exist when filters.filterRequired is true.

Applied to files:

  • client/src/app/components/discover-import-wizard/filter-input.tsx
  • client/src/app/components/discover-import-wizard/review.tsx
📚 Learning: 2025-11-07T22:56:18.566Z
Learnt from: sjd78
Repo: konveyor/tackle2-ui PR: 2718
File: client/src/app/components/discover-import-wizard/validate-cloudfoundry-schema.tsx:16-41
Timestamp: 2025-11-07T22:56:18.566Z
Learning: In the Cloud Foundry discover applications filter schema (client/src/app/components/discover-import-wizard/validate-cloudfoundry-schema.tsx), the organizations field does not require any items and can be empty (no minItems constraint). Users can provide zero or more organization names.

Applied to files:

  • client/src/app/components/discover-import-wizard/filter-input.tsx
🧬 Code graph analysis (2)
client/src/app/components/discover-import-wizard/filter-input.tsx (1)
client/src/app/components/discover-import-wizard/validate-cloudfoundry-schema.tsx (1)
  • useCloudFoundryCheck (50-61)
client/src/app/components/discover-import-wizard/review.tsx (1)
client/src/app/components/discover-import-wizard/validate-cloudfoundry-schema.tsx (1)
  • useCloudFoundryCheck (50-61)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: unit-test
  • GitHub Check: test-image-build (arm64)
  • GitHub Check: test-image-build (amd64)
  • GitHub Check: build-and-upload-for-global-ci
🔇 Additional comments (2)
client/src/app/components/discover-import-wizard/review.tsx (1)

19-19: LGTM! Schema validation improves robustness.

The replacement of the simple platform.kind === "cloudfoundry" check with useCloudFoundryCheck adds an important validation layer. The custom Cloud Foundry review UI is now only rendered when the schema matches expectations, with an appropriate fallback to SchemaDefinedField otherwise. This aligns with the PR objectives to validate schema compatibility before rendering custom components.

Also applies to: 31-34, 91-91

client/src/app/components/discover-import-wizard/filter-input.tsx (1)

17-17: LGTM! Consistent schema validation pattern.

The implementation mirrors the pattern in review.tsx, replacing the simple kind check with schema validation via useCloudFoundryCheck. This ensures the custom Cloud Foundry input UI is only rendered when the schema validates, with a safe fallback to SchemaDefinedField. The hook correctly handles undefined filtersSchema and is properly called unconditionally per React hooks rules.

Also applies to: 110-113, 149-149


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sjd78 sjd78 requested a review from jortel November 7, 2025 22:44
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
client/src/app/components/discover-import-wizard/filter-input-cloudfoundry.tsx (1)

92-178: Enforce the “one or more organizations” rule in the form

Right now the resolver lets the organizations array stay empty, so users can advance with no organizations even though the Cloud Foundry discovery contract requires at least one. That will either make the schema comparison fail (after you add minItems: 1) or produce an invalid payload. Please enforce the minimum in the Yup schema (and mark the group as required so the UI reflects it).

   const validationSchema = yup.object().shape({
-    organizations: yup.array().of(
-      yup.object().shape({
-        value: yup
-          .string()
-          .min(1, "Organization name must be at least 1 character")
-          .trim(),
-      })
-    ),
+    organizations: yup
+      .array()
+      .min(1, "Add at least one organization")
+      .of(
+        yup.object().shape({
+          value: yup
+            .string()
+            .min(1, "Organization name must be at least 1 character")
+            .trim(),
+        })
+      ),
         <StringFieldsGroup
           control={form.control}
           groupTitle="Organizations"
           groupDescription="Enter organization name"
           fieldName="organizations"
           addLabel="Add an organization"
           removeLabel="Remove this organization"
           emptyMessage="No organizations specified"
-          isRequired={false}
+          isRequired
         />
🧹 Nitpick comments (3)
client/src/app/components/discover-import-wizard/filter-input.tsx (1)

110-113: Consider renaming the boolean variable.

The variable useCloudFoundryFilterInput has a use prefix which conventionally indicates a React hook, but it's actually a boolean value computed from useCloudFoundryCheck(). Consider renaming it to something like shouldUseCloudFoundryFilterInput or isCloudFoundryFilterInput for clarity.

Apply this diff to improve naming:

-  const useCloudFoundryFilterInput = useCloudFoundryCheck(
+  const shouldUseCloudFoundryFilterInput = useCloudFoundryCheck(
     platform,
     filtersSchema
   );

And update the usage on line 149:

-            useCloudFoundryFilterInput ? (
+            shouldUseCloudFoundryFilterInput ? (
client/src/app/components/discover-import-wizard/review.tsx (1)

31-31: Consider renaming the boolean variable.

Similar to the filter input component, useCloudFoundryReview has a use prefix suggesting it's a hook, but it's actually a boolean. Consider renaming to shouldUseCloudFoundryReview or isCloudFoundryReview for clarity.

Apply this diff:

-  const useCloudFoundryReview = useCloudFoundryCheck(platform, filters.schema);
+  const shouldUseCloudFoundryReview = useCloudFoundryCheck(platform, filters.schema);

And update line 88:

-                {useCloudFoundryReview ? (
+                {shouldUseCloudFoundryReview ? (
client/src/app/components/discover-import-wizard/review-input-cloudfoundry.tsx (1)

35-78: Consider extracting the repeated pattern into a helper component.

All three sections (Organizations, Spaces, Names) follow an identical structure. Extracting this pattern would reduce duplication and improve maintainability.

Example refactor:

const FilterListGroup: React.FC<{
  label: string;
  items: string[];
  emptyMessage: string;
}> = ({ label, items, emptyMessage }) => (
  <DescriptionListGroup>
    <DescriptionListTerm>{label}</DescriptionListTerm>
    <DescriptionListDescription>
      {items.length === 0 ? (
        <EmptyTextMessage message={emptyMessage} />
      ) : (
        <List isPlain>
          {items.map((item) => (
            <ListItem key={item}>{item}</ListItem>
          ))}
        </List>
      )}
    </DescriptionListDescription>
  </DescriptionListGroup>
);

Then use it in the render:

return (
  <DescriptionList isHorizontal isCompact id={id}>
    <FilterListGroup
      label="Organizations"
      items={organizations}
      emptyMessage="No organizations specified"
    />
    <FilterListGroup
      label="Spaces"
      items={spaces}
      emptyMessage="No spaces specified"
    />
    <FilterListGroup
      label="Names"
      items={names}
      emptyMessage="No names specified"
    />
  </DescriptionList>
);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a2921ea and 5f8d83c.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (13)
  • client/config/jest.config.ts (1 hunks)
  • client/package.json (3 hunks)
  • client/src/app/components/discover-import-wizard/filter-input-cloudfoundry.tsx (5 hunks)
  • client/src/app/components/discover-import-wizard/filter-input.tsx (3 hunks)
  • client/src/app/components/discover-import-wizard/review-input-cloudfoundry.tsx (2 hunks)
  • client/src/app/components/discover-import-wizard/review.tsx (3 hunks)
  • client/src/app/components/discover-import-wizard/validate-cloudfoundry-schema.tsx (1 hunks)
  • client/src/app/components/schema-defined-fields/utils.test.tsx (1 hunks)
  • client/src/app/components/schema-defined-fields/utils.tsx (0 hunks)
  • client/src/app/pages/applications/generate-assets-wizard/step-capture-parameters.tsx (1 hunks)
  • client/src/app/utils/json-schema.test.ts (1 hunks)
  • client/src/app/utils/json-schema.ts (1 hunks)
  • cspell.json (1 hunks)
💤 Files with no reviewable changes (1)
  • client/src/app/components/schema-defined-fields/utils.tsx
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2025-10-17T17:03:52.480Z
Learnt from: sjd78
Repo: konveyor/tackle2-ui PR: 2656
File: .prettierignore:9-18
Timestamp: 2025-10-17T17:03:52.480Z
Learning: The tackle2-ui project uses a specific formatting setup: ESLint (with eslint-plugin-prettier) handles all JavaScript/TypeScript code files, while standalone Prettier handles non-code files. The .prettierignore file intentionally excludes **/*.js, **/*.ts, etc. to prevent duplicate formatting runs, as ESLint internally applies Prettier to code files.

Applied to files:

  • client/config/jest.config.ts
📚 Learning: 2025-07-17T23:29:20.652Z
Learnt from: sjd78
Repo: konveyor/tackle2-ui PR: 2432
File: client/src/app/components/schema-defined-fields/utils.tsx:42-47
Timestamp: 2025-07-17T23:29:20.652Z
Learning: In the tackle2-ui codebase, when using yup.lazy for optional object validation, the correct TypeScript typing is `ReturnType<typeof yup.lazy<yup.AnySchema>>` instead of passing the generic type parameter directly to yup.lazy, due to the specific version of yup being used.

Applied to files:

  • client/src/app/components/schema-defined-fields/utils.test.tsx
  • client/src/app/pages/applications/generate-assets-wizard/step-capture-parameters.tsx
📚 Learning: 2025-10-09T06:42:54.063Z
Learnt from: sjd78
Repo: konveyor/tackle2-ui PR: 2660
File: client/src/app/components/repository-fields/schema.ts:72-99
Timestamp: 2025-10-09T06:42:54.063Z
Learning: In the tackle2-ui repository, prefer the `when, is, then` style for Yup schemas (e.g., `.when(["field"], { is: ..., then: ... })`). Ignore Biome's `noThenProperty` warning in these circumstances.

Applied to files:

  • client/src/app/components/schema-defined-fields/utils.test.tsx
📚 Learning: 2025-08-13T08:52:51.365Z
Learnt from: sjd78
Repo: konveyor/tackle2-ui PR: 2545
File: client/src/app/pages/source-platforms/discover-import-wizard/review.tsx:22-24
Timestamp: 2025-08-13T08:52:51.365Z
Learning: In the platform discovery import wizard, users can only provide filter documents when filterRequired is true. When filterRequired is false, no schema is available and the FilterInput component shows a "no filters available" message without rendering input fields. Therefore, filters.document will only exist when filters.filterRequired is true.

Applied to files:

  • client/src/app/components/discover-import-wizard/review.tsx
  • client/src/app/components/discover-import-wizard/filter-input.tsx
  • client/src/app/components/discover-import-wizard/filter-input-cloudfoundry.tsx
📚 Learning: 2025-08-15T22:35:55.912Z
Learnt from: sjd78
Repo: konveyor/tackle2-ui PR: 2558
File: client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx:0-0
Timestamp: 2025-08-15T22:35:55.912Z
Learning: The Generate Assets Wizard in client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx is designed to accommodate additional wizard steps in the future, so the current conditional rendering of the Results step is intentional and appropriate for the planned architecture.

Applied to files:

  • client/src/app/pages/applications/generate-assets-wizard/step-capture-parameters.tsx
🧬 Code graph analysis (6)
client/src/app/components/discover-import-wizard/review.tsx (1)
client/src/app/components/discover-import-wizard/validate-cloudfoundry-schema.tsx (1)
  • useCloudFoundryCheck (50-61)
client/src/app/utils/json-schema.test.ts (2)
client/src/app/utils/json-schema.ts (4)
  • stripAnnotations (80-103)
  • combineSchemas (26-55)
  • isEquivalentSchema (109-120)
  • validatorGenerator (126-132)
client/src/app/api/models.ts (1)
  • JsonSchemaObject (1008-1049)
client/src/app/components/discover-import-wizard/filter-input.tsx (1)
client/src/app/components/discover-import-wizard/validate-cloudfoundry-schema.tsx (1)
  • useCloudFoundryCheck (50-61)
client/src/app/components/discover-import-wizard/validate-cloudfoundry-schema.tsx (2)
client/src/app/api/models.ts (3)
  • JsonSchemaObject (1008-1049)
  • SourcePlatform (984-993)
  • TargetedSchema (1062-1065)
client/src/app/utils/json-schema.ts (1)
  • validatorGenerator (126-132)
client/src/app/utils/json-schema.ts (1)
client/src/app/api/models.ts (1)
  • JsonSchemaObject (1008-1049)
client/src/app/components/discover-import-wizard/review-input-cloudfoundry.tsx (1)
client/src/app/components/EmptyTextMessage.tsx (1)
  • EmptyTextMessage (9-19)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: unit-test
  • GitHub Check: test-image-build (amd64)
  • GitHub Check: test-image-build (arm64)
  • GitHub Check: build-and-upload-for-global-ci
🔇 Additional comments (8)
cspell.json (1)

5-5: LGTM - Spell-check dictionary updated.

The addition of "cloudfoundry" to the dictionary aligns with the Cloud Foundry feature additions throughout the PR.

client/config/jest.config.ts (1)

47-49: LGTM - Jest configuration updated for lodash-es.

The addition of lodash-es to transformIgnorePatterns correctly ensures the ESM module is processed by ts-jest, aligning with the new dependency added in package.json.

client/package.json (1)

47-47: LGTM - Dependency management improvements.

The changes correctly:

  • Add lodash-es as a runtime dependency with appropriate typing support
  • Move jest to devDependencies where it belongs (test-time only)

Also applies to: 72-72, 85-85

client/src/app/components/schema-defined-fields/utils.test.tsx (1)

3-3: LGTM - Import updated to reflect refactored utilities.

The import statement correctly reflects that combineSchemas was moved to @app/utils/json-schema, while the remaining functions stay in this module.

client/src/app/pages/applications/generate-assets-wizard/step-capture-parameters.tsx (1)

20-22: LGTM - Imports reorganized to use centralized utilities.

The import paths correctly reflect the refactoring: combineSchemas and isSchemaEmpty now come from the centralized @app/utils/json-schema module, while jsonSchemaToYupSchema remains in its original location.

client/src/app/components/discover-import-wizard/filter-input.tsx (1)

149-168: LGTM - Cloud Foundry conditional rendering implemented correctly.

The logic correctly uses the Cloud Foundry validation check to render either the custom FilterInputCloudFoundry component or the generic SchemaDefinedField, providing graceful degradation when the schema doesn't match expectations.

client/src/app/components/discover-import-wizard/review.tsx (1)

88-100: LGTM - Review rendering correctly gates on Cloud Foundry validation.

The conditional rendering appropriately selects between the Cloud Foundry-specific review component and the generic schema field based on runtime validation, ensuring the UI adapts to schema compatibility.

client/src/app/components/discover-import-wizard/review-input-cloudfoundry.tsx (1)

29-31: LGTM!

The variable declarations correctly extract the filter arrays with safe type assertions and appropriate fallbacks.

Signed-off-by: Scott J Dickerson <[email protected]>
@sjd78 sjd78 added the cherry-pick/release-0.8 This PR should be cherry-picked to release-0.8 branch label Nov 7, 2025
@sjd78 sjd78 added this to the v0.8.1 milestone Nov 8, 2025
@sjd78 sjd78 merged commit 13025d5 into konveyor:main Nov 10, 2025
13 checks passed
@sjd78 sjd78 deleted the discover_apps_orgs branch November 10, 2025 15:01
sjd78 added a commit to sjd78/tackle2-ui that referenced this pull request Nov 10, 2025
Resolves: https://issues.redhat.com/browse/MTA-6326
Resolves: konveyor#2709
CloudFoundry schema update:
konveyor/operator#484

Update the discover application wizard CloudFoundry source platform
filter input and review to support organizations, spaces, and names.

Added the ability to validate that two JSON schemas are functionally
equivalent. This is used to validate that the Cloud Foundry schema is
functionally equivalent to the schema used to build the Cloud Foundry
forms.

If a source platform is kind of "cloudfoundry", and the filter schema
pulled from hub is functionally equivalent to the schema the components
are based on, then show the custom components. If the schema is not
equivalent, then show the generic schema defined fields components. This
will most likely give the user a code editor to input a json document to
define the filter.

* **New Features**
  * Added Cloud Foundry discovery filters: separate Organizations, Spaces,
    and Names in import and review flows.

* **Chores**
  * Updated dependency declarations and added lodash-es integration.
  * Moved and consolidated JSON Schema utilities for clearer schema
    handling and validation.

* **Tests**
  * Expanded JSON Schema utility test coverage and removed tests for a
    deprecated combine helper.

---------

Signed-off-by: Scott J Dickerson <[email protected]>
sjd78 added a commit that referenced this pull request Nov 10, 2025
) (#2722)

Resolves: https://issues.redhat.com/browse/MTA-6326
Resolves: #2709
Backport-Of: #2718
CloudFoundry schema update:
konveyor/operator#484

## Summary

Update the discover application wizard CloudFoundry source platform
filter input and review to support organizations, spaces, and names.

Added the ability to validate that two JSON schemas are functionally
equivalent. This is used to validate that the Cloud Foundry schema is
functionally equivalent to the schema used to build the Cloud Foundry
forms.

If a source platform is kind of "cloudfoundry", and the filter schema
pulled from hub is functionally equivalent to the schema the components
are based on, then show the custom components. If the schema is not
equivalent, then show the generic schema defined fields components. This
will most likely give the user a code editor to input a json document to
define the filter.

## Summary by CodeRabbit

* **New Features**
  * Added Cloud Foundry discovery filters: separate Organizations, Spaces,
    and Names in import and review flows.

* **Chores**
  * Updated dependency declarations and added lodash-es integration.
  * Moved and consolidated JSON Schema utilities for clearer schema
    handling and validation.

* **Tests**
  * Expanded JSON Schema utility test coverage and removed tests for a
    deprecated combine helper.

Signed-off-by: Scott J Dickerson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick/release-0.8 This PR should be cherry-picked to release-0.8 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Organizations are not captured on discover applications wizard

2 participants