You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "dybyte (via GitHub)" <gi...@apache.org> on 2025/09/04 07:54:22 UTC

[PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

dybyte opened a new pull request, #9818:
URL: https://github.com/apache/seatunnel/pull/9818

   ### Purpose of this pull request
   
   The Paimon connectors CI occasionally fails. In these cases, the tests hang until they timeout, which can take up to 2 hours and is a very cumbersome issue. The failure occurs because the jobs attempt to access the database before the necessary privileges have been granted.
   
   Example error logs:
   ```
   2025-09-03 15:06:32,239 INFO  org.apache.seatunnel.engine.server.TaskExecutionService - [localhost]:5801 [seatunnel] [5.1] task 1000300000000 error with exception: [org.apache.paimon.privilege.NoPrivilegeException: User paimon doesn't have privilege SELECT on table seatunnel_namespace11.st_test], cancel other task in taskGroup TaskGroupLocation{jobId=1015638881762017281, pipelineId=1, taskGroupId=3}.
   ```
   ```
   2025-09-03T16:36:38.8565633Z ##[error]The operation was canceled.
   ```
   
   To address this, a utility class has been added to ensure that the required database privileges are granted before job execution. This should prevent the flaky test behavior and avoid long-running test hang-ups.
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   No
   
   ### How was this patch tested?
   
   Covered by existing test
   
   ### Check list
   
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
   * [ ] If you are contributing the connector code, please check that the following files are updated:
     1. Update [plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties) and add new connector information in it
     2. Update the pom file of [seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
     3. Add ci label in [label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
     4. Add e2e testcase in [seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
     5. Update connector [plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)


-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on PR #9818:
URL: https://github.com/apache/seatunnel/pull/9818#issuecomment-3356121716

   Thanks @dybyte for your work! Even we don't merge this patch.


-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on PR #9818:
URL: https://github.com/apache/seatunnel/pull/9818#issuecomment-3292403638

   > The grant operation of Paimon is synchronous, and this behavior is quite unusual. I think we should pay attention to why the job does not exit (fail fast) after throw exception.
   
   @hawk9821 Should we create another issue to track it? Does it block on this PR be merged?


-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

Posted by "dybyte (via GitHub)" <gi...@apache.org>.
dybyte commented on PR #9818:
URL: https://github.com/apache/seatunnel/pull/9818#issuecomment-3343808338

   The Paimon privilege error logs were actually caused by intentional exceptions in specific tests, so I misinterpreted them earlier.
   However, the issue of Paimon CI jobs being canceled still remains.
   Even after merging recent commits, the problem has not been resolved.
   One thing I noticed is that `updatePipelineState(PipelineStatus.CANCELING)` did not complete for some reason, which I suspect may be due to resource limitations in the CI environment.
   Therefore, I’m fine with closing this PR for now.
   ```
   com.hazelcast.spi.impl.operationexecutor.slowoperationdetector.SlowOperationDetector - [localhost]:5801 [seatunnel] [5.1] Slow operation detected: org.apache.seatunnel.engine.server.checkpoint.operation.CheckpointErrorReportOperation
   2025-09-27T11:08:52.6438740Z [] 2025-09-27 11:08:52,643 INFO  tc.seatunnel-engine:openjdk:8 - STDERR: org.apache.seatunnel.engine.server.dag.physical.SubPlan.updatePipelineState(SubPlan.java:340)
   2025-09-27T11:08:52.6439782Z [] 2025-09-27 11:08:52,643 INFO  tc.seatunnel-engine:openjdk:8 - STDERR: 	org.apache.seatunnel.engine.server.dag.physical.SubPlan.handleCheckpointError(SubPlan.java:601)
   2025-09-27T11:08:52.6441346Z [] 2025-09-27 11:08:52,643 INFO  tc.seatunnel-engine:openjdk:8 - STDERR: 	org.apache.seatunnel.engine.server.master.JobMaster.lambda$handleCheckpointError$8(JobMaster.java:595)
   2025-09-27T11:08:52.6442371Z [] 2025-09-27 11:08:52,643 INFO  tc.seatunnel-engine:openjdk:8 - STDERR: 	org.apache.seatunnel.engine.server.master.JobMaster$$Lambda$3006/1161858620.accept(Unknown Source)
   2025-09-27T11:08:52.6443175Z [] 2025-09-27 11:08:52,643 INFO  tc.seatunnel-engine:openjdk:8 - STDERR: 	java.util.ArrayList.forEach(ArrayList.java:1259)
   2025-09-27T11:08:52.6443990Z [] 2025-09-27 11:08:52,643 INFO  tc.seatunnel-engine:openjdk:8 - STDERR: 	org.apache.seatunnel.engine.server.master.JobMaster.handleCheckpointError(JobMaster.java:592)
   ```


-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

Posted by "dybyte (via GitHub)" <gi...@apache.org>.
dybyte commented on code in PR #9818:
URL: https://github.com/apache/seatunnel/pull/9818#discussion_r2348803253


##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-paimon-e2e/src/test/java/org/apache/seatunnel/e2e/connector/paimon/PrivilegeUtil.java:
##########
@@ -0,0 +1,67 @@
+/*
+ * 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.seatunnel.e2e.connector.paimon;
+
+import org.apache.paimon.catalog.Identifier;
+import org.apache.paimon.privilege.PrivilegeChecker;
+import org.apache.paimon.privilege.PrivilegeType;
+import org.apache.paimon.privilege.PrivilegedCatalog;
+
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+import static org.testcontainers.shaded.org.awaitility.Awaitility.await;
+
+public class PrivilegeUtil {
+    private PrivilegeUtil() {}
+
+    public static void awaitPrivilegeApplied(
+            PrivilegedCatalog privilegedCatalog,
+            List<PrivilegeType> privilegeTypes,
+            List<Identifier> identifiers) {
+        PrivilegeChecker privilegeChecker =
+                privilegedCatalog.privilegeManager().getPrivilegeChecker();
+        await().atMost(30, TimeUnit.SECONDS)
+                .untilAsserted(
+                        () -> {
+                            assertDoesNotThrow(
+                                    () -> {
+                                        for (PrivilegeType type : privilegeTypes) {
+                                            switch (type) {
+                                                case SELECT:
+                                                    for (Identifier tableIdentifier : identifiers) {
+                                                        privilegeChecker.assertCanSelect(
+                                                                tableIdentifier);
+                                                    }
+                                                    break;
+                                                case INSERT:
+                                                    for (Identifier tableIdentifier : identifiers) {
+                                                        privilegeChecker.assertCanInsert(
+                                                                tableIdentifier);
+                                                    }
+                                                    break;
+                                                default:

Review Comment:
   Done, thanks for the suggestion!



-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

Posted by "dybyte (via GitHub)" <gi...@apache.org>.
dybyte commented on code in PR #9818:
URL: https://github.com/apache/seatunnel/pull/9818#discussion_r2348225347


##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-paimon-e2e/src/test/java/org/apache/seatunnel/e2e/connector/paimon/PrivilegeUtil.java:
##########
@@ -0,0 +1,67 @@
+/*
+ * 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.seatunnel.e2e.connector.paimon;
+
+import org.apache.paimon.catalog.Identifier;
+import org.apache.paimon.privilege.PrivilegeChecker;
+import org.apache.paimon.privilege.PrivilegeType;
+import org.apache.paimon.privilege.PrivilegedCatalog;
+
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+import static org.testcontainers.shaded.org.awaitility.Awaitility.await;
+
+public class PrivilegeUtil {
+    private PrivilegeUtil() {}
+
+    public static void awaitPrivilegeApplied(
+            PrivilegedCatalog privilegedCatalog,
+            List<PrivilegeType> privilegeTypes,
+            List<Identifier> identifiers) {
+        PrivilegeChecker privilegeChecker =
+                privilegedCatalog.privilegeManager().getPrivilegeChecker();
+        await().atMost(30, TimeUnit.SECONDS)
+                .untilAsserted(
+                        () -> {
+                            assertDoesNotThrow(
+                                    () -> {
+                                        for (PrivilegeType type : privilegeTypes) {
+                                            switch (type) {
+                                                case SELECT:
+                                                    for (Identifier tableIdentifier : identifiers) {
+                                                        privilegeChecker.assertCanSelect(
+                                                                tableIdentifier);
+                                                    }
+                                                    break;
+                                                case INSERT:
+                                                    for (Identifier tableIdentifier : identifiers) {
+                                                        privilegeChecker.assertCanInsert(
+                                                                tableIdentifier);
+                                                    }
+                                                    break;
+                                                default:

Review Comment:
   Currently, the tests only check for insert and select privileges. I thought it would be fine to add checks for other privileges when we introduce corresponding tests for them. What do you think?



-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

Posted by "zhangshenghang (via GitHub)" <gi...@apache.org>.
zhangshenghang commented on code in PR #9818:
URL: https://github.com/apache/seatunnel/pull/9818#discussion_r2348252742


##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-paimon-e2e/src/test/java/org/apache/seatunnel/e2e/connector/paimon/PrivilegeUtil.java:
##########
@@ -0,0 +1,67 @@
+/*
+ * 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.seatunnel.e2e.connector.paimon;
+
+import org.apache.paimon.catalog.Identifier;
+import org.apache.paimon.privilege.PrivilegeChecker;
+import org.apache.paimon.privilege.PrivilegeType;
+import org.apache.paimon.privilege.PrivilegedCatalog;
+
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+import static org.testcontainers.shaded.org.awaitility.Awaitility.await;
+
+public class PrivilegeUtil {
+    private PrivilegeUtil() {}
+
+    public static void awaitPrivilegeApplied(
+            PrivilegedCatalog privilegedCatalog,
+            List<PrivilegeType> privilegeTypes,
+            List<Identifier> identifiers) {
+        PrivilegeChecker privilegeChecker =
+                privilegedCatalog.privilegeManager().getPrivilegeChecker();
+        await().atMost(30, TimeUnit.SECONDS)
+                .untilAsserted(
+                        () -> {
+                            assertDoesNotThrow(
+                                    () -> {
+                                        for (PrivilegeType type : privilegeTypes) {
+                                            switch (type) {
+                                                case SELECT:
+                                                    for (Identifier tableIdentifier : identifiers) {
+                                                        privilegeChecker.assertCanSelect(
+                                                                tableIdentifier);
+                                                    }
+                                                    break;
+                                                case INSERT:
+                                                    for (Identifier tableIdentifier : identifiers) {
+                                                        privilegeChecker.assertCanInsert(
+                                                                tableIdentifier);
+                                                    }
+                                                    break;
+                                                default:

Review Comment:
   > Currently, the tests only check for insert and select privileges. I thought it would be fine to add checks for other privileges when we introduce corresponding tests for them. What do you think?
   
   @dybyte  Sure, but it would be better if we could improve it when adding methods. See your schedule.



-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

Posted by "dybyte (via GitHub)" <gi...@apache.org>.
dybyte commented on PR #9818:
URL: https://github.com/apache/seatunnel/pull/9818#issuecomment-3294380844

   I’m not entirely certain why the permission check still throws an exception even after the retry. However, it seems that the reason the job does not terminate afterward may be related to #9749 .
   
   Typically, tests verify behavior with assertions after the job has successfully completed. In this particular case, however, an exception occurs during the job execution itself. As a result, the job is likely not removed from `pendingJobMasterMap` and continues to be counted in `runningJobCount`.
   
   For more details, please see the end of this log:
   https://github.com/dybyte/seatunnel/actions/runs/17436786971/job/49509156864
   ```
   2025-09-03T15:41:40.5697311Z [] 2025-09-03 15:41:40,568 INFO  tc.seatunnel-engine:openjdk:8 - STDOUT: ***********************************************
   2025-09-03T15:41:40.5698018Z [] 2025-09-03 15:41:40,568 INFO  tc.seatunnel-engine:openjdk:8 - STDOUT:                 Job info detail
   2025-09-03T15:41:40.5698734Z [] 2025-09-03 15:41:40,568 INFO  tc.seatunnel-engine:openjdk:8 - STDOUT: ***********************************************
   2025-09-03T15:41:40.5699653Z [] 2025-09-03 15:41:40,568 INFO  tc.seatunnel-engine:openjdk:8 - STDOUT: createdJobCount           :                   0
   2025-09-03T15:41:40.5700308Z [] 2025-09-03 15:41:40,568 INFO  tc.seatunnel-engine:openjdk:8 - STDOUT: pendingJobCount           :                   0
   2025-09-03T15:41:40.5700922Z [] 2025-09-03 15:41:40,568 INFO  tc.seatunnel-engine:openjdk:8 - STDOUT: scheduledJobCount         :                   0
   2025-09-03T15:41:40.5701606Z [] 2025-09-03 15:41:40,568 INFO  tc.seatunnel-engine:openjdk:8 - STDOUT: runningJobCount           :                   1
   2025-09-03T15:41:40.5702402Z [] 2025-09-03 15:41:40,568 INFO  tc.seatunnel-engine:openjdk:8 - STDOUT: failingJobCount           :                   0
   2025-09-03T15:41:40.5702986Z [] 2025-09-03 15:41:40,568 INFO  tc.seatunnel-engine:openjdk:8 - STDOUT: failedJobCount            :                   0
   2025-09-03T15:41:40.5703563Z [] 2025-09-03 15:41:40,568 INFO  tc.seatunnel-engine:openjdk:8 - STDOUT: cancellingJobCount        :                   0
   2025-09-03T15:41:40.5704134Z [] 2025-09-03 15:41:40,568 INFO  tc.seatunnel-engine:openjdk:8 - STDOUT: canceledJobCount          :                   0
   2025-09-03T15:41:40.5704791Z [] 2025-09-03 15:41:40,568 INFO  tc.seatunnel-engine:openjdk:8 - STDOUT: finishedJobCount          :                   0
   2025-09-03T15:41:40.5705342Z [] 2025-09-03 15:41:40,568 INFO  tc.seatunnel-engine:openjdk:8 - STDOUT: ***********************************************
   ```
   @Hisoka-X @hawk9821 @zhangshenghang 


-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

Posted by "dybyte (via GitHub)" <gi...@apache.org>.
dybyte commented on PR #9818:
URL: https://github.com/apache/seatunnel/pull/9818#issuecomment-3299851730

   Since this only happens occasionally in CI, it's hard to pinpoint the exact cause.
   My previous comments are just guesses based on the logs, nothing is confirmed yet.
   If anyone can find a way to reproduce it consistently, please let me know.


-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

Posted by "hawk9821 (via GitHub)" <gi...@apache.org>.
hawk9821 commented on PR #9818:
URL: https://github.com/apache/seatunnel/pull/9818#issuecomment-3344469363

   > The Paimon privilege error logs were actually caused by intentional exceptions in specific tests, so I misinterpreted them. Sorry for any confusion caused. @Hisoka-X @hawk9821 @zhangshenghang However, the issue of Paimon CI jobs being canceled still remains. Even after merging recent commits, the problem has not been resolved. One thing I noticed is that `updatePipelineState(PipelineStatus.CANCELING)` did not complete for some reason, which I suspect may be due to resource limitations in the CI environment. Therefore, I’m fine with closing this PR for now.
   > 
   > ```
   > com.hazelcast.spi.impl.operationexecutor.slowoperationdetector.SlowOperationDetector - [localhost]:5801 [seatunnel] [5.1] Slow operation detected: org.apache.seatunnel.engine.server.checkpoint.operation.CheckpointErrorReportOperation
   > 2025-09-27T11:08:52.6438740Z [] 2025-09-27 11:08:52,643 INFO  tc.seatunnel-engine:openjdk:8 - STDERR: org.apache.seatunnel.engine.server.dag.physical.SubPlan.updatePipelineState(SubPlan.java:340)
   > 2025-09-27T11:08:52.6439782Z [] 2025-09-27 11:08:52,643 INFO  tc.seatunnel-engine:openjdk:8 - STDERR: 	org.apache.seatunnel.engine.server.dag.physical.SubPlan.handleCheckpointError(SubPlan.java:601)
   > 2025-09-27T11:08:52.6441346Z [] 2025-09-27 11:08:52,643 INFO  tc.seatunnel-engine:openjdk:8 - STDERR: 	org.apache.seatunnel.engine.server.master.JobMaster.lambda$handleCheckpointError$8(JobMaster.java:595)
   > 2025-09-27T11:08:52.6442371Z [] 2025-09-27 11:08:52,643 INFO  tc.seatunnel-engine:openjdk:8 - STDERR: 	org.apache.seatunnel.engine.server.master.JobMaster$$Lambda$3006/1161858620.accept(Unknown Source)
   > 2025-09-27T11:08:52.6443175Z [] 2025-09-27 11:08:52,643 INFO  tc.seatunnel-engine:openjdk:8 - STDERR: 	java.util.ArrayList.forEach(ArrayList.java:1259)
   > 2025-09-27T11:08:52.6443990Z [] 2025-09-27 11:08:52,643 INFO  tc.seatunnel-engine:openjdk:8 - STDERR: 	org.apache.seatunnel.engine.server.master.JobMaster.handleCheckpointError(JobMaster.java:592)
   > ```
   
   If the issue is related to resources, we should let it fail fast , it is appropriate to rerun it.
   


-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

Posted by "dybyte (via GitHub)" <gi...@apache.org>.
dybyte closed pull request #9818: [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests
URL: https://github.com/apache/seatunnel/pull/9818


-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

Posted by "hawk9821 (via GitHub)" <gi...@apache.org>.
hawk9821 commented on PR #9818:
URL: https://github.com/apache/seatunnel/pull/9818#issuecomment-3291252055

   I think we should pay attention to why the task does not exit after throw exception. 


-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

Posted by "zhangshenghang (via GitHub)" <gi...@apache.org>.
zhangshenghang commented on PR #9818:
URL: https://github.com/apache/seatunnel/pull/9818#issuecomment-3292769523

   > > The grant operation of Paimon is synchronous, and this behavior is quite unusual. I think we should pay attention to why the job does not exit (fail fast) after throw exception.
   > 
   > @hawk9821 Should we create another issue to track it? Does it block on this PR be merged?
   
   Yes, we can fix it first and analyze the cause of the problem as a separate issue


-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

Posted by "zhangshenghang (via GitHub)" <gi...@apache.org>.
zhangshenghang commented on PR #9818:
URL: https://github.com/apache/seatunnel/pull/9818#issuecomment-3299097238

   > After reviewing the CI logs again I noticed Slow operation detected messages for `CheckpointErrorReportOperation`. In the CI environment, multiple jobs run concurrently and resources may be constrained, which can delay Hazelcast’s OperationThreads. This could potentially cause pipeline state updates or checkpoint error handling to be postponed, leaving the job stuck in the “running” state..
   
   If it's the problem you mentioned, not only does Paimon have this issue, but many places have the same problem? Can we reproduce this problem? Or should we wait until # 9749 is merged before verifying?


-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on PR #9818:
URL: https://github.com/apache/seatunnel/pull/9818#issuecomment-3339003576

   So, let's push this pathc now? @dybyte 


-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on PR #9818:
URL: https://github.com/apache/seatunnel/pull/9818#issuecomment-3300985008

   We can waiting https://github.com/apache/seatunnel/pull/9749 be merged, then see what would happend in this case.


-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

Posted by "zhangshenghang (via GitHub)" <gi...@apache.org>.
zhangshenghang commented on code in PR #9818:
URL: https://github.com/apache/seatunnel/pull/9818#discussion_r2348155676


##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-paimon-e2e/src/test/java/org/apache/seatunnel/e2e/connector/paimon/PrivilegeUtil.java:
##########
@@ -0,0 +1,67 @@
+/*
+ * 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.seatunnel.e2e.connector.paimon;
+
+import org.apache.paimon.catalog.Identifier;
+import org.apache.paimon.privilege.PrivilegeChecker;
+import org.apache.paimon.privilege.PrivilegeType;
+import org.apache.paimon.privilege.PrivilegedCatalog;
+
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+import static org.testcontainers.shaded.org.awaitility.Awaitility.await;
+
+public class PrivilegeUtil {
+    private PrivilegeUtil() {}
+
+    public static void awaitPrivilegeApplied(
+            PrivilegedCatalog privilegedCatalog,
+            List<PrivilegeType> privilegeTypes,
+            List<Identifier> identifiers) {
+        PrivilegeChecker privilegeChecker =
+                privilegedCatalog.privilegeManager().getPrivilegeChecker();
+        await().atMost(30, TimeUnit.SECONDS)
+                .untilAsserted(
+                        () -> {
+                            assertDoesNotThrow(
+                                    () -> {
+                                        for (PrivilegeType type : privilegeTypes) {
+                                            switch (type) {
+                                                case SELECT:
+                                                    for (Identifier tableIdentifier : identifiers) {
+                                                        privilegeChecker.assertCanSelect(
+                                                                tableIdentifier);
+                                                    }
+                                                    break;
+                                                case INSERT:
+                                                    for (Identifier tableIdentifier : identifiers) {
+                                                        privilegeChecker.assertCanInsert(
+                                                                tableIdentifier);
+                                                    }
+                                                    break;
+                                                default:

Review Comment:
   Hi,why was only SELECT/INSERT checked here?



-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Await privilege grant to fix flaky Paimon tests [seatunnel]

Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on PR #9818:
URL: https://github.com/apache/seatunnel/pull/9818#issuecomment-3257600701

   cc @hawk9821 as well.


-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org