Skip to content

Add examples for local testing and CI/CD lifecycle management#36

Open
Martijn Visser (MartijnVisser) wants to merge 1 commit into
masterfrom
table-api-cuj-examples
Open

Add examples for local testing and CI/CD lifecycle management#36
Martijn Visser (MartijnVisser) wants to merge 1 commit into
masterfrom
table-api-cuj-examples

Conversation

@MartijnVisser

@MartijnVisser Martijn Visser (MartijnVisser) commented Jun 12, 2026

Copy link
Copy Markdown
Member

Restructures the integration and deployment example around a realistic developer workflow and adds local testing and CI/CD lifecycle management:

  • The pipeline logic of Example_08 is now a plugin-free function that is unit tested locally on the open source Flink engine with mock data from fromValues(), without Confluent Cloud connectivity. The Confluent plugin and the OSS planner both register engine factories under the identifier 'default' and cannot share a runtime classpath, so surefire excludes the plugin and failsafe excludes the OSS planner (documented in the README, including IDE run-configuration setup).
  • New integration tests (*IT) run the same pipeline logic against Confluent Cloud on a bounded mock table. They fail fast with a clear message when the required environment variables are missing, so a CI pipeline (e.g. a deploy pipeline with a misconfigured secret) cannot silently skip its verification step and still report success; builds without credentials skip them explicitly with -DskipITs. The required variable names are taken from ConfluentPluginOptions so the check cannot drift from the plugin contract, and a FLINK_PROPERTIES-based configuration is accepted as an alternative. The fixture has a timeout, validates the row threshold was reached, and always stops and deletes its fill statement.
  • Example_08's main() is reduced to a deployment entrypoint: configuration via environment variables, a deterministic statement name set through the typed ConfluentPluginOptions.CLIENT_STATEMENT_NAME option, idempotent re-runs, and rejection of stale mode arguments.
  • New Example_12_StatementLifecycle performs status/stop/resume/delete on deployed statements by name.
  • New CI workflow (format check, compile, local tests, fat JAR; no credentials required) and example deploy/manage workflows under .github/workflows-examples/ for use in downstream projects. The manage workflow passes inputs via quoted environment variables to avoid script injection.
  • README gains a developer journey overview, a testing section covering the three test tiers and the local-engine limitations, and CI/CD guidance.

Verified: ./mvnw clean verify -DskipITs passes offline (4 unit tests green), verify without credentials fails fast with the expected message, the shaded JAR is unaffected by the test dependencies (no OSS planner classes or service entries), and the integration test has been executed successfully against a live Confluent Cloud environment.

@MartijnVisser Martijn Visser (MartijnVisser) requested a review from a team as a code owner June 12, 2026 12:05
@MartijnVisser Martijn Visser (MartijnVisser) marked this pull request as draft June 12, 2026 12:07
@airlock-confluentinc airlock-confluentinc Bot force-pushed the table-api-cuj-examples branch from 30b620e to c55ba3c Compare June 12, 2026 14:35
@airlock-confluentinc airlock-confluentinc Bot force-pushed the table-api-cuj-examples branch from c55ba3c to 54960f8 Compare June 12, 2026 15:08
@MartijnVisser Martijn Visser (MartijnVisser) marked this pull request as ready for review June 12, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant