Skip to content

Conversation

@shuttie
Copy link

@shuttie shuttie commented Jan 5, 2026

https://issues.apache.org/jira/browse/FLINK-38863

This PR fixes the mvn test failing with the error:

[INFO] Running org.apache.flink.architecture.rules.ConnectorRules
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.029 s <<< FAILURE! - in org.apache.flink.architecture.rules.ConnectorRules
[ERROR] ConnectorRules.CONNECTOR_CLASSES_ONLY_DEPEND_ON_PUBLIC_API  Time elapsed: 0.027 s  <<< FAILURE!
java.lang.AssertionError: 
Architecture Violation [Priority: MEDIUM] - Rule 'Connector production code must depend only on public API when outside of connector packages' was violated (1 times):
Method <org.apache.flink.connector.opensearch.table.IndexGeneratorFactory.createRuntimeIndexGenerator(java.lang.String, [Ljava.lang.String;, [Lorg.apache.flink.table.types.DataType;, 
org.apache.flink.connector.opensearch.table.IndexGeneratorFactory$IndexHelper, java.time.ZoneId)> has parameter of type <[Lorg.apache.flink.table.types.DataType;> in (IndexGeneratorFactory.java:0)
        at com.tngtech.archunit.lang.ArchRule$Assertions.assertNoViolation(ArchRule.java:94)
        at com.tngtech.archunit.lang.ArchRule$Assertions.check(ArchRule.java:86)
        at com.tngtech.archunit.library.freeze.FreezingArchRule.check(FreezingArchRule.java:97)
        at com.tngtech.archunit.junit.internal.ArchUnitTestDescriptor$ArchUnitRuleDescriptor.execute(ArchUnitTestDescriptor.java:166)
        at com.tngtech.archunit.junit.internal.ArchUnitTestDescriptor$ArchUnitRuleDescriptor.execute(ArchUnitTestDescriptor.java:149)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

Changes:

  • As createRuntimeIndexGenerator only needs LogicalType and not DataType, we just change the signature to use non-private class.
  • We also removed excessive List <-> Array conversions.

Testing:

  • This PR should have no user-visible changes, as we only change signatures of private methods.

Notes:

  • A lot of previous archunit violations are now gone, probably due to the upstream Flink fixes.

@boring-cyborg
Copy link

boring-cyborg bot commented Jan 5, 2026

Thanks for opening this pull request! Please check out our contributing guidelines. (https://flink.apache.org/contributing/how-to-contribute.html)

Copy link
Member

@reta reta left a comment

Choose a reason for hiding this comment

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

Thank you @shuttie !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants