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

New shared steps capability design doc #109

Merged
merged 8 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/design_docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
```{toctree}
:titlesonly: true

shared_steps
template
```
76 changes: 76 additions & 0 deletions docs/design_docs/shared_steps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Shared steps

date: 2023/08/18

Contributors: Carolyn Begeman, Xylar Asay-Davis

## Summary

The capability designed here is the ability to share steps across test cases.
In this design document, "shared steps" refers to any step which may be used by
multiple test cases that are available in polaris.

The main motivation behind this capability is the computational expense of
running steps that could shared across test cases multiple times. In order to
reflect the fact that steps are shared to the user, we present a new design for
the working directory structure. The design is successful insofar as it
guarantees that shared steps are run once per slurm job and that the role of
shared steps is clear to users.
xylar marked this conversation as resolved.
Show resolved Hide resolved

## Requirements

### Desired: Shared steps are set up once.

Ideally, steps used by multiple test cases should be set up once per invocation of
xylar marked this conversation as resolved.
Show resolved Hide resolved
`polaris setup` or `polaris suite`. This requirement may be dropped since step
set up is not generally resource intensive.

### Requirement: Shared steps are run once.

Shared steps should be run once per invocation of `polaris serial` or
`polaris run`.

### Requirement: Shared steps are run before steps that depend on their output.

### Requirement: Object properties of shared steps are intuitive.
cbegeman marked this conversation as resolved.
Show resolved Hide resolved

Shared steps are not daughters of test cases.
xylar marked this conversation as resolved.
Show resolved Hide resolved

### Requirement: Working directory structure is intuitive.

Shared step directories should be located at the highest level in the working directory
structure where all test cases that use that step are run at or below that level.
xylar marked this conversation as resolved.
Show resolved Hide resolved

### Requirement: Working directory step paths are easily discoverable by users.

The verbose option to `polaris list` lists the relative paths at which steps
would be set up for each test case.
xylar marked this conversation as resolved.
Show resolved Hide resolved

### Requirement: The output of shared steps may be used by multiple test cases.

A step may only be shared across multiple test cases if its output would be
identical for each test case.
xylar marked this conversation as resolved.
Show resolved Hide resolved
xylar marked this conversation as resolved.
Show resolved Hide resolved

### Requirement: test cases do not rely on outputs from steps in other test cases

All test cases are self-contained and rely only on either shared steps or steps they contain.


xylar marked this conversation as resolved.
Show resolved Hide resolved

## Implementation

### Implementation: Shared steps are run before steps that depend on their output.

Requirement is already satisfied as part of task parallelism design, which
makes use of file dependencies. When running in task-serial mode, the implementation
will be to make sure shared steps are added to the dictionary of steps before other steps
that rely on them.

### Implementation: Output of shared steps may be used by multiple test cases.

Test case steps that use the output of shared steps will make use of symbolic
links as before.

## Testing

### Testing and Validation: