Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Add interruptible override to workflow execution config #minor #410

Merged
merged 7 commits into from
May 3, 2022

Conversation

MorpheusXAUT
Copy link
Contributor

TL;DR

Applies new interruptible flag from updated ExecutionSpec to workflow execution config, allowing for workflows to be flagged as interruptible for a single execution.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

The newly introduced interruptible flag of an ExecutionSpec is merged into a workflow's execution config using the existing mergeIntoExecConfig helper for both launch plan and single task executions. Propeller will use the flag to override the interruptible setting for a single execution while still following the existing override rules.
Due to the shared WorkflowExecutionConfigInterface used by mergeIntoExecConfig, it's now also possible to specify a "global default" via the ApplicationConfig (defaults to false to ensure backward compatibility), however it seems like mergeIntoExecConfig never actually reaches this part since there's always something being overridden (k8s security contexst by default)...

Tests have been added covering the flyteadmin part of the interruptible override, manual smoke testing seems to behave correctly (workflow/single task executions + relaunches have been checked using the flytesnacks repo).

Additionally, some minor log cleanup was included (incorrect formatting).

Tracking Issue

flyteorg/flyte#2284

Follow-up issue

NA

@welcome
Copy link

welcome bot commented Apr 21, 2022

Thank you for opening this pull request! 🙌

These tips will help get your PR across the finish line:

  • Most of the repos have a PR template; if not, fill it out to the best of your knowledge.
  • Sign off your commits (Reference: DCO Guide).

Nick Müller added 2 commits April 26, 2022 11:08
Allows for distinguishment between no value being provided and an override to false

Signed-off-by: Nick Müller <[email protected]>
@codecov
Copy link

codecov bot commented Apr 27, 2022

Codecov Report

Merging #410 (58d09e2) into master (9d9194c) will increase coverage by 0.04%.
The diff coverage is 53.33%.

@@            Coverage Diff             @@
##           master     #410      +/-   ##
==========================================
+ Coverage   61.15%   61.20%   +0.04%     
==========================================
  Files         154      154              
  Lines       11093    11101       +8     
==========================================
+ Hits         6784     6794      +10     
- Misses       3602     3604       +2     
+ Partials      707      703       -4     
Flag Coverage Δ
unittests 60.17% <53.33%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/rpc/adminservice/launch_plan.go 0.00% <0.00%> (ø)
pkg/rpc/adminservice/node_execution.go 0.00% <0.00%> (ø)
pkg/rpc/adminservice/task.go 0.00% <0.00%> (ø)
pkg/rpc/adminservice/task_execution.go 0.00% <0.00%> (ø)
pkg/rpc/adminservice/workflow.go 0.00% <0.00%> (ø)
pkg/manager/impl/execution_manager.go 75.11% <100.00%> (+0.82%) ⬆️
pkg/workflowengine/impl/prepare_execution.go 87.95% <100.00%> (+0.45%) ⬆️
...implementations/workflow_execution_event_writer.go 40.00% <0.00%> (-40.00%) ⬇️

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 9d9194c...58d09e2. Read the comment docs.

pkg/manager/impl/execution_manager_test.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
go.sum Outdated Show resolved Hide resolved
go.sum Outdated Show resolved Hide resolved
Nick Müller added 2 commits April 27, 2022 11:52
@MorpheusXAUT
Copy link
Contributor Author

@pmahindrakar-oss dependencies been cleaned up with newly released versions of flyteidl/flyteadmin + go mod tidy as requested

@pmahindrakar-oss
Copy link
Contributor

@katrogan can you review it aswell

Copy link
Contributor

@katrogan katrogan left a comment

Choose a reason for hiding this comment

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

looks great, thank you for adding the thorough test cases!

@katrogan katrogan merged commit 6591fa2 into flyteorg:master May 3, 2022
@welcome
Copy link

welcome bot commented May 3, 2022

Congrats on merging your first pull request! 🎉

eapolinario pushed a commit that referenced this pull request Sep 6, 2023
* Fixed minor log message formatting

Signed-off-by: Nick Müller <[email protected]>

* Added override for interruptible flag to execution config

Signed-off-by: Nick Müller <[email protected]>

* Interruptible override now uses BoolValue wrapper
Allows for distinguishment between no value being provided and an override to false

Signed-off-by: Nick Müller <[email protected]>

* Test comments cleanup

Signed-off-by: Nick Müller <[email protected]>

* Use released flyteidl/flytepropeller versions

Signed-off-by: Nick Müller <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants