[CRE-4955] Use WorkflowTag instead of Tag consistently - #23306
[CRE-4955] Use WorkflowTag instead of Tag consistently #23306pavel-raykov wants to merge 4 commits into
WorkflowTag instead of Tag consistently #23306Conversation
|
✅ No conflicts with other open PRs targeting |
|
I see you updated files related to
|
|
There was a problem hiding this comment.
Pull request overview
Risk Rating: MEDIUM
This PR standardizes workflow tag propagation by using WorkflowTag consistently across workflow reconciliation events, syncer handling, and CRE system test registration paths, removing the unused Tag field from v2 syncer event payloads.
Changes:
- Populate
WorkflowTagin v2 workflow reconciliation events and update handler logging/labels to referenceWorkflowTag(removingTagfrom event types). - Export and reuse
DefaultWorkflowTagfor workflow registration and HTTP trigger requests in system tests/scripts. - Extend system-test workflow registration config to carry a workflow tag through to contract registration.
Areas requiring scrupulous human review:
core/services/workflows/syncer/v2/*: ensure no downstream consumers (metrics, platform events, DB/spec reconciliation, serialization) still rely on the removedTagfield and thatWorkflowTagis threaded everywhere required.system-tests/lib/cre/workflow/workflow.go:RegisterWithContract: confirm the new tag argument ordering matches all call sites and the underlying contract wrapper expectations.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| system-tests/tests/test-helpers/t_helpers.go | Adds WorkflowTag to registration config and passes it into workflow contract registration; defaults tag in CompileAndDeployWorkflow. |
| system-tests/tests/regression/cre/http_trigger_regression_test.go | Uses DefaultWorkflowTag for HTTP trigger workflow selection. |
| system-tests/lib/cre/workflow/workflow.go | Exports DefaultWorkflowTag and threads workflow tag into UpsertWorkflow registration call. |
| core/services/workflows/syncer/v2/workflow_registry.go | Sets WorkflowTag on generated reconciliation events (and removes the old Tag assignment). |
| core/services/workflows/syncer/v2/workflow_registry_test.go | Updates expected event payloads to assert on WorkflowTag instead of Tag. |
| core/services/workflows/syncer/v2/types.go | Removes Tag field from v2 workflow event payload structs, leaving WorkflowTag as the canonical field. |
| core/services/workflows/syncer/v2/handler.go | Updates event handling/logging/labels to use payload.WorkflowTag. |
| core/scripts/cre/environment/environment/workflow.go | Passes DefaultWorkflowTag when registering workflows via the script. |
Suppressed comments (1)
system-tests/tests/test-helpers/t_helpers.go:819
workflow.DefaultWorkflowTagis referenced here, but this file already uses thecreworkflowimport alias for the same package. Referencing the existing alias avoids needing an additional import and prevents the duplicate-import compile error.
WorkflowName: workflowName,
WorkflowLocation: workflowFileLocation,
WorkflowTag: workflow.DefaultWorkflowTag,
ConfigFilePath: workflowConfigPath,
|




Currently WorkflowActivatedEvent would not carry
WorkflowTagbutTag. Note that the latter is never read and hence is not useful. After this PR we start populatingWorkflowTagconsistently and removeTag.Ideally, the
WorkflowTagshould also be propagated in all the tests usingCompileAndDeployWorkflow. However, instead of passing it everywhere, we hardcodedDefaultWorkflowTagfor now (if it is needed one can always updateCompileAndDeployWorkflow)