Closed blag closed 5 years ago
Merging #18 into master will increase coverage by
0.05%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #18 +/- ##
==========================================
+ Coverage 98.62% 98.67% +0.05%
==========================================
Files 12 12
Lines 581 604 +23
==========================================
+ Hits 573 596 +23
Misses 8 8
Impacted Files | Coverage Δ | |
---|---|---|
orquestaconvert/workflows/base.py | 100% <100%> (ø) |
:arrow_up: |
orquestaconvert/expressions/__init__.py | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update dafe7a7...e42119d. Read the comment docs.
@nmaludy Rebased on top of master
and added the integration test fixtures as you noted.
Overall, this PR corrects the output of this conversion script to avoid producing Orquesta workflows that do not have the same semantics as Mistral workflows.
5fc72f8 Rename variable to not override
vars
builtinSimply rename variable from
vars
toexpression_vars
, sincevars
is a Python built-ina8a4f29 Publish variables in transitions with expressions
Before this commit, the script would convert the following:
to this:
But due to the way Orquesta contexts work, the
webui_base_url
variable would not be available in the subsequentset_github_status_pending
andcreate_vm
tasks, even though it would be accessible in the Mistral workflow.This commit adds the publish attribute to all "expression" transitions:
which does publish the
webui_base_url
variable into the contexts consumed by the subsequentset_github_status_pending
andcreate_vm
tasks.d4828ef Use only-publish transitions when they publish to the workflow context
Before this commit, the convert script would convert the following:
to three different transitions from
create_vm
, only one of which simply published the variables to the workflow "global" context:This commit only adds a "publish-only" transition if the published variables are used in the workflow context (read: are used in the workflow
output
attribute):Due to the way Orquesta task contexts work, publish-only transitions are only useful for publishing variables for consumption in
output
. The variables that are published in publish-only transitions are not available to subsequent tasks in other transitions.Notes
orquestaconvert/expressions/__init__.py
. This change allows dictionary keys to use YAQL and Jinja interpolation.extract_context_variables
function that extracts the names of all context variablesextract_context_variables
.output
sections to some of the Mistral workflows (so the publish sections are preserved).