Skip to content

Commit

Permalink
Merge pull request #39 from Eventual-Inc/fix-run
Browse files Browse the repository at this point in the history
fix: Add run commands to outputted ray-config file; remove provider
  • Loading branch information
raunakab authored Jan 18, 2025
2 parents f260f90 + e586ff7 commit b3dd569
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
19 changes: 2 additions & 17 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ struct ConfigPath {
struct DaftConfig {
setup: DaftSetup,
#[serde(default)]
run: DaftRun,
run: Vec<StrRef>,
#[serde(rename = "job", deserialize_with = "parse_jobs")]
jobs: HashMap<StrRef, DaftJob>,
}
Expand Down Expand Up @@ -199,7 +199,6 @@ struct DaftSetup {
name: StrRef,
#[serde(deserialize_with = "parse_version_req")]
version: VersionReq,
provider: DaftProvider,
region: StrRef,
#[serde(default = "default_number_of_workers")]
number_of_workers: usize,
Expand Down Expand Up @@ -280,21 +279,6 @@ where
}
}

#[derive(Debug, Deserialize, Clone, PartialEq, Eq)]
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
enum DaftProvider {
Aws,
}

#[derive(Default, Debug, Deserialize, Clone, PartialEq, Eq)]
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
struct DaftRun {
#[serde(default)]
pre_setup_commands: Vec<StrRef>,
#[serde(default)]
post_setup_commands: Vec<StrRef>,
}

#[derive(Debug, Clone, PartialEq, Eq)]
struct DaftJob {
command: StrRef,
Expand Down Expand Up @@ -444,6 +428,7 @@ async fn read_and_convert(
let deps = format!("uv pip install {deps}").into();
commands.push(deps);
}
commands.extend(daft_config.run.iter().map(Clone::clone));
commands
},
})
Expand Down
1 change: 0 additions & 1 deletion src/template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
[setup]
name = "daft-launcher-example"
version = "<VERSION>"
provider = "aws"
region = "us-west-2"
number-of-workers = 4

Expand Down

0 comments on commit b3dd569

Please sign in to comment.