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

Workflows and volumes enhancements #507

Merged
merged 7 commits into from
Jul 12, 2022
Merged

Workflows and volumes enhancements #507

merged 7 commits into from
Jul 12, 2022

Conversation

filippomc
Copy link
Collaborator

@filippomc filippomc commented Jul 1, 2022

Closes #505
Closes #506
Closes #512

Implemented solution

#506: Readonly volumes can be added with the :ro at the end of the shared_directory string.
#505: Multiple values are allowed for pod_context as list or tuple


#512 pod contexts are added automatically for volumes specified as shared_directory

How to test this PR:
Unit tests are covering the functionality.

Create an operation like

op = operations.ParallelOperation('test-parallel-op-', (tasks.PythonTask('p1', f), tasks.PythonTask('p2', f)),
                                      pod_context=(
                                        operations.PodExecutionContext('a', 'b'), 
                                        operations.PodExecutionContext('c', 'd', required=True), 
                                        operations.PodExecutionContext('e', 'f')
                                        )), shared_directory = 'myclaim:/mnt/shared:ro'

and see that the workflow specification has 4 affinity terms 2 required, 2 preferred and a readonly mounted volume

Sanity checks:

  • The pull request is explicitly linked to the relevant issue(s)
  • The issue is well described: clearly states the problem and the general proposed solution(s)
  • From the issue and the current PR it is explicitly stated how to test the current change
  • The labels in the issue set the scope and the type of issue (bug, feature, etc.)
  • All the automated test checks are passing
  • All the linked issues are included in one milestone
  • All the linked issues are in the Review/QA column of the board
  • All the linked issues are assigned

Breaking changes (select one):

  • The present changes do not change the preexisting api in any way
  • This PR and the issue are tagged as a breaking-change

Possible deployment updates issues (select one):

  • There is no reason why deployments based on CloudHarness may break after the current update
  • This PR and the issue are tagged as alert:deployment

Test coverage (select one):

  • Tests for the relevant cases are included in this pr
  • The changes included in this pr are out of the current test coverage scope

Documentation (select one):

  • The documentation has been updated to match the current changes
  • The changes included in this PR are out of the current documentation scope

Nice to have (if relevant):

  • Screenshots of the changes
  • Explanatory video/animated gif

@filippomc filippomc requested a review from zsinnema July 1, 2022 10:30
@filippomc filippomc changed the title Feature/506 Workflows and volumes Jul 8, 2022
@filippomc filippomc changed the title Workflows and volumes Workflows and volumes enhancements Jul 8, 2022
Copy link
Contributor

@zsinnema zsinnema left a comment

Choose a reason for hiding this comment

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

nice!
lgtm

@zsinnema zsinnema merged commit e3e84c3 into develop Jul 12, 2022
@filippomc filippomc deleted the feature/506 branch July 13, 2022 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants