geyanggang commented on code in PR #14963:
URL: https://github.com/apache/gravitino/pull/14963#discussion_r4594771230


##########
gradle/libs.versions.toml:
##########
@@ -121,7 +121,7 @@ selenium = "4.33.0"
 rauschig = "1.2.0"
 mybatis = "3.5.6"
 h2db = "2.2.224"
-kafka = "3.4.0"
+kafka = "3.9.2"

Review Comment:
   Done in 051c9545e. The Kafka catalog now constrains `at.yawk.lz4:lz4-java` 
to 1.11.4 (the fix version of GHSA-mcr4-qmvw-px4g). `runtimeClasspath` and 
`testRuntimeClasspath` resolve `1.10.1 -> 1.11.4`, the packaged directory holds 
`lz4-java-1.11.4.jar`, all 26 Kafka unit tests and `spotlessCheck` pass, and 
OSV lists no vulnerability for 1.11.4. A round trip of LZ4, Snappy and Zstd 
record batches with the packaged jars also works. The repository Trivy scan was 
not run locally.



##########
docs/migration-guide.md:
##########
@@ -69,6 +69,58 @@ and shutdown steps in [Upgrade 
Gravitino](./how-to-upgrade.md) before applying t
   whole Kubernetes pod CIDR, lets those clients choose the recorded address 
again. See
   [HTTP Server](./gravitino-server-config.md#http-server).
 
+### Kafka catalog client upgrade
+- The Kafka catalog now ships the Kafka client 3.9.2 instead of 3.4.0. The 
`gravitino.bypass.`
+  properties are passed to this client, so check them against the
+  [Kafka Admin 
Configs](https://kafka.apache.org/39/configuration/admin-configs/).
+- The Kafka catalog rejects `gravitino.bypass.config.providers` and every
+  `gravitino.bypass.config.providers.*` property (for example `.class` and 
`.param.*`), each on its
+  own. Kafka 3.5 added an environment variable config provider, and any 
provider can read the
+  Gravitino server's own environment or files. In 1.3, the file and directory 
providers could be
+  used through these properties. After the upgrade:
+  - Creating, testing, or altering a catalog with any of them is rejected with 
an error that names
+    them. This includes values from `catalogs/kafka/conf/kafka.conf`, so one 
provider property in
+    that file blocks the creation of every Kafka catalog.
+  - An existing catalog that still has any of them fails on schema and topic 
operations and on
+    `testConnection` until they are removed.
+- `kafka.conf` values are copied into the properties of each catalog when it 
is created. Editing
+  or removing the file later does not change existing catalogs, which must be 
updated with
+  `alterCatalog`.
+- Before upgrading, while still on 1.3, take an inventory:
+  1. List every Kafka catalog and `kafka.conf` that has 
`gravitino.bypass.config.providers` or any
+     `gravitino.bypass.config.providers.*` property. Include catalogs that 
have only
+     `gravitino.bypass.config.providers.*` keys: they must be removed even 
when nothing refers to
+     them.
+  2. Read the provider aliases from `gravitino.bypass.config.providers`. Its 
value is a
+     comma-separated list of aliases chosen by the operator, for example 
`file`, `env`, or
+     `fileProvider`. For each alias, search the property values for 
`${<alias>:...}` references.
+     Searching only for `${file:`, `${directory:`, or `${env:` misses custom 
aliases. See
+     [Kafka configuration 
providers](https://kafka.apache.org/39/configuration/configuration-providers/).
+  3. Record the value each reference resolves to, and whether it is a 
credential.
+- Before starting the 2.0 server, remove all provider properties from 
`kafka.conf`. Keep only

Review Comment:
   Done in 051c9545e. The migration guide now tells operators to replace 
non-sensitive `${<alias>:...}` references in `kafka.conf` with their resolved 
values before starting 2.0, and to remove credential-bearing settings and bind 
them per catalog afterwards.



##########
gradle/libs.versions.toml:
##########
@@ -121,7 +121,7 @@ selenium = "4.33.0"
 rauschig = "1.2.0"
 mybatis = "3.5.6"
 h2db = "2.2.224"
-kafka = "3.4.0"
+kafka = "3.9.2"

Review Comment:
   Done in 051c9545e, see the reply above: constrained to 1.11.4, Kafka tests 
pass, packaged jar is `lz4-java-1.11.4.jar`.



##########
docs/migration-guide.md:
##########
@@ -69,6 +69,58 @@ and shutdown steps in [Upgrade 
Gravitino](./how-to-upgrade.md) before applying t
   whole Kubernetes pod CIDR, lets those clients choose the recorded address 
again. See
   [HTTP Server](./gravitino-server-config.md#http-server).
 
+### Kafka catalog client upgrade
+- The Kafka catalog now ships the Kafka client 3.9.2 instead of 3.4.0. The 
`gravitino.bypass.`
+  properties are passed to this client, so check them against the
+  [Kafka Admin 
Configs](https://kafka.apache.org/39/configuration/admin-configs/).
+- The Kafka catalog rejects `gravitino.bypass.config.providers` and every
+  `gravitino.bypass.config.providers.*` property (for example `.class` and 
`.param.*`), each on its
+  own. Kafka 3.5 added an environment variable config provider, and any 
provider can read the
+  Gravitino server's own environment or files. In 1.3, the file and directory 
providers could be
+  used through these properties. After the upgrade:
+  - Creating, testing, or altering a catalog with any of them is rejected with 
an error that names
+    them. This includes values from `catalogs/kafka/conf/kafka.conf`, so one 
provider property in
+    that file blocks the creation of every Kafka catalog.
+  - An existing catalog that still has any of them fails on schema and topic 
operations and on
+    `testConnection` until they are removed.
+- `kafka.conf` values are copied into the properties of each catalog when it 
is created. Editing
+  or removing the file later does not change existing catalogs, which must be 
updated with
+  `alterCatalog`.
+- Before upgrading, while still on 1.3, take an inventory:
+  1. List every Kafka catalog and `kafka.conf` that has 
`gravitino.bypass.config.providers` or any
+     `gravitino.bypass.config.providers.*` property. Include catalogs that 
have only
+     `gravitino.bypass.config.providers.*` keys: they must be removed even 
when nothing refers to
+     them.
+  2. Read the provider aliases from `gravitino.bypass.config.providers`. Its 
value is a
+     comma-separated list of aliases chosen by the operator, for example 
`file`, `env`, or
+     `fileProvider`. For each alias, search the property values for 
`${<alias>:...}` references.
+     Searching only for `${file:`, `${directory:`, or `${env:` misses custom 
aliases. See
+     [Kafka configuration 
providers](https://kafka.apache.org/39/configuration/configuration-providers/).
+  3. Record the value each reference resolves to, and whether it is a 
credential.
+- Before starting the 2.0 server, remove all provider properties from 
`kafka.conf`. Keep only

Review Comment:
   Done in 051c9545e, see the reply above.



-- 
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]

Reply via email to