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

Add output_path field to Task::Options struct #10

Merged
merged 1 commit into from
Oct 31, 2019
Merged

Conversation

kubkon
Copy link
Contributor

@kubkon kubkon commented Oct 31, 2019

This commit adds output_path field to Task::Options struct. This
is needed to partially address request golemfactory/g-flite#28. The
field is made non-optional as after this change lands in upstream,
it will be required by the Wasm app on the Golem side.

cc @zakaprov FYI that this is a potentially breaking change for Brass
backend in gwasm-runner.

@kubkon kubkon requested a review from kmazurek October 31, 2019 11:22
@kubkon kubkon force-pushed the kubkon/output_path branch from 162a9b7 to a51c9d1 Compare October 31, 2019 12:31
kubkon pushed a commit to golemfactory/clay that referenced this pull request Oct 31, 2019
This commit populates the so-far unused `TaskBuilder` options field
`output_path` with data from the gWasm task definition. This field
is now a required field in the gWasm task's manifest. This commit
partially addresses golemfactory/g-flite#28.

cc @lukasz.glen FYI, this is a potentially breaking change for the
raw gWasm apps in our `wasm-store`.

cc @mdtanrikulu FYI, this commit together with golemfactory/g-flite#33
and golemfactory/gwasm-rust-api#10 should address
golemfactory/g-flite#28.
kubkon pushed a commit to golemfactory/clay that referenced this pull request Oct 31, 2019
This commit populates the so-far unused `TaskBuilder` options field
`output_path` with data from the gWasm task definition. This field
is now a required field in the gWasm task's manifest. This commit
partially addresses golemfactory/g-flite#28.

cc @lukasz-glen FYI, this is a potentially breaking change for the
raw gWasm apps in our `wasm-store`.

cc @mdtanrikulu FYI, this commit together with golemfactory/g-flite#33
and golemfactory/gwasm-rust-api#10 should address
golemfactory/g-flite#28.
@kubkon
Copy link
Contributor Author

kubkon commented Oct 31, 2019

On second thought, I think I might make output_path optional. I think there is little point in breaking the API this way. Let me rework this a bit.

Copy link
Contributor

@kmazurek kmazurek left a comment

Choose a reason for hiding this comment

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

Thanks for the heads up @kubkon. For now I've configured gWASM runner to use a specific git tag instead of a branch (golemfactory/gwasm-runner#25).
The relevant changes on Golem's side are here: https://github.com/golemfactory/golem/pull/4845/.

@kmazurek
Copy link
Contributor

On second thought, I think I might make output_path optional. I think there is little point in breaking the API this way. Let me rework this a bit.

Sure, as long as there's a reasonable default value provided.

@kubkon
Copy link
Contributor Author

kubkon commented Oct 31, 2019

On second thought, I think I might make output_path optional. I think there is little point in breaking the API this way. Let me rework this a bit.

Sure, as long as there's a reasonable default value provided.

Hmm, I was actually thinking of leaving the field out completely if it's unspecified. What do you think?

This commit adds `output_path` field to `Task::Options` struct. This
is needed to partially address request golemfactory/g-flite#28. The
field is made optional, and serialized only if is not `None`.
@kubkon kubkon force-pushed the kubkon/output_path branch from a51c9d1 to 308ed34 Compare October 31, 2019 14:24
@kubkon kubkon requested a review from kmazurek October 31, 2019 14:24
@kubkon
Copy link
Contributor Author

kubkon commented Oct 31, 2019

OK, @zakaprov, if you could have a look at the PR again, that'd be great! :-)

@kmazurek
Copy link
Contributor

Hmm, I was actually thinking of leaving the field out completely if it's unspecified. What do you think?

Fair enough, but I guess that would need to be reflected in https://github.com/golemfactory/golem/pull/4845/, i.e. we should provide a default there.

@kubkon
Copy link
Contributor Author

kubkon commented Oct 31, 2019

Hmm, I was actually thinking of leaving the field out completely if it's unspecified. What do you think?

Fair enough, but I guess that would need to be reflected in golemfactory/golem#4845, i.e. we should provide a default there.

Agreed, and that's precisely the change I'm already working on :-)

kubkon pushed a commit to golemfactory/clay that referenced this pull request Oct 31, 2019
This commit overloads the `TaskBuilder`'s `get_output_path` for
gWasm tasks. If the task def consists of `output_path` field, then
its value is used as the output path of the task. Otherwise,
`get_output_path` returns the value of `output_dir` that is
supplied within the task def.

This commit partially addresses golemfactory/g-flite#28.

cc @mdtanrikulu FYI, this commit together with golemfactory/g-flite#33
and golemfactory/gwasm-rust-api#10 should address
golemfactory/g-flite#28.
@kubkon kubkon merged commit dd071b9 into master Oct 31, 2019
@kubkon kubkon deleted the kubkon/output_path branch October 31, 2019 14:56
kubkon pushed a commit to golemfactory/clay that referenced this pull request Nov 2, 2019
This commit overloads the `TaskBuilder`'s `get_output_path` for
gWasm tasks. If the task def consists of `output_path` field, then
its value is used as the output path of the task. Otherwise,
`get_output_path` returns the value of `output_dir` that is
supplied within the task def.

This commit partially addresses golemfactory/g-flite#28.

cc @mdtanrikulu FYI, this commit together with golemfactory/g-flite#33
and golemfactory/gwasm-rust-api#10 should address
golemfactory/g-flite#28.
kubkon pushed a commit to golemfactory/clay that referenced this pull request Nov 2, 2019
This commit overloads the `TaskBuilder`'s `get_output_path` for
gWasm tasks. If the task def consists of `output_path` field, then
its value is used as the output path of the task. Otherwise,
`get_output_path` returns the value of `output_dir` that is
supplied within the task def.

This commit partially addresses golemfactory/g-flite#28.

cc @mdtanrikulu FYI, this commit together with golemfactory/g-flite#33
and golemfactory/gwasm-rust-api#10 should address
golemfactory/g-flite#28.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants