Skip to content

Feat: Return condition result so it can be used as a result of the workflow#21

Merged
teemow merged 2 commits intomainfrom
teemow-add-result-from-condition
Jul 3, 2025
Merged

Feat: Return condition result so it can be used as a result of the workflow#21
teemow merged 2 commits intomainfrom
teemow-add-result-from-condition

Conversation

@teemow
Copy link
Member

@teemow teemow commented Jul 2, 2025

This pull request introduces several enhancements and refactors across multiple files to improve workflow configuration, testing, and execution handling. The key changes include standardizing the store attribute, adding new features for conditional workflows, and improving template handling. Below is a breakdown of the most important changes grouped by theme.

Workflow Configuration Enhancements:

  • Changed the store attribute from a string to a boolean across multiple YAML configurations to simplify result storage logic. This affects files like workflow-arg-templating.yaml, workflow-advanced.yaml, and various testing scenarios. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Conditional Workflow Features:

  • Added support for referencing previous step results using FromStep in conditions, along with new attributes like ExpectNot for negated condition expectations. This enables more robust conditional logic in workflows.
  • Introduced a new conditional service health workflow (service-health-workflow) with steps for checking service status, restarting unhealthy services, creating missing services, and reporting final status. [1] [2]

Template Engine Improvement:

  • Updated the template engine's regex pattern to allow hyphens (-) in variable names, increasing flexibility in template definitions.

Testing Scenario Adjustments:

  • Refactored testing scenarios to align with the new store attribute format and updated references to execution IDs for improved clarity and consistency. This affects scenarios like workflow-execution-basic-tracking.yaml and workflow-execution-cleanup.yaml. [1] [2] [3] [4] [5]

Workflow Step Enhancements:

  • Added an AllowFailure attribute to workflow steps, enabling steps to fail without halting the entire workflow, while still making their results available for subsequent conditions.

@teemow teemow self-assigned this Jul 2, 2025
@teemow teemow requested a review from a team as a code owner July 2, 2025 20:24
…test scenarios

- Changed Store field in WorkflowStep from string to bool type
- Updated workflow executor to use step ID as storage key when Store: true
- Fixed template variable regex to support hyphens in step IDs
- Updated test framework to handle boolean Store field correctly
- Fixed 50+ failing test scenarios with template variables and expectations
- Achieved 100% test success rate (149/149 scenarios passing)
- Regenerated schema.json to reflect boolean Store field
@teemow teemow merged commit 2fb089a into main Jul 3, 2025
2 checks passed
@teemow teemow deleted the teemow-add-result-from-condition branch July 3, 2025 11:32
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