This is an automated email from the ASF dual-hosted git repository.
davidradl pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-connector-http.git
The following commit(s) were added to refs/heads/main by this push:
new b4d1642 [FLINK-40030][connector-http] Add architecture tests (#50)
b4d1642 is described below
commit b4d164265ed173daae1502df878dfba546933687
Author: Bharath Reddy Gunapati
<[email protected]>
AuthorDate: Wed Jul 8 14:45:19 2026 +0530
[FLINK-40030][connector-http] Add architecture tests (#50)
* [FLINK-40030][connector-http] Add architecture tests
Add the standard Flink architecture tests (ArchUnit) to the HTTP connector,
matching the setup used by other Flink connectors (kafka, jdbc, aws):
- Add test-scoped flink-architecture-tests-test and
flink-architecture-tests-production dependencies.
- Add ProductionCodeArchitectureTest and TestCodeArchitectureTest under
org.apache.flink.architecture.
- Add archunit.properties with the standard freezing-store configuration
(archRule.failOnEmptyShould=false for rules not applicable to this
connector).
- Commit the initial archunit-violations freezing store as a baseline.
Existing violations are recorded in the frozen baseline rather than fixed
here, keeping the change scoped to adding the tests (see FLINK-24138). No
production code is changed; the added dependencies are test-only.
Co-authored-by: Cursor <[email protected]>
* [hotfix] Trigger CI
* [FLINK-40030][connector-http] Declare directly-used ArchUnit dependencies
The CI dependency:analyze check (failOnWarning=true) flagged archunit,
archunit-junit5-api and flink-architecture-tests-base as "used undeclared"
because the architecture test classes reference them directly while they
were
only pulled in transitively via flink-architecture-tests-test.
Declare them explicitly (test scope) and manage archunit via an
archunit.version
property, mirroring the setup in flink-connector-kafka. This satisfies both
the
dependency:analyze and dependency-convergence checks.
Co-authored-by: Cursor <[email protected]>
* un-froze the @VisibleForTesting rule
---------
Co-authored-by: Cursor <[email protected]>
---
.../0235210c-8f55-49c8-af8f-25be472a75bb | 0
.../09015216-6ca6-4513-8e4a-90022b27e585 | 55 ++++++++++++++++++++++
.../0ad5944b-db82-448f-bf5f-b06e9a9d5920 | 0
.../549f92ae-28be-45e9-8d28-2f04b6d51ddf | 0
.../b1988061-4505-4335-9707-e0492c5ba0e9 | 9 ++++
.../bc5e0f5a-0057-4403-afe5-6a815bbbcb00 | 0
.../c9df5a69-87e3-43ee-8c10-cd8c08c7ad38 | 0
.../e255fc59-3eb9-4ba6-9911-6ebb479e394a | 4 ++
.../archunit-violations/stored.rules | 10 ++++
flink-connector-http/pom.xml | 31 ++++++++++++
.../connector/http/table/lookup/LookupRow.java | 2 -
.../ProductionCodeArchitectureTest.java | 41 ++++++++++++++++
.../architecture/TestCodeArchitectureTest.java | 40 ++++++++++++++++
.../src/test/resources/archunit.properties | 35 ++++++++++++++
pom.xml | 36 ++++++++++++++
15 files changed, 261 insertions(+), 2 deletions(-)
diff --git
a/flink-connector-http/archunit-violations/0235210c-8f55-49c8-af8f-25be472a75bb
b/flink-connector-http/archunit-violations/0235210c-8f55-49c8-af8f-25be472a75bb
new file mode 100644
index 0000000..e69de29
diff --git
a/flink-connector-http/archunit-violations/09015216-6ca6-4513-8e4a-90022b27e585
b/flink-connector-http/archunit-violations/09015216-6ca6-4513-8e4a-90022b27e585
new file mode 100644
index 0000000..49c3e98
--- /dev/null
+++
b/flink-connector-http/archunit-violations/09015216-6ca6-4513-8e4a-90022b27e585
@@ -0,0 +1,55 @@
+Class
<org.apache.flink.connector.http.table.lookup.JavaNetHttpPollingClient$1>
extends class
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.type.TypeReference>
in (JavaNetHttpPollingClient.java:0)
+Class
<org.apache.flink.connector.http.table.lookup.JavaNetHttpPollingClient$1> has
generic superclass
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.type.TypeReference<java.util.List<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode>>>
with type argument depending on
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode> in
(JavaNetHttpPollingClient.java:0)
+Constructor
<org.apache.flink.connector.http.table.lookup.JavaNetHttpPollingClient$1.<init>(org.apache.flink.connector.http.table.lookup.JavaNetHttpPollingClient)>
calls constructor
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.type.TypeReference.<init>()>
in (JavaNetHttpPollingClient.java:363)
+Constructor
<org.apache.flink.connector.http.table.lookup.JavaNetHttpPollingClient.<init>(java.net.http.HttpClient,
org.apache.flink.api.common.serialization.DeserializationSchema,
org.apache.flink.connector.http.table.lookup.HttpLookupConfig,
org.apache.flink.connector.http.table.lookup.HttpRequestFactory)> calls
constructor
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper.<init>()>
in (JavaNetHttpPollingClient.java:97)
+Field
<org.apache.flink.connector.http.table.lookup.HttpTableLookupFunction.lookupRow>
is annotated with <org.apache.flink.annotation.VisibleForTesting> in
(HttpTableLookupFunction.java:0)
+Field
<org.apache.flink.connector.http.table.lookup.HttpTableLookupFunction.options>
is annotated with <org.apache.flink.annotation.VisibleForTesting> in
(HttpTableLookupFunction.java:0)
+Field
<org.apache.flink.connector.http.table.lookup.JavaNetHttpPollingClient.objectMapper>
has type
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper>
in (JavaNetHttpPollingClient.java:0)
+Field
<org.apache.flink.connector.http.table.lookup.querycreators.ObjectMapperAdapter.MAPPER>
has type
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper>
in (ObjectMapperAdapter.java:0)
+Method
<org.apache.flink.connector.http.auth.OidcAccessTokenManager.requestAccessToken()>
calls constructor
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper.<init>()>
in (OidcAccessTokenManager.java:105)
+Method
<org.apache.flink.connector.http.auth.OidcAccessTokenManager.requestAccessToken()>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode.asInt()>
in (OidcAccessTokenManager.java:115)
+Method
<org.apache.flink.connector.http.auth.OidcAccessTokenManager.requestAccessToken()>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode.path(java.lang.String)>
in (OidcAccessTokenManager.java:109)
+Method
<org.apache.flink.connector.http.auth.OidcAccessTokenManager.requestAccessToken()>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode.path(java.lang.String)>
in (OidcAccessTokenManager.java:110)
+Method
<org.apache.flink.connector.http.auth.OidcAccessTokenManager.requestAccessToken()>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode.textValue()>
in (OidcAccessTokenManager.java:111)
+Method
<org.apache.flink.connector.http.auth.OidcAccessTokenManager.requestAccessToken()>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper.readTree([B)>
in (OidcAccessTokenManager.java:108)
+Method
<org.apache.flink.connector.http.sink.httpclient.BatchRequestSubmitter.getBatchSize()>
is annotated with <org.apache.flink.annotation.VisibleForTesting> in
(BatchRequestSubmitter.java:0)
+Method
<org.apache.flink.connector.http.sink.httpclient.JavaNetSinkHttpClient.getHeadersAndValues()>
is annotated with <org.apache.flink.annotation.VisibleForTesting> in
(JavaNetSinkHttpClient.java:0)
+Method
<org.apache.flink.connector.http.table.lookup.HttpLookupTableSource.extractLookupRow([[I)>
calls method
<org.apache.flink.table.types.logical.utils.LogicalTypeChecks.getFieldTypes(org.apache.flink.table.types.logical.LogicalType)>
in (HttpLookupTableSource.java:245)
+Method
<org.apache.flink.connector.http.table.lookup.HttpLookupTableSourceFactory.columnToField(org.apache.flink.table.catalog.Column)>
calls method
<org.apache.flink.table.types.utils.DataTypeUtils.removeTimeAttribute(org.apache.flink.table.types.DataType)>
in (HttpLookupTableSourceFactory.java:89)
+Method
<org.apache.flink.connector.http.table.lookup.JavaNetHttpPollingClient.deserializeArray([B)>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode.toString()>
in (JavaNetHttpPollingClient.java:368)
+Method
<org.apache.flink.connector.http.table.lookup.JavaNetHttpPollingClient.deserializeArray([B)>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper.readValue([B,
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.type.TypeReference)>
in (JavaNetHttpPollingClient.java:363)
+Method
<org.apache.flink.connector.http.table.lookup.JavaNetHttpPollingClient.deserializeArray([B)>
checks instanceof
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.NullNode>
in (JavaNetHttpPollingClient.java:366)
+Method
<org.apache.flink.connector.http.table.lookup.JavaNetHttpPollingClient.deserializeArray([B)>
is annotated with <org.apache.flink.annotation.VisibleForTesting> in
(JavaNetHttpPollingClient.java:0)
+Method
<org.apache.flink.connector.http.table.lookup.JavaNetHttpPollingClient.deserializeSingleValue([B)>
calls constructor
<org.apache.flink.api.common.functions.util.ListCollector.<init>(java.util.List)>
in (JavaNetHttpPollingClient.java:357)
+Method
<org.apache.flink.connector.http.table.lookup.JavaNetHttpPollingClient.deserializeSingleValue([B)>
is annotated with <org.apache.flink.annotation.VisibleForTesting> in
(JavaNetHttpPollingClient.java:0)
+Method
<org.apache.flink.connector.http.table.lookup.JavaNetHttpPollingClient.getRequestFactory()>
is annotated with <org.apache.flink.annotation.VisibleForTesting> in
(JavaNetHttpPollingClient.java:0)
+Method
<org.apache.flink.connector.http.table.lookup.RequestFactoryBase.getHeadersAndValues()>
is annotated with <org.apache.flink.annotation.VisibleForTesting> in
(RequestFactoryBase.java:0)
+Method
<org.apache.flink.connector.http.table.lookup.RowDataSingleValueLookupSchemaEntry.convertToLookupArg(org.apache.flink.table.data.RowData)>
checks instanceof <org.apache.flink.table.data.binary.BinaryStringData> in
(RowDataSingleValueLookupSchemaEntry.java:66)
+Method
<org.apache.flink.connector.http.table.lookup.TableSourceHelper.getFieldNames(org.apache.flink.table.types.logical.LogicalType)>
calls method
<org.apache.flink.table.types.logical.utils.LogicalTypeChecks.getFieldNames(org.apache.flink.table.types.logical.LogicalType)>
in (TableSourceHelper.java:53)
+Method
<org.apache.flink.connector.http.table.lookup.TableSourceHelper.getFieldNames(org.apache.flink.table.types.logical.LogicalType)>
calls method
<org.apache.flink.table.types.logical.utils.LogicalTypeChecks.isCompositeType(org.apache.flink.table.types.logical.LogicalType)>
in (TableSourceHelper.java:52)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.GenericJsonAndUrlQueryCreator.createBodyBasedParams(java.util.Collection,
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode)>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode.fields()>
in (GenericJsonAndUrlQueryCreator.java:218)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.GenericJsonAndUrlQueryCreator.createBodyBasedParams(java.util.Collection,
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode)>
has parameter of type
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode>
in (GenericJsonAndUrlQueryCreator.java:0)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.GenericJsonAndUrlQueryCreator.createLookupQuery(org.apache.flink.table.data.RowData)>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper.readTree([B)>
in (GenericJsonAndUrlQueryCreator.java:120)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.GenericJsonAndUrlQueryCreator.rowDataToRow(org.apache.flink.table.data.RowData,
org.apache.flink.table.types.DataType)> is annotated with
<org.apache.flink.annotation.VisibleForTesting> in
(GenericJsonAndUrlQueryCreator.java:0)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.GenericJsonAndUrlQueryCreator.setSerializationSchema(org.apache.flink.api.common.serialization.SerializationSchema)>
is annotated with <org.apache.flink.annotation.VisibleForTesting> in
(GenericJsonAndUrlQueryCreator.java:0)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.GenericJsonAndUrlQueryCreator.substituteTemplate(java.lang.String,
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode)>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode.asText()>
in (GenericJsonAndUrlQueryCreator.java:176)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.GenericJsonAndUrlQueryCreator.substituteTemplate(java.lang.String,
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode)>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode.isTextual()>
in (GenericJsonAndUrlQueryCreator.java:175)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.GenericJsonAndUrlQueryCreator.substituteTemplate(java.lang.String,
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode)>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode.toString()>
in (GenericJsonAndUrlQueryCreator.java:177)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.GenericJsonAndUrlQueryCreator.substituteTemplate(java.lang.String,
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode)>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode.get(java.lang.String)>
in (GenericJsonAndUrlQueryCreator.java:163)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.GenericJsonAndUrlQueryCreator.substituteTemplate(java.lang.String,
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode)>
has parameter of type
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode>
in (GenericJsonAndUrlQueryCreator.java:0)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.ObjectMapperAdapter.initialize()>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper.disable(org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.DeserializationFeature)>
in (ObjectMapperAdapter.java:35)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.ObjectMapperAdapter.initialize()>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper.disable(org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.SerializationFeature)>
in (ObjectMapperAdapter.java:33)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.ObjectMapperAdapter.initialize()>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper.disable(org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.SerializationFeature)>
in (ObjectMapperAdapter.java:34)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.ObjectMapperAdapter.initialize()>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.json.JsonMapper$Builder.build()>
in (ObjectMapperAdapter.java:32)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.ObjectMapperAdapter.initialize()>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.json.JsonMapper$Builder.configure(org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.MapperFeature,
boolean)> in (ObjectMapperAdapter.java:32)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.ObjectMapperAdapter.initialize()>
calls method
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.json.JsonMapper.builder()>
in (ObjectMapperAdapter.java:32)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.ObjectMapperAdapter.initialize()>
gets field
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE>
in (ObjectMapperAdapter.java:35)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.ObjectMapperAdapter.initialize()>
gets field
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.MapperFeature.USE_STD_BEAN_NAMING>
in (ObjectMapperAdapter.java:32)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.ObjectMapperAdapter.initialize()>
gets field
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.SerializationFeature.WRITE_DATES_AS_TIMESTAMPS>
in (ObjectMapperAdapter.java:33)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.ObjectMapperAdapter.initialize()>
gets field
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.SerializationFeature.WRITE_DATES_WITH_ZONE_ID>
in (ObjectMapperAdapter.java:34)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.ObjectMapperAdapter.initialize()>
has return type
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper>
in (ObjectMapperAdapter.java:0)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.ObjectMapperAdapter.instance()>
has return type
<org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper>
in (ObjectMapperAdapter.java:0)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.PrefixedConfigOption.getFallbackKeys(org.apache.flink.configuration.ConfigOption)>
depends on component type <org.apache.flink.configuration.FallbackKey> in
(PrefixedConfigOption.java:0)
+Method
<org.apache.flink.connector.http.table.lookup.querycreators.PrefixedConfigOption.getFallbackKeys(org.apache.flink.configuration.ConfigOption)>
has return type <[Lorg.apache.flink.configuration.FallbackKey;> in
(PrefixedConfigOption.java:0)
+Method
<org.apache.flink.connector.http.utils.SerializationSchemaUtils$1.getMetricGroup()>
calls constructor
<org.apache.flink.metrics.groups.UnregisteredMetricsGroup.<init>()> in
(SerializationSchemaUtils.java:39)
+Method
<org.apache.flink.connector.http.utils.SerializationSchemaUtils$2.getMetricGroup()>
calls constructor
<org.apache.flink.metrics.groups.UnregisteredMetricsGroup.<init>()> in
(SerializationSchemaUtils.java:58)
diff --git
a/flink-connector-http/archunit-violations/0ad5944b-db82-448f-bf5f-b06e9a9d5920
b/flink-connector-http/archunit-violations/0ad5944b-db82-448f-bf5f-b06e9a9d5920
new file mode 100644
index 0000000..e69de29
diff --git
a/flink-connector-http/archunit-violations/549f92ae-28be-45e9-8d28-2f04b6d51ddf
b/flink-connector-http/archunit-violations/549f92ae-28be-45e9-8d28-2f04b6d51ddf
new file mode 100644
index 0000000..e69de29
diff --git
a/flink-connector-http/archunit-violations/b1988061-4505-4335-9707-e0492c5ba0e9
b/flink-connector-http/archunit-violations/b1988061-4505-4335-9707-e0492c5ba0e9
new file mode 100644
index 0000000..224d713
--- /dev/null
+++
b/flink-connector-http/archunit-violations/b1988061-4505-4335-9707-e0492c5ba0e9
@@ -0,0 +1,9 @@
+org.apache.flink.connector.http.HttpSink.builder(): Returned leaf type
org.apache.flink.connector.http.HttpSinkBuilder does not satisfy: reside
outside of package 'org.apache.flink..' or reside in any package ['..shaded..']
or annotated with @Public or annotated with @PublicEvolving or annotated with
@Deprecated
+org.apache.flink.connector.http.HttpSinkBuilder.setElementConverter(org.apache.flink.connector.http.SchemaLifecycleAwareElementConverter):
Argument leaf type
org.apache.flink.connector.http.SchemaLifecycleAwareElementConverter does not
satisfy: reside outside of package 'org.apache.flink..' or reside in any
package ['..shaded..'] or annotated with @Public or annotated with
@PublicEvolving or annotated with @Deprecated
+org.apache.flink.connector.http.HttpSinkBuilder.setElementConverter(org.apache.flink.connector.http.SchemaLifecycleAwareElementConverter):
Argument leaf type org.apache.flink.connector.http.sink.HttpSinkRequestEntry
does not satisfy: reside outside of package 'org.apache.flink..' or reside in
any package ['..shaded..'] or annotated with @Public or annotated with
@PublicEvolving or annotated with @Deprecated
+org.apache.flink.connector.http.HttpSinkBuilder.setElementConverter(org.apache.flink.connector.http.SchemaLifecycleAwareElementConverter):
Returned leaf type org.apache.flink.connector.http.HttpSinkBuilder does not
satisfy: reside outside of package 'org.apache.flink..' or reside in any
package ['..shaded..'] or annotated with @Public or annotated with
@PublicEvolving or annotated with @Deprecated
+org.apache.flink.connector.http.clients.SinkHttpClientBuilder.build(java.util.Properties,
org.apache.flink.connector.http.HttpPostRequestCallback,
org.apache.flink.connector.http.preprocessor.HeaderPreprocessor,
org.apache.flink.connector.http.sink.httpclient.RequestSubmitterFactory):
Argument leaf type org.apache.flink.connector.http.HttpPostRequestCallback does
not satisfy: reside outside of package 'org.apache.flink..' or reside in any
package ['..shaded..'] or annotated with @Public [...]
+org.apache.flink.connector.http.clients.SinkHttpClientBuilder.build(java.util.Properties,
org.apache.flink.connector.http.HttpPostRequestCallback,
org.apache.flink.connector.http.preprocessor.HeaderPreprocessor,
org.apache.flink.connector.http.sink.httpclient.RequestSubmitterFactory):
Argument leaf type
org.apache.flink.connector.http.preprocessor.HeaderPreprocessor does not
satisfy: reside outside of package 'org.apache.flink..' or reside in any
package ['..shaded..'] or annotated with [...]
+org.apache.flink.connector.http.clients.SinkHttpClientBuilder.build(java.util.Properties,
org.apache.flink.connector.http.HttpPostRequestCallback,
org.apache.flink.connector.http.preprocessor.HeaderPreprocessor,
org.apache.flink.connector.http.sink.httpclient.RequestSubmitterFactory):
Argument leaf type org.apache.flink.connector.http.sink.httpclient.HttpRequest
does not satisfy: reside outside of package 'org.apache.flink..' or reside in
any package ['..shaded..'] or annotated with @Pub [...]
+org.apache.flink.connector.http.clients.SinkHttpClientBuilder.build(java.util.Properties,
org.apache.flink.connector.http.HttpPostRequestCallback,
org.apache.flink.connector.http.preprocessor.HeaderPreprocessor,
org.apache.flink.connector.http.sink.httpclient.RequestSubmitterFactory):
Argument leaf type
org.apache.flink.connector.http.sink.httpclient.RequestSubmitterFactory does
not satisfy: reside outside of package 'org.apache.flink..' or reside in any
package ['..shaded..'] or annotat [...]
+org.apache.flink.connector.http.clients.SinkHttpClientBuilder.build(java.util.Properties,
org.apache.flink.connector.http.HttpPostRequestCallback,
org.apache.flink.connector.http.preprocessor.HeaderPreprocessor,
org.apache.flink.connector.http.sink.httpclient.RequestSubmitterFactory):
Returned leaf type org.apache.flink.connector.http.clients.SinkHttpClient does
not satisfy: reside outside of package 'org.apache.flink..' or reside in any
package ['..shaded..'] or annotated with @Public o [...]
diff --git
a/flink-connector-http/archunit-violations/bc5e0f5a-0057-4403-afe5-6a815bbbcb00
b/flink-connector-http/archunit-violations/bc5e0f5a-0057-4403-afe5-6a815bbbcb00
new file mode 100644
index 0000000..e69de29
diff --git
a/flink-connector-http/archunit-violations/c9df5a69-87e3-43ee-8c10-cd8c08c7ad38
b/flink-connector-http/archunit-violations/c9df5a69-87e3-43ee-8c10-cd8c08c7ad38
new file mode 100644
index 0000000..e69de29
diff --git
a/flink-connector-http/archunit-violations/e255fc59-3eb9-4ba6-9911-6ebb479e394a
b/flink-connector-http/archunit-violations/e255fc59-3eb9-4ba6-9911-6ebb479e394a
new file mode 100644
index 0000000..6f19be0
--- /dev/null
+++
b/flink-connector-http/archunit-violations/e255fc59-3eb9-4ba6-9911-6ebb479e394a
@@ -0,0 +1,4 @@
+Class
<org.apache.flink.connector.http.table.lookup.HttpLookupConnectorOptions> does
not reside in a package 'org.apache.flink..table' in
(HttpLookupConnectorOptions.java:0)
+Class
<org.apache.flink.connector.http.table.sink.HttpDynamicSinkConnectorOptions>
does not reside in a package 'org.apache.flink..table' in
(HttpDynamicSinkConnectorOptions.java:0)
+org.apache.flink.connector.http.table.lookup.HttpLookupConnectorOptions does
not satisfy: annotated with @PublicEvolving or annotated with @Public
+org.apache.flink.connector.http.table.sink.HttpDynamicSinkConnectorOptions
does not satisfy: annotated with @PublicEvolving or annotated with @Public
diff --git a/flink-connector-http/archunit-violations/stored.rules
b/flink-connector-http/archunit-violations/stored.rules
new file mode 100644
index 0000000..da0d3c9
--- /dev/null
+++ b/flink-connector-http/archunit-violations/stored.rules
@@ -0,0 +1,10 @@
+#
+#Tue Jun 30 23:57:53 IST 2026
+Return\ and\ argument\ types\ of\ methods\ annotated\ with\ @Public\ must\ be\
annotated\ with\ @Public.=0ad5944b-db82-448f-bf5f-b06e9a9d5920
+ITCASE\ tests\ should\ use\ a\ MiniCluster\ resource\ or\
extension=0235210c-8f55-49c8-af8f-25be472a75bb
+Production\ code\ must\ not\ call\ methods\ annotated\ with\
@VisibleForTesting=c9df5a69-87e3-43ee-8c10-cd8c08c7ad38
+Options\ for\ connectors\ and\ formats\ should\ reside\ in\ a\ consistent\
package\ and\ be\ public\ API.=e255fc59-3eb9-4ba6-9911-6ebb479e394a
+Tests\ inheriting\ from\ AbstractTestBase\ should\ have\ name\ ending\ with\
ITCase=bc5e0f5a-0057-4403-afe5-6a815bbbcb00
+Return\ and\ argument\ types\ of\ methods\ annotated\ with\ @PublicEvolving\
must\ be\ annotated\ with\
@Public(Evolving).=b1988061-4505-4335-9707-e0492c5ba0e9
+Classes\ in\ API\ packages\ should\ have\ at\ least\ one\ API\ visibility\
annotation.=549f92ae-28be-45e9-8d28-2f04b6d51ddf
+Connector\ production\ code\ must\ depend\ only\ on\ public\ API\ when\
outside\ of\ connector\ packages=09015216-6ca6-4513-8e4a-90022b27e585
diff --git a/flink-connector-http/pom.xml b/flink-connector-http/pom.xml
index e01dade..5e51e5d 100644
--- a/flink-connector-http/pom.xml
+++ b/flink-connector-http/pom.xml
@@ -292,6 +292,37 @@ under the License.
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
+
+ <!-- ArchUnit dependencies, following Flink's architecture tests setup
-->
+ <dependency>
+ <groupId>com.tngtech.archunit</groupId>
+ <artifactId>archunit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.tngtech.archunit</groupId>
+ <artifactId>archunit-junit5-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-architecture-tests-base</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-architecture-tests-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-architecture-tests-production</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
diff --git
a/flink-connector-http/src/main/java/org/apache/flink/connector/http/table/lookup/LookupRow.java
b/flink-connector-http/src/main/java/org/apache/flink/connector/http/table/lookup/LookupRow.java
index c84e3eb..5d112c8 100644
---
a/flink-connector-http/src/main/java/org/apache/flink/connector/http/table/lookup/LookupRow.java
+++
b/flink-connector-http/src/main/java/org/apache/flink/connector/http/table/lookup/LookupRow.java
@@ -18,7 +18,6 @@
package org.apache.flink.connector.http.table.lookup;
-import org.apache.flink.annotation.VisibleForTesting;
import org.apache.flink.connector.http.LookupArg;
import org.apache.flink.table.data.RowData;
import org.apache.flink.table.types.DataType;
@@ -65,7 +64,6 @@ public class LookupRow implements Serializable {
return this;
}
- @VisibleForTesting
List<LookupSchemaEntry<RowData>> getLookupEntries() {
return new LinkedList<>(lookupEntries);
}
diff --git
a/flink-connector-http/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java
b/flink-connector-http/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java
new file mode 100644
index 0000000..64fbd26
--- /dev/null
+++
b/flink-connector-http/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java
@@ -0,0 +1,41 @@
+/*
+ * 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.flink.architecture;
+
+import org.apache.flink.architecture.common.ImportOptions;
+
+import com.tngtech.archunit.core.importer.ImportOption;
+import com.tngtech.archunit.junit.AnalyzeClasses;
+import com.tngtech.archunit.junit.ArchTest;
+import com.tngtech.archunit.junit.ArchTests;
+
+/** Architecture tests for production code. */
+@AnalyzeClasses(
+ packages = "org.apache.flink.connector.http",
+ importOptions = {
+ ImportOption.DoNotIncludeTests.class,
+ ImportOption.DoNotIncludeArchives.class,
+ ImportOptions.ExcludeScalaImportOption.class,
+ ImportOptions.ExcludeShadedImportOption.class
+ })
+public class ProductionCodeArchitectureTest {
+
+ @ArchTest
+ public static final ArchTests COMMON_TESTS =
ArchTests.in(ProductionCodeArchitectureBase.class);
+}
diff --git
a/flink-connector-http/src/test/java/org/apache/flink/architecture/TestCodeArchitectureTest.java
b/flink-connector-http/src/test/java/org/apache/flink/architecture/TestCodeArchitectureTest.java
new file mode 100644
index 0000000..99c61d2
--- /dev/null
+++
b/flink-connector-http/src/test/java/org/apache/flink/architecture/TestCodeArchitectureTest.java
@@ -0,0 +1,40 @@
+/*
+ * 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.flink.architecture;
+
+import org.apache.flink.architecture.common.ImportOptions;
+
+import com.tngtech.archunit.core.importer.ImportOption;
+import com.tngtech.archunit.junit.AnalyzeClasses;
+import com.tngtech.archunit.junit.ArchTest;
+import com.tngtech.archunit.junit.ArchTests;
+
+/** Architecture tests for test code. */
+@AnalyzeClasses(
+ packages = "org.apache.flink.connector.http",
+ importOptions = {
+ ImportOption.OnlyIncludeTests.class,
+ ImportOptions.ExcludeScalaImportOption.class,
+ ImportOptions.ExcludeShadedImportOption.class
+ })
+public class TestCodeArchitectureTest {
+
+ @ArchTest
+ public static final ArchTests COMMON_TESTS =
ArchTests.in(TestCodeArchitectureTestBase.class);
+}
diff --git a/flink-connector-http/src/test/resources/archunit.properties
b/flink-connector-http/src/test/resources/archunit.properties
new file mode 100644
index 0000000..3a99a19
--- /dev/null
+++ b/flink-connector-http/src/test/resources/archunit.properties
@@ -0,0 +1,35 @@
+#
+# 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.
+#
+
+# By default we allow removing existing violations, but fail when new
violations are added.
+freeze.store.default.allowStoreUpdate=true
+
+# Enable this if a new (frozen) rule has been added in order to create the
initial store and record the existing violations.
+#freeze.store.default.allowStoreCreation=true
+
+# Enable this to add allow new violations to be recorded.
+# NOTE: Adding new violations should be avoided when possible. If the rule was
correct to flag a new
+# violation, please try to avoid creating the violation. If the
violation was created due to a
+# false positive, please file an issue under
https://issues.apache.org/jira/browse/FLINK.
+#freeze.refreeze=false
+
+freeze.store.default.path=archunit-violations
+
+# Allow rules whose `should` clause matches no classes (e.g. Table API or
@Public API rules that do
+# not apply to this connector) to pass instead of failing.
+archRule.failOnEmptyShould=false
diff --git a/pom.xml b/pom.xml
index 8c532fc..e7e4854 100644
--- a/pom.xml
+++ b/pom.xml
@@ -95,6 +95,7 @@ under the License.
<scala-reflect.version>2.12.19</scala-reflect.version>
<vavr.version>0.10.2</vavr.version>
<wiremock.version>3.13.2</wiremock.version>
+ <archunit.version>1.4.1</archunit.version>
<!-- to match flink's level -->
<slf4j.version>1.7.36</slf4j.version>
@@ -523,6 +524,41 @@ under the License.
<version>${awaitility.version}</version>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>com.tngtech.archunit</groupId>
+ <artifactId>archunit</artifactId>
+ <version>${archunit.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.tngtech.archunit</groupId>
+ <artifactId>archunit-junit5-api</artifactId>
+ <version>${archunit.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-architecture-tests-base</artifactId>
+ <version>${flink.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-architecture-tests-test</artifactId>
+ <version>${flink.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-architecture-tests-production</artifactId>
+ <version>${flink.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</dependencyManagement>