dennismdejong opened a new pull request, #13706:
URL: https://github.com/apache/gravitino/pull/13706
[#11922] improvement(web-v2): Show AWS Glue properties on the catalog edit
page
### What changes were proposed in this pull request?
The catalog edit dialog only rendered the properties the catalog response
reports, plus the required ones and `region`/`location`. The optional AWS
Glue
properties `aws-glue-catalog-id`, `aws-glue-endpoint`, `default-table-format`
and `table-format-filter` were therefore invisible when a Glue catalog did
not
report them (e.g. a catalog created from the CLI without them).
- `providerBase.glue.defaultProps` flags those four properties with
`alwaysVisible: true`, so they are rendered on the edit page even when the
catalog does not report them yet, and `aws-glue-catalog-id` with
`immutable: true`, so it is read-only while editing (the connector marks it
immutable, a `setProperty` on it is rejected with HTTP 400).
- The dialog visibility, required-field and property-assembly logic moved
into
`src/lib/utils/catalogProperties.js` (`isCatalogPropertyHidden`,
`isCatalogRequiredField`, `buildCatalogProperties`), keeping the existing
behavior and adding the `alwaysVisible` bypass.
- `buildCatalogProperties` leaves an `alwaysVisible` property out of the
request while the catalog does not report it and it still holds its
declared
default (or is empty), so saving an unrelated change no longer writes empty
or default-valued properties.
### Why are the changes needed?
Users could not see or change these four Glue catalog properties on the Web
v2
catalog edit page, even though they can be set at creation time.
Fix: #11922
### Does this PR introduce _any_ user-facing change?
Yes, in the Web v2 catalog edit page for `glue` catalogs:
- `aws-glue-catalog-id`, `aws-glue-endpoint`, `default-table-format` and
`table-format-filter` are now displayed even when the catalog does not
report
them.
- `aws-glue-catalog-id` is read-only while editing, because the connector
treats it as immutable.
No API or property-key changes.
### How was this patch tested?
- Added `src/lib/utils/catalogProperties.test.js` (14 unit tests) covering
the
create/edit visibility rules, the required-field rule, the `alwaysVisible`
interaction with `parentField` visibility and the submitted property map.
- Verified the rendered dialog against a Glue catalog that reports only
`aws-region` and `warehouse` in a throwaway jsdom harness: before this
change
the four fields are absent, after it they are present,
`aws-glue-catalog-id`
is disabled, submitting without edits dispatches no update, and editing
only
`aws-glue-endpoint` produces exactly
`[{"@type":"setProperty","property":"aws-glue-endpoint","value":"http://localhost:4566"}]`.
- `pnpm vitest run`, `pnpm lint`, `pnpm prettier:check` and `next build`
pass.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]