Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

feat: Implement EFS IOPs specification in Project YAML#313

Merged
samwaln merged 3 commits into
mainfrom
efs-options
Feb 23, 2022
Merged

feat: Implement EFS IOPs specification in Project YAML#313
samwaln merged 3 commits into
mainfrom
efs-options

Conversation

@samwaln
Copy link
Copy Markdown
Contributor

@samwaln samwaln commented Feb 9, 2022

Description of Changes

We want to be able to specify the filesystem used and the throughput. This allows customers with large numbers of large files to accelerate workflows. Filesystem options are S3 and EFS, with a default of S3 for Cromwell and Nextflow and a default of EFS for MiniWDL. Valid throughput values are 1 to 1024.

Description of how you validated changes

I have added a test that checks that the default throughput is set. I have run ./scripts/run-dev.sh and agc project validate with a valid agc-project.yaml and an invalid version containing an invalid filesystem.

Checklist

  • If this change would make any existing documentation invalid, I have included those updates within this PR
  • I have added unit tests that prove my fix is effective or that my feature works
  • I have linted my code before raising the PR
  • Title of this Pull Request follows Conventional Commits standard: https://www.conventionalcommits.org/en/v1.0.0/

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@samwaln samwaln temporarily deployed to slack February 9, 2022 01:33 Inactive
Type: "wdl",
Engine: "miniwdl",
Filesystem: Filesystem{
FSType: "S3",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be EFS?

- type: wdl
engine: miniwdl
filesystem:
fsType: S3
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

EFS?

- type: wdl
engine: cromwell
filesystem:
fsType: EFS
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cromwell can't use EFS. This test should probably fail.

Type: "wdl",
Engine: "miniwdl",
Filesystem: Filesystem{
FSType: "S3",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

miniwdl uses EFS

Engine: "nextflow",
Filesystem: Filesystem{
FSType: "S3",
Configuration: FSConfig{FSProvisionedThroughput: 0},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

S3 doesn't have a provisioned throughput. We should prevent this configuration from being an option with S3

Type: "wdl",
Engine: "miniwdl",
Filesystem: Filesystem{
FSType: "S3",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

EFS

Type: "wdl",
Engine: "miniwdl",
Filesystem: Filesystem{
FSType: "S3",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

EFS

*/
public readonly engineName: string;
/**
* Name of the filesystem to use.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Name of the filesystem type to use (e.g. EFS, S3)

Comment thread packages/cdk/lib/env/context-app-parameters.ts
@markjschreiber
Copy link
Copy Markdown
Contributor

Can you check and see if it's possible to enforce values for engine and filesystem in the packages/cli/internal/pkg/cli/spec/project_schema.json. For example, currently cromwell and nextflow must use s3 and miniwdl must use EFS.

You will also need to add logic so that the fileystem information is passed through to the cdk that generates the filesystem so that the resulting EFS volume has the desired provisioned IOPs.

Comment thread packages/cli/internal/pkg/cli/spec/context.go Outdated
Comment thread packages/cli/internal/pkg/cli/spec/context.go Outdated
Comment thread packages/cli/internal/pkg/cli/spec/project_test.go Outdated
Comment thread packages/cli/internal/pkg/cli/spec/project_test.go
});
}

protected createAccessPointcreateFileSystem(vpc: IVpc): FileSystem {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this just be createFileSystem It doesn't create an access point unless you meant to call that method internally?

*/
public readonly filesystemType?: string;
/**
* Name of the filesystem type to use (e.g. EFS, S3).
Copy link
Copy Markdown
Contributor

@markjschreiber markjschreiber Feb 15, 2022

Choose a reason for hiding this comment

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

This code comment is wrong, should be something like "Amount of provisioned IOPs"

/**
* Filesystem provisioned throughput to use for EFS.
*/
readonly iops: Size;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this should be an optional parameter. When the filesystem is S3 you can't supply iops and when the filesystem is EFS then iops is an option.

@markjschreiber
Copy link
Copy Markdown
Contributor

Looking good. General comments:

  • Does the code handle the case where EFS is specified as the filesystem but provisioned IOPs is not (meaning you get the default MaxIO with burst mode). Provisioned IOPs is optional.
  • There seems to be a lot of content from the snakemake implementation. Possibly a rebase on top of HEAD would generate a cleaner commit?

@samwaln samwaln changed the base branch from main to release February 16, 2022 01:18
@samwaln samwaln changed the base branch from release to main February 16, 2022 01:18

switch (engineName) {
case ENGINE_CROMWELL:
if (filesystemType != "S3") {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm a bit confused here. What's the point of exposing filesystemType if we error on any non-default values?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think the plan here is to have other filesystem types in the future.

@samwaln samwaln merged commit c1af22b into main Feb 23, 2022
@samwaln samwaln deleted the efs-options branch February 23, 2022 20:16
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.

4 participants