Skip to content

Preserve automation workflow inputs on update - #36076

Merged
yan-3005 merged 1 commit into
mainfrom
fix/automation-workflow-inputs
Oct 23, 2026
Merged

yan-3005 merged 1 commit into
mainfrom
fix/automation-workflow-inputs

Conversation

@pmbrull

@pmbrull pmbrull commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Describe your changes:

Preserve the request and workflow type saved at creation when updating automation workflows. Status, response, and description updates continue to work through PUT and PATCH.

No public issue linked.

Type of change:

  • Bug fix

High-level design:

Not applicable — small repository update using the existing immutable-field pattern.

Tests:

Use cases covered

  • PUT, PATCH by ID, and PATCH by name retain the saved execution inputs.
  • Trigger permissions continue to use the original workflow request and type.
  • Runner status and response updates still persist, including PUT requests containing decrypted inputs.

Unit tests

  • WorkflowRepositoryUpdateTest: 6 passed; regression cases verified failing before the change.
  • WorkflowResourceDecryptTest: 1 passed.
  • JaCoCo: 100% line coverage of WorkflowRepository.WorkflowUpdater (8/8 lines).
  • Java formatting: mvn spotless:apply and spotless:check passed; pre-commit checks passed.

Backend integration tests

Updated WorkflowTriggerPermissionsIT with six cases covering both update behaviors across all three API paths. All six cases were verified failing before the change.

Local Java test run: PASSED

  • Commit: 18f8ab82b6cd (base origin/main)
  • Finished: 2026-10-23 08:46 UTC · 31.0 min
Step Scope Classes Tests Failed Skipped Min Result
unit openmetadata-service (2 classes) 2 7 0 0 1.3 passed
integration mysql-elasticsearch · parallel 47 2106 0 121 6.9 passed
integration mysql-elasticsearch · isolated 8 196 0 0 13.8 passed
integration mysql-elasticsearch · rdf 1 3 0 0 9.0 passed

Detailed local Java results

Ingestion integration tests

Not applicable — no ingestion code changes.

Playwright (UI) tests

Not applicable — no UI changes.

Manual testing performed

No separate manual run. Automated REST tests create a workflow, update it through each API path, fetch the saved entity, and check execution inputs, results, and trigger permissions.

UI screen recording:

Not applicable — backend-only fix.

Checklist:

  • Read CONTRIBUTING.md.
  • Documented the reason for preserving execution inputs in the updater.
  • Added unit and integration regressions and verified they fail before the fix.
  • Self-review against REVIEW.md: fresh-context review of 18f8ab82b6cd141ae40343e5726cfa5d63daa7a9; no findings.
  • Decision check: restores the existing update contract; no new decision record needed.
  • Schema migrations and UI recording are not applicable.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

Updates preserve the saved request and workflowType while allowing status, response, and description changes.

  • Workflow updates keep the original request and type.

No actionable issues found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "fix: preserve automation workflow inputs" · Reviewed by Greptile

Triggers and runners read the saved execution inputs at separate times.
Preserve those inputs across PUT and PATCH while allowing status and
response updates.
@pmbrull pmbrull added the skip-pr-checks Bypass PR metadata validation check label Oct 23, 2026
@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Oct 23, 2026
@gitar-bot

gitar-bot Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🔴 High risk · Making workflow request/type immutable changes credential and trigger-authorization behavior; mishandling updates could misroute stored secrets or permit unauthorized triggers.

Preserves the saved request and workflow type when automation workflows are updated through PUT and PATCH, so trigger permissions and execution inputs stay intact. Status, response, and description updates still persist. 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

@pmbrull

pmbrull commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

Local Java test run: PASSED — details

  • Commit: 18f8ab82b6cd (base origin/main)
  • The summary is in the PR description.

Tests run locally

  • unit · openmetadata-service (2 classes): WorkflowRepositoryUpdateTest (6 passed), WorkflowResourceDecryptTest (1 passed)
  • integration · mysql-elasticsearch · parallel: 47 classes, 1985 tests executed (listed below)
  • integration · mysql-elasticsearch · isolated: ChangeRequestAdmissionIT (23 passed), ChangeRequestApplyIT (11 passed), ChangeRequestDecisionIT (6 passed), ChangeRequestImportAndBulkIT (9 passed), ChangeRequestLifecycleIT (4 passed), ChangeRequestResourceIT (9 passed), DataContractValidationAppIT (3 passed), WorkflowDefinitionResourceIT (131 passed)
  • integration · mysql-elasticsearch · rdf: RdfGovernanceRulesIT (3 passed)

Per-class counts come from the test reports, which can credit a test to the wrong class when classes run concurrently, and keep only the last run of a nested class that several test classes inherit. The summary's step totals are Maven's own counts.

integration · mysql-elasticsearch · parallel: 48 classes

AIGovernancePolicyResourceIT (4 passed), AlertsRuleEvaluatorDeletedEntityIT (5 passed), AlertsRuleEvaluatorResourceIT (44 passed, 2 skipped), AutoAssignIncidentIT (41 passed, 2 skipped), AutoCloseIncidentIT (4 passed), BaseEntityIT$ListEntityHistoryByTimestampPaginationTest (22 passed, 2 skipped), ChangeRequestDaoIT (5 passed), ChangeRequestSubmitIT (17 passed), ConfigResourceIT (13 passed), DataAccessRequestValidationIT (16 passed), DataContractPermissionIT (16 passed, 1 skipped), DataContractResourceIT (161 passed, 2 skipped), DatabaseSmokeIT (3 passed), DomainMoveApprovalAuthorizationIT (2 passed), EntityStatusWorkflowOwnershipIT (3 passed), GlossaryTermInheritedReviewerApprovalIT (3 passed), GlossaryTermMoveApprovalIT (184 passed, 7 skipped), GlossaryTermResourceIT (3 passed), IncidentGroupsIT (147 passed, 2 skipped), IncidentPaginationIT (97 passed, 5 skipped), IncidentTaskIntegrationIT (15 passed), IncidentTaskNotificationIT (44 passed, 5 skipped), IndependentOntologyApprovalIT (22 passed, 8 skipped), IngestionPipelineAgentTypeIT (11 passed), IngestionPipelineLogStreamIT (26 passed), IngestionPipelineLogStreamingResourceIT (12 passed), IngestionPipelineOwnerInheritanceIT (26 passed, 1 skipped), IngestionPipelineProgressStreamIT (2 passed), IngestionPipelineResourceIT (122 passed, 11 skipped), IngestionPipelineSortIT (6 passed), IntakeFormResourceIT (63 passed), K8sEnvVarSerializationIT (4 passed), K8sOMJobOperatorIT (18 passed, 1 skipped), K8sPipelineEnvVarIT (6 passed), LifecycleWorkflowConfigurationIT (14 passed), OntologyGovernanceIT (4 passed), OrphanIngestionPipelineCleanupIT (6 passed), PipelineStatusAuthorizationIT (14 passed), RunIngestionPipelineForEntityIT (109 passed, 7 skipped), SeedDataPresenceIT (4 passed), StaleIncidentStatusIT (31 passed, 2 skipped), TableResourceIT (2 passed), TestConnectionDefinitionResourceIT (9 passed), UserResourceIT (442 passed, 53 skipped), WorkflowResourceIT (20 passed), WorkflowSignalDeliveryIT (20 passed, 2 skipped), WorkflowTaskAssigneesIT (18 passed, 1 skipped), WorkflowTriggerPermissionsIT (32 passed, 2 skipped)

Why these tests
  • area governance ← openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/WorkflowRepository.java
  • area ingestion-pipelines ← openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/WorkflowRepository.java
  • changed test ← openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/WorkflowTriggerPermissionsIT.java, openmetadata-service/src/test/java/org/openmetadata/service/jdbi3/WorkflowRepositoryUpdateTest.java
  • entity Workflow ← openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/WorkflowRepository.java
  • smoke ← code other than a test class changed
Commands
mvn -B package -pl openmetadata-service -am -Dspring-boot.repackage.skip=true -Dtest=WorkflowRepositoryUpdateTest,WorkflowResourceDecryptTest -Dsurefire.failIfNoSpecifiedTests=false
mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=parallel '-Dit.test=<47 classes>' -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false
mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=global-state -Dit.test=ChangeRequestAdmissionIT,ChangeRequestApplyIT,ChangeRequestDecisionIT,ChangeRequestImportAndBulkIT,ChangeRequestLifecycleIT,ChangeRequestResourceIT,DataContractValidationAppIT,WorkflowDefinitionResourceIT -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false
mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=rdf -Dit.test=RdfGovernanceRulesIT -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false

@pmbrull
pmbrull marked this pull request as ready for review October 23, 2026 08:47
@pmbrull
pmbrull requested a review from a team as a code owner October 23, 2026 08:47
@pmbrull
pmbrull requested a review from yan-3005 October 23, 2026 08:47
@yan-3005
yan-3005 added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit d230689 Oct 23, 2026
195 checks passed
@yan-3005
yan-3005 deleted the fix/automation-workflow-inputs branch October 23, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants