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

No way to supply secrets to transform re-execution #609

Closed
b5 opened this issue Nov 14, 2018 · 0 comments · Fixed by #610
Closed

No way to supply secrets to transform re-execution #609

b5 opened this issue Nov 14, 2018 · 0 comments · Fixed by #610
Labels
bug code that is not behaving as expected

Comments

@b5
Copy link
Member

b5 commented Nov 14, 2018

Code that outlines the issue is in this test:

qri/actions/dataset_test.go

Lines 280 to 299 in 0096995

Transform: &dataset.TransformPod{
// TODO - the fact that we need to completely re-supply the transform function
// here is a bug. There's currently no way to supply secrets to a transform without
// recalling the previous version. Because of this, I think secrets need to be adjusted
// to be completely out-of-band to datasets, and instead plumbed down from a new field
// lib.SaveParams.Secrets. The Secrets field on dataset.DatasetPod should be removed
Syntax: "starlark",
Config: map[string]interface{}{
"foo": "config",
},
Secrets: map[string]string{
"bar": "secret",
},
ScriptBytes: []byte(`def transform(ds,ctx):
ctx.get_config("foo")
ctx.get_secret("bar")
bd = ds.get_body()
bd.append("hey")
ds.set_body(bd)`),
},

Because of this, I think secrets need to be adjusted to be completely out-of-band to datasets, and instead plumbed down from a new field lib.SaveParams.Secrets. The Secrets field on dataset.DatasetPod should be removed

@b5 b5 added bug code that is not behaving as expected ready labels Nov 14, 2018
b5 added a commit that referenced this issue Nov 14, 2018
this came from work on another PR, but secrets should be completely separate from datasets, and need to be plumbed through the call stack as such

closes #609
@b5 b5 added in progress and removed ready labels Nov 14, 2018
@b5 b5 closed this as completed in #610 Nov 14, 2018
@ghost ghost removed the in progress label Nov 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug code that is not behaving as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant