[FLINK-40149][connector-http] Rename asyncPolling to async-polling#53
[FLINK-40149][connector-http] Rename asyncPolling to async-polling#53bharathgunapati wants to merge 2 commits into
Conversation
Rename the canonical lookup option key to async-polling to align with Flink connector kebab-case conventions. The legacy asyncPolling key remains supported via withDeprecatedKeys for backward-compatible DDL. Updates docs, examples, and tests to use the new canonical key. Adds factory- and runtime-level parameterized tests for both the canonical key and the deprecated alias. Documents the alias in the ConfigOption description and docs.
|
Hi @davidradl — would you be able to review this when you have a moment? Small consistency improvement (FLINK-40149): renames the lookup option Scope: option key + docs + tests only — no runtime logic change (default remains Tests: parameterized factory and runtime tests cover both CI: green on my fork (Flink 2.2.0, JDK 11/17/21) — https://github.com/bharathgunapati/flink-connector-http/actions/runs/29353591657 Thanks! |
| | format | required | Flink's format name that should be used to decode REST response, Use `json` for a typical REST endpoint. | | ||
| | url | required | The base URL that should be used for GET requests. For example _http://localhost:8080/client_ | | ||
| | asyncPolling | optional | true/false - determines whether Async Polling should be used. Mechanism is based on Flink's Async I/O. | | ||
| | async-polling | optional | true/false - determines whether async polling should be used. Mechanism is based on Flink's Async I/O. Deprecated alias: `asyncPolling`. | |
There was a problem hiding this comment.
now we have release we cannot easily change a config name . We would need to deprecate but keep the old property and indicate people should use the new property name in preference. So we need to keep the docs for asyncPolling and still accept that property. We probably need some validation to reject configs with both keys set
There was a problem hiding this comment.
Agreed with the review feedback — pushed 0b4cb59:
- Docs list both keys: async-polling (preferred) and asyncPolling (deprecated, still accepted)
- Factory rejects DDL that sets both keys (ValidationException)
- asyncPolling still works at runtime via withDeprecatedKeys — no behavior change for existing DDL
… rename Document async-polling as preferred and asyncPolling as deprecated in both connector docs, reject DDL that sets both keys, and keep the ConfigOption description focused on behavior only.
What is the purpose of the change
The HTTP lookup option for sync vs async polling is the only camelCase table
option in the connector (
asyncPolling). All other options use kebab-case ordotted keys (e.g.
lookup-method,http.source.lookup.request.timeout).This renames the canonical key to
async-pollingto align with Flink connectornaming conventions. The legacy
asyncPollingkey remains supported viawithDeprecatedKeysso existing DDL does not need to change.No runtime behavior change: default remains
false, and the option is alreadyread via
ReadableConfig.get(ASYNC_POLLING).Brief change log
HttpLookupConnectorOptions.ASYNC_POLLING: canonical keyasync-polling,deprecated alias
asyncPolling, description updated.async-polling.deprecated keys; ITCases updated to canonical key (mechanical).
Compatibility note
async-pollingasyncPollingstill works viawithDeprecatedKeysfalse(unchanged)asyncPollingcontinues to work;new configurations should use
async-pollingRelease note is on FLINK-40149.
Verifying this change
CI green on fork (Flink 2.2.0, JDK 11/17/21):
https://github.com/bharathgunapati/flink-connector-http/actions/runs/29353591657
Automated tests:
HttpLookupTableSourceFactoryTest#shouldAcceptAsyncPollingAtFactory— factoryaccepts both
async-pollingandasyncPollingHttpLookupTableSourceTest#shouldCreateAsyncTableSourceWithAsyncPollingKey—runtime async path for both keys
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation