Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support overriding parameters when retry/resubmit workflows #9141

Merged
merged 8 commits into from
Jul 15, 2022

Conversation

terrytangyuan
Copy link
Member

Signed-off-by: Yuan Tang terrytangyuan@gmail.com

@terrytangyuan terrytangyuan marked this pull request as ready for review July 13, 2022 14:35
@jessesuen
Copy link
Member

How does overriding parameters work when retrying a workflow which already had Sucessful steps that completed? Since we don't rerun the Successful steps with the new parameters, the retried workflow might have non-deterministic results, right?

@terrytangyuan
Copy link
Member Author

terrytangyuan commented Jul 14, 2022

How does overriding parameters work when retrying a workflow which already had Sucessful steps that completed? Since we don't rerun the Successful steps with the new parameters, the retried workflow might have non-deterministic results, right?

Good catch. Actually the parameter overriding was only supposed to work correctly when --restart-successful and --node-field-selector are used when retrying/resubmitting, e.g. nodes that are selected as well as their child nodes will be re-run with the new parameters even if they succeeded.

Is that what you meant? I can add the checks on those two flags.

@jessesuen
Copy link
Member

jessesuen commented Jul 15, 2022

Yes. That's what I meant. I think a warning might be good enough because I think we need to prevent the expectation that parameter overriding may not work with retry. Something like:

Overriding parameters on retried or memoized resubmitted workflows may have unexpected results

Copy link
Member

@jessesuen jessesuen left a comment

Choose a reason for hiding this comment

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

Changes LGTM but I would request a warning is printed when we detect they are retrying part of the workflow, or doing a memoized resubmit with overridden parameters.

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
@terrytangyuan terrytangyuan enabled auto-merge (squash) July 15, 2022 22:30
@terrytangyuan terrytangyuan merged commit 9bbf7e0 into master Jul 15, 2022
@terrytangyuan terrytangyuan deleted the dev-allow-override-params branch July 15, 2022 23:00
reddymh pushed a commit to reddymh/argo-workflows that referenced this pull request Jan 2, 2023
…goproj#9141)

* feat: Support overriding parameters when retry/resubmit

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* chore: Fix unit test

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* chore: Fix unit test

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* feat: Update archived workflow commands

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* docs: Codegen

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* chore: Add util tests

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* chore: Add tests

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* chore: Add warning

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
Signed-off-by: Reddy <Rajshekar.Reddy@lowes.com>
@agilgur5 agilgur5 added area/api Argo Server API area/cli The `argo` CLI labels Sep 1, 2023
@agilgur5 agilgur5 added the area/retry-manual Manual workflow "Retry" Action (API/CLI/UI). See retryStrategy for template-level retries label Sep 26, 2023
@agilgur5
Copy link
Member

agilgur5 commented Apr 25, 2024

I'm inclined to agree with Jesse's logic here regarding retries -- I don't think you should be able to override your parameters, as that makes things non-deterministic and no longer idempotent either. A Workflow only has 1 set of parameters at the top level, and this would make a retried Workflow now potentially have 2 parameters sets; some steps were ran with the initial parameters and others were ran with the overridden parameters.

A memoized resubmit more correctly matches the intent here.

I'm considering removing the retry overriding feature entirely as such.

I mentioned this confusing property of retry overrides in #12734 (review) as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Argo Server API area/cli The `argo` CLI area/retry-manual Manual workflow "Retry" Action (API/CLI/UI). See retryStrategy for template-level retries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants