Repository navigation
[2.0] Align WorkflowTriggerPermissionsIT with the trigger checks from #38197 - #38463
Conversation
…ecks from #38197 #38197 brought main's trigger authorization to 2.0: a QUERY_RUNNER workflow may be triggered only by its requester, an admin or a bot; REVERSE_INGESTION needs EDIT_ALL on its service; the Spark engine test needs CREATE on ingestion pipelines. The IT still expected a DataConsumer to trigger a QUERY_RUNNER workflow and failed with 403 on every engine. Port main's version of the test, which covers these rules.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved 🟢 Low riskThe PR only updates integration-test coverage for existing workflow-trigger authorization; no production code or runtime behavior changes. Ports main's WorkflowTriggerPermissionsIT to 2.0 so the test matches the workflow trigger authorization added in #38197, fixing the failing test_triggerNonTestConnection_notGatedByTestConnectionAuth case. Test-only change with no product code touched. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
| OpenMetadataClient admin = SdkClients.adminClient(); | ||
| Workflow workflow = |
There was a problem hiding this comment.
New variables miss required
final
The new tests declare unchanged local variables without final. The repository’s Java guide requires final on local variables and parameters that do not change. Apply it to the new declarations, including admin, workflow, and requesterToken, before merging.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| .workflows() | ||
| .create(queryRunnerRequest(ns.prefix("qr-requester"), SharedEntities.get().USER2_REF)); | ||
|
|
||
| String requesterToken = tokenFor("[email protected]", new String[] {}); |
There was a problem hiding this comment.
The new requester and owner tests repeat "[email protected]". The repository’s Java guide requires a named constant when a string appears more than once. Define the email once and reuse it before merging, so changing this shared identity does not require edits in several places.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Describe your changes
WorkflowTriggerPermissionsIT.test_triggerNonTestConnection_notGatedByTestConnectionAuthfails on 2.0 on every engine (MySQL, Postgres + ES + Redis, Postgres + OpenSearch) withgot 403 — forbidden.#38197 brought main's workflow trigger authorization to 2.0 (
WorkflowResource.authorizeQueryRunnerTriggerand friends): aQUERY_RUNNERworkflow may be triggered only by its requester, an admin or a bot;REVERSE_INGESTIONneedsEDIT_ALLon its service;TEST_SPARK_ENGINE_CONNECTIONneedsCREATEon ingestion pipelines. The 2.0 test still expected a DataConsumer to trigger aQUERY_RUNNERworkflow. On main the test was updated alongside the change; on 2.0 it was not.This ports main's
WorkflowTriggerPermissionsITunchanged. The three authorizers on 2.0 match main's behavior (onlyisRequesteris inlined), and every type the test uses exists on 2.0. Test-only, no product code.Tests
mvn -B verify -pl :openmetadata-integration-tests -am -Pmysql-elasticsearch -DintegrationTests.lane=parallel -Dit.test=WorkflowTriggerPermissionsITon this branch: Tests run: 20, Failures: 0, Errors: 0, Skipped: 0.🤖 Generated with Claude Code
The tests match the existing trigger checks, but the explicit Java style requirements must be satisfied before merging.
Findings
Summary
Updates
WorkflowTriggerPermissionsITto match the workflow trigger checks on2.0.Reviews (1) · Last reviewed commit: "[2.0] Align WorkflowTriggerPermissionsIT..." · Reviewed by Greptile