You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "FANNG1 (via GitHub)" <gi...@apache.org> on 2026/01/21 03:43:14 UTC
[PR] [#9760] feat(client): disable version check by enviroment varibles [gravitino]
FANNG1 opened a new pull request, #9763:
URL: https://github.com/apache/gravitino/pull/9763
### What changes were proposed in this pull request?
disable version check by enviroment varibles
### Why are the changes needed?
Fix: #9760
### Does this PR introduce _any_ user-facing change?
no
### How was this patch tested?
existsing tests
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9760] feat(client): disable version check by enviroment varibles [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #9763:
URL: https://github.com/apache/gravitino/pull/9763#discussion_r2726496018
##########
clients/client-python/gravitino/client/gravitino_client_base.py:
##########
@@ -71,9 +73,13 @@ def __init__(
request_headers=new_headers,
client_config=client_config,
)
- if check_version:
+ if check_version and not self._is_version_check_disabled_by_env():
Review Comment:
thx
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9760] feat(client): disable version check by enviroment varibles [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #9763:
URL: https://github.com/apache/gravitino/pull/9763#discussion_r2716133463
##########
clients/client-java/src/test/java/org/apache/gravitino/client/TestVersionCheck.java:
##########
@@ -0,0 +1,184 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.gravitino.client;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import java.util.Collections;
+import org.apache.gravitino.Version;
+import org.apache.gravitino.dto.VersionDTO;
+import org.apache.gravitino.dto.responses.VersionResponse;
+import org.apache.gravitino.exceptions.GravitinoRuntimeException;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.Method;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.mockserver.matchers.Times;
+import org.mockserver.model.HttpRequest;
+import org.mockserver.model.HttpResponse;
+
+public class TestVersionCheck extends TestBase {
+
+ private static class TestClient extends GravitinoClientBase {
+ protected TestClient(String uri, AuthDataProvider authDataProvider, boolean checkVersion) {
+ super(uri, authDataProvider, checkVersion, Collections.emptyMap(), Collections.emptyMap());
+ }
+ }
+
+ private static class TestBuilder extends GravitinoClientBase.Builder<TestClient> {
+ private static String envValue;
+
+ protected TestBuilder() {
+ super("http://localhost:12345");
+ }
+
+ @Override
+ protected String versionCheckDisabledEnvValue() {
+ return envValue;
+ }
+
+ @Override
+ public TestClient build() {
+ return new TestClient(uri, authDataProvider, isVersionCheckEnabled());
+ }
+
+ private boolean isEnabled() {
+ return isVersionCheckEnabled();
+ }
+ }
+
+ @AfterEach
+ public void resetEnvValue() {
+ TestBuilder.envValue = null;
+ }
+
+ @Test
+ public void testEnvDisablesVersionCheck() {
+ TestBuilder.envValue = "true";
+ TestBuilder builder = new TestBuilder();
+
+ Assertions.assertFalse(builder.isEnabled());
+ }
+
+ @Test
+ public void testEnvIsCaseInsensitive() {
+ TestBuilder.envValue = "TrUe";
+ TestBuilder builder = new TestBuilder();
+
+ Assertions.assertFalse(builder.isEnabled());
+ }
+
+ @Test
+ public void testEnvFalseKeepsVersionCheckEnabled() {
+ TestBuilder.envValue = "false";
+ TestBuilder builder = new TestBuilder();
+
+ Assertions.assertTrue(builder.isEnabled());
+ }
+
+ @Test
+ public void testExplicitDisableOverridesEnvFalse() {
+ TestBuilder.envValue = "false";
+ TestBuilder builder = new TestBuilder();
+ builder.withVersionCheckDisabled();
+
+ Assertions.assertFalse(builder.isEnabled());
+ }
+
+ @Test
+ public void testGetServerVersion() throws JsonProcessingException {
+ String version = "0.1.3";
+ String date = "2024-01-03 12:28:33";
+ String commitId = "6ef1f9d";
+
+ VersionResponse resp = new VersionResponse(new VersionDTO(version, date, commitId));
+ buildMockResource(Method.GET, "/api/version", null, resp, HttpStatus.SC_OK);
+ GravitinoVersion gravitinoVersion = client.serverVersion();
+
+ Assertions.assertEquals(version, gravitinoVersion.version());
+ Assertions.assertEquals(date, gravitinoVersion.compileDate());
+ Assertions.assertEquals(commitId, gravitinoVersion.gitCommit());
+ }
+
+ @Test
+ public void testGetClientVersion() {
+ GravitinoVersion version = client.clientVersion();
+ Version.VersionInfo currentVersion = Version.getCurrentVersion();
+
+ Assertions.assertEquals(currentVersion.version, version.version());
+ Assertions.assertEquals(currentVersion.compileDate, version.compileDate());
+ Assertions.assertEquals(currentVersion.gitCommit, version.gitCommit());
+ }
+
+ @Test
+ public void testCheckVersionFailed() throws JsonProcessingException {
+ String version = "0.1.1";
+ String date = "2024-01-03 12:28:33";
+ String commitId = "6ef1f9d";
+
+ VersionResponse resp = new VersionResponse(new VersionDTO(version, date, commitId));
+ buildMockResource(Method.GET, "/api/version", null, resp, HttpStatus.SC_OK);
+
+ // check the client version is greater than server version
+ Assertions.assertThrows(GravitinoRuntimeException.class, () -> client.checkVersion());
+ }
+
Review Comment:
add `testVersionCheckSkippedByEnv`
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9760] feat(client): disable version check by enviroment varibles [gravitino]
Posted by "diqiu50 (via GitHub)" <gi...@apache.org>.
diqiu50 commented on code in PR #9763:
URL: https://github.com/apache/gravitino/pull/9763#discussion_r2719276254
##########
clients/client-python/gravitino/client/gravitino_client_base.py:
##########
@@ -71,9 +73,13 @@ def __init__(
request_headers=new_headers,
client_config=client_config,
)
- if check_version:
+ if check_version and not self._is_version_check_disabled_by_env():
Review Comment:
Would it be better to initialize this variable in the class initialize
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9760] feat(client): disable version check by enviroment varibles [gravitino]
Posted by "diqiu50 (via GitHub)" <gi...@apache.org>.
diqiu50 commented on code in PR #9763:
URL: https://github.com/apache/gravitino/pull/9763#discussion_r2715614687
##########
clients/client-java/src/test/java/org/apache/gravitino/client/TestVersionCheck.java:
##########
@@ -0,0 +1,184 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.gravitino.client;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import java.util.Collections;
+import org.apache.gravitino.Version;
+import org.apache.gravitino.dto.VersionDTO;
+import org.apache.gravitino.dto.responses.VersionResponse;
+import org.apache.gravitino.exceptions.GravitinoRuntimeException;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.Method;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.mockserver.matchers.Times;
+import org.mockserver.model.HttpRequest;
+import org.mockserver.model.HttpResponse;
+
+public class TestVersionCheck extends TestBase {
+
+ private static class TestClient extends GravitinoClientBase {
+ protected TestClient(String uri, AuthDataProvider authDataProvider, boolean checkVersion) {
+ super(uri, authDataProvider, checkVersion, Collections.emptyMap(), Collections.emptyMap());
+ }
+ }
+
+ private static class TestBuilder extends GravitinoClientBase.Builder<TestClient> {
+ private static String envValue;
+
+ protected TestBuilder() {
+ super("http://localhost:12345");
+ }
+
+ @Override
+ protected String versionCheckDisabledEnvValue() {
+ return envValue;
+ }
+
+ @Override
+ public TestClient build() {
+ return new TestClient(uri, authDataProvider, isVersionCheckEnabled());
+ }
+
+ private boolean isEnabled() {
+ return isVersionCheckEnabled();
+ }
+ }
+
+ @AfterEach
+ public void resetEnvValue() {
+ TestBuilder.envValue = null;
+ }
+
+ @Test
+ public void testEnvDisablesVersionCheck() {
+ TestBuilder.envValue = "true";
+ TestBuilder builder = new TestBuilder();
+
+ Assertions.assertFalse(builder.isEnabled());
+ }
+
+ @Test
+ public void testEnvIsCaseInsensitive() {
+ TestBuilder.envValue = "TrUe";
+ TestBuilder builder = new TestBuilder();
+
+ Assertions.assertFalse(builder.isEnabled());
+ }
+
+ @Test
+ public void testEnvFalseKeepsVersionCheckEnabled() {
+ TestBuilder.envValue = "false";
+ TestBuilder builder = new TestBuilder();
+
+ Assertions.assertTrue(builder.isEnabled());
+ }
+
+ @Test
+ public void testExplicitDisableOverridesEnvFalse() {
+ TestBuilder.envValue = "false";
+ TestBuilder builder = new TestBuilder();
+ builder.withVersionCheckDisabled();
+
+ Assertions.assertFalse(builder.isEnabled());
+ }
+
+ @Test
+ public void testGetServerVersion() throws JsonProcessingException {
+ String version = "0.1.3";
+ String date = "2024-01-03 12:28:33";
+ String commitId = "6ef1f9d";
+
+ VersionResponse resp = new VersionResponse(new VersionDTO(version, date, commitId));
+ buildMockResource(Method.GET, "/api/version", null, resp, HttpStatus.SC_OK);
+ GravitinoVersion gravitinoVersion = client.serverVersion();
+
+ Assertions.assertEquals(version, gravitinoVersion.version());
+ Assertions.assertEquals(date, gravitinoVersion.compileDate());
+ Assertions.assertEquals(commitId, gravitinoVersion.gitCommit());
+ }
+
+ @Test
+ public void testGetClientVersion() {
+ GravitinoVersion version = client.clientVersion();
+ Version.VersionInfo currentVersion = Version.getCurrentVersion();
+
+ Assertions.assertEquals(currentVersion.version, version.version());
+ Assertions.assertEquals(currentVersion.compileDate, version.compileDate());
+ Assertions.assertEquals(currentVersion.gitCommit, version.gitCommit());
+ }
+
+ @Test
+ public void testCheckVersionFailed() throws JsonProcessingException {
+ String version = "0.1.1";
+ String date = "2024-01-03 12:28:33";
+ String commitId = "6ef1f9d";
+
+ VersionResponse resp = new VersionResponse(new VersionDTO(version, date, commitId));
+ buildMockResource(Method.GET, "/api/version", null, resp, HttpStatus.SC_OK);
+
+ // check the client version is greater than server version
+ Assertions.assertThrows(GravitinoRuntimeException.class, () -> client.checkVersion());
+ }
+
Review Comment:
Can we add a tester testSkipCheckVersionFailed like `testCheckVersionFailed`
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9760] feat(client): disable version check by enviroment varibles [gravitino]
Posted by "mchades (via GitHub)" <gi...@apache.org>.
mchades commented on code in PR #9763:
URL: https://github.com/apache/gravitino/pull/9763#discussion_r2715086389
##########
clients/client-java/src/main/java/org/apache/gravitino/client/GravitinoClientBase.java:
##########
@@ -49,6 +49,8 @@ public abstract class GravitinoClientBase implements Closeable {
/** The REST client to communicate with the REST server */
protected final RESTClient restClient;
+ /** Environment variable to disable version checks. */
+ private static final String VERSION_CHECK_DISABLED_ENV = "GRAVITINO_VERSION_CHECK_DISABLED";
Review Comment:
Should you update the user doc for this?
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9760] feat(client): disable version check by enviroment varibles [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #9763:
URL: https://github.com/apache/gravitino/pull/9763#discussion_r2726273672
##########
clients/client-python/gravitino/client/gravitino_client_base.py:
##########
@@ -71,9 +73,13 @@ def __init__(
request_headers=new_headers,
client_config=client_config,
)
- if check_version:
+ if check_version and not self._is_version_check_disabled_by_env():
Review Comment:
I prefer to keep current impl because `check_version` properties are set by the user, this is clearer
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9760] feat(client): disable version check by enviroment varibles [gravitino]
Posted by "diqiu50 (via GitHub)" <gi...@apache.org>.
diqiu50 commented on code in PR #9763:
URL: https://github.com/apache/gravitino/pull/9763#discussion_r2715112887
##########
clients/client-java/src/test/java/org/apache/gravitino/client/TestVersionCheckDisabledEnv.java:
##########
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.gravitino.client;
+
+import java.util.Collections;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+public class TestVersionCheckDisabledEnv {
+
Review Comment:
I suggest moving the tests to TestGravitinoAdminClient. All version-related tests are there.
Another option is to move all version-related tests to this class, which is also OK.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9760] feat(client): disable version check by enviroment varibles [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on PR #9763:
URL: https://github.com/apache/gravitino/pull/9763#issuecomment-3780023325
I don't have strong feelings, what's your opinion? @diqiu50 @mchades
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9760] feat(client): disable version check by enviroment varibles [gravitino]
Posted by "diqiu50 (via GitHub)" <gi...@apache.org>.
diqiu50 merged PR #9763:
URL: https://github.com/apache/gravitino/pull/9763
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9760] feat(client): disable version check by enviroment varibles [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #9763:
URL: https://github.com/apache/gravitino/pull/9763#discussion_r2715142772
##########
clients/client-java/src/main/java/org/apache/gravitino/client/GravitinoClientBase.java:
##########
@@ -49,6 +49,8 @@ public abstract class GravitinoClientBase implements Closeable {
/** The REST client to communicate with the REST server */
protected final RESTClient restClient;
+ /** Environment variable to disable version checks. */
+ private static final String VERSION_CHECK_DISABLED_ENV = "GRAVITINO_VERSION_CHECK_DISABLED";
Review Comment:
sure, updated
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9760] feat(client): disable version check by enviroment varibles [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #9763:
URL: https://github.com/apache/gravitino/pull/9763#discussion_r2715673478
##########
clients/client-python/gravitino/client/gravitino_client_base.py:
##########
@@ -71,9 +73,13 @@ def __init__(
request_headers=new_headers,
client_config=client_config,
)
- if check_version:
+ if check_version and not self._is_version_check_disabled_by_env():
Review Comment:
it requires the client side to invode disable check version method explictly
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9760] feat(client): disable version check by enviroment varibles [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #9763:
URL: https://github.com/apache/gravitino/pull/9763#discussion_r2715142324
##########
clients/client-java/src/test/java/org/apache/gravitino/client/TestVersionCheckDisabledEnv.java:
##########
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.gravitino.client;
+
+import java.util.Collections;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+public class TestVersionCheckDisabledEnv {
+
Review Comment:
move all version-related tests to this class, as version version is not limited to Gravitino admin client
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9760] feat(client): disable version check by enviroment varibles [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on PR #9763:
URL: https://github.com/apache/gravitino/pull/9763#issuecomment-3782308346
@mchades @diqiu50 comments are addressed, PTAL
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9760] feat(client): disable version check by enviroment varibles [gravitino]
Posted by "diqiu50 (via GitHub)" <gi...@apache.org>.
diqiu50 commented on code in PR #9763:
URL: https://github.com/apache/gravitino/pull/9763#discussion_r2715652780
##########
clients/client-python/gravitino/client/gravitino_client_base.py:
##########
@@ -71,9 +73,13 @@ def __init__(
request_headers=new_headers,
client_config=client_config,
)
- if check_version:
+ if check_version and not self._is_version_check_disabled_by_env():
Review Comment:
Why don‘t we use `check_version` directly
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9760] feat(client): disable version check by enviroment varibles [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #9763:
URL: https://github.com/apache/gravitino/pull/9763#discussion_r2726278529
##########
clients/client-java/src/main/java/org/apache/gravitino/client/GravitinoClientBase.java:
##########
@@ -49,6 +49,8 @@ public abstract class GravitinoClientBase implements Closeable {
/** The REST client to communicate with the REST server */
protected final RESTClient restClient;
+ /** Environment variable to disable version checks. */
+ private static final String VERSION_CHECK_DISABLED_ENV = "GRAVITINO_VERSION_CHECK_DISABLED";
Review Comment:
removed document
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9760] feat(client): disable version check by enviroment varibles [gravitino]
Posted by "diqiu50 (via GitHub)" <gi...@apache.org>.
diqiu50 commented on code in PR #9763:
URL: https://github.com/apache/gravitino/pull/9763#discussion_r2726487832
##########
clients/client-python/gravitino/client/gravitino_client_base.py:
##########
@@ -71,9 +73,13 @@ def __init__(
request_headers=new_headers,
client_config=client_config,
)
- if check_version:
+ if check_version and not self._is_version_check_disabled_by_env():
Review Comment:
I think using fewer conditional variables to control this would be better, but your approach also works.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org