feat: Print action outputs to console#2265
Conversation
165abf7 to
a055cf7
Compare
d536ee1 to
c0306eb
Compare
|
Getting errors on sops. |
|
Update: I'm blocked by the same issue as: I need to go back to a fix for it in order to move forward: |
1d8404d to
e68aed9
Compare
7d20991 to
d83552f
Compare
|
Update: asked for feedback upstream on the blocker: cue-lang/cue#1671. Solution in #2024 allows to unblock. 👀 Updated doc preview I tried filling from tasks to a Ready for review. |
marcosnils
left a comment
There was a problem hiding this comment.
Just minor nit comment. Only reviewed the .md instructions and they LGTM!
348967f to
7ee6bb6
Compare
|
Haven't looked in depth yet but looks good! Q: Aren't the outputs polluted by random fields, or is there some logic to clean that up? (I looked at the logic of For instance, for a |
No because we're using only top-level fields of an action, not going deep. The // URL of the deployed site
url: container.export.files."/netlify/url"
// URL of the latest deployment
deployUrl: container.export.files."/netlify/deployUrl"
// URL for logs of the latest deployment
logsUrl: container.export.files."/netlify/logsUrl"Which produces the output you can see here: ➜ APP_NAME=dagger-todo dagger do deploy
[✔] actions.deps
[✔] actions.test.script
[✔] client.env
[✔] actions.build.run.script
[✔] actions.deploy.container.script
[✔] client.filesystem."./".read
[✔] actions.deploy
[✔] actions.test
[✔] actions.build.run
[✔] actions.build.contents
[✔] actions.deploy.container
[✔] client.filesystem."./_build".write
[✔] actions.deploy.container.export
Field Value
url "https://dagger-todo.netlify.app"
deployUrl "https://62698983ffe8661d60613431--dagger-todo.netlify.app"
logsUrl "https://app.netlify.com/sites/dagger-todo/deploys/62698983ffe8661d60613431"So you can create a wrapper action to control which outputs (and CLI inputs) you want, as you can see in this example: https://deploy-preview-2265--devel-docs-dagger-io.netlify.app/1226/handling-outputs/#controlling-the-output |
Yes, I noticed the output is perfect, that's what got me wondering on what's the wizardry behind that makes it look good :)
How do we define top-level fields? For instance:
What would end up in outputs? Is it going to be the outputs of |
Yes 🙂 |
I attempted to fill a final value from the tasks but got data races, so approach was to recover computed values and only fill at the end. This will become moot when CUE will return that final value in v0.4.3. Signed-off-by: Helder Correia <[email protected]>
|
Ohh, clever! Makes sense -- this is the perfect counter part of |
Resolves #1351
👀 Doc preview
Signed-off-by: Helder Correia