Skip to content

[2.0] Align WorkflowTriggerPermissionsIT with the trigger checks from #38197 - #38463

Merged
yan-3005 merged 1 commit into
2.0from
fix/2.0-workflow-trigger-permissions-it
Nov 23, 2026
Merged

yan-3005 merged 1 commit into
2.0from
fix/2.0-workflow-trigger-permissions-it

Conversation

@yan-3005

@yan-3005 yan-3005 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes

WorkflowTriggerPermissionsIT.test_triggerNonTestConnection_notGatedByTestConnectionAuth fails on 2.0 on every engine (MySQL, Postgres + ES + Redis, Postgres + OpenSearch) with got 403 — forbidden.

#38197 brought main's workflow trigger authorization to 2.0 (WorkflowResource.authorizeQueryRunnerTrigger and friends): a QUERY_RUNNER workflow may be triggered only by its requester, an admin or a bot; REVERSE_INGESTION needs EDIT_ALL on its service; TEST_SPARK_ENGINE_CONNECTION needs CREATE on ingestion pipelines. The 2.0 test still expected a DataConsumer to trigger a QUERY_RUNNER workflow. On main the test was updated alongside the change; on 2.0 it was not.

This ports main's WorkflowTriggerPermissionsIT unchanged. The three authorizers on 2.0 match main's behavior (only isRequester is 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=WorkflowTriggerPermissionsIT on this branch: Tests run: 20, Failures: 0, Errors: 0, Skipped: 0.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 4/5

The tests match the existing trigger checks, but the explicit Java style requirements must be satisfied before merging.

Findings

  1. P2 New variables miss required `final` ▶
  2. P2 Shared email is copied ▶

Summary

Updates WorkflowTriggerPermissionsIT to match the workflow trigger checks on 2.0.

  • Query-runner tests check who may trigger a stored query.
  • Reverse-ingestion tests check access to the service being written to.
  • The Spark connection test checks that a DataConsumer is denied.

Reviews (1) · Last reviewed commit: "[2.0] Align WorkflowTriggerPermissionsIT..." · Reviewed by Greptile

…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.
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟢 Low risk

The 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.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

Comment on lines +388 to +389
OpenMetadataClient admin = SdkClients.adminClient();
Workflow workflow =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 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[] {});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Shared email is copied

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!

@yan-3005
yan-3005 merged commit 8e6938f into 2.0 Nov 23, 2026
63 of 66 checks passed
@yan-3005
yan-3005 deleted the fix/2.0-workflow-trigger-permissions-it branch November 23, 2026 09:50
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