Skip to content

Exec: unspecified env values cancel execution? #28

Closed

Description

@dubo-dubon-duponey

This will rightfully fail:

package testing

bar: string

#dagger: compute: [
	{
		do: "fetch-container"
		ref: "alpine"
	},
	{
		do: "exec"
		args: ["FAILPLEASE"]
		// env: foo: bar
		always: true
		dir: "/"
	},
]

Now, uncomment env: foo: bar.

This just silently succeeds (eg: the exec does not seem to run).

Sorry if I missed something obvious here.

Activity

  1. changed the title [-]Exec: unspecified env values succeed unexpectedly[/-] [+]Exec: unspecified env values cancel execution?[/+] on Jan 14, 2021
  2. added
    kind/bug
    on Jan 16, 2021
  3. aluzzardi commented on Jan 21, 2021

    @aluzzardi
    Contributor

    From what I see in the code, that seems to be done on purpose:

    		// If op not concrete, interrupt without error.
    		// This allows gradual resolution:
    		//    compute what you can compute.. leave the rest incomplete.
    		if !v.IsConcreteR() {
    			return nil
    		}
    

    /cc @shykes

  4. dubo-dubon-duponey commented on Jan 21, 2021

    @dubo-dubon-duponey
    ContributorAuthor

    Ok. From the user's perspective, the annoying part is that you think it worked and you really cannot tell it did not.
    Maybe just adding a BIG warning at the bottom of the output ("foo was not executed because X") would preserve this behavior (if desirable indeed), while alleviating the above?

  5. aluzzardi commented on Jan 21, 2021

    @aluzzardi
    Contributor

    Yeah I agree with you on this one, as a user it looks like a bug / unexpected

  6. shykes commented on Jan 21, 2021

    @shykes
    Contributor

    The idea is to solve that at the UX layer. The concept of partial evaluation should be a first class citizen.

  7. shykes commented on Jan 21, 2021

    @shykes
    Contributor

    Note the script should stop executing at the first non-concrete op, and the user should be notified (but not with an error). If it does not stop, that’s a bug.

  8. linked a pull request that will close this issuetest: re-enable undefined prop test #61on Jan 21, 2021
  9. aluzzardi commented on Jan 21, 2021

    @aluzzardi
    Contributor

    Re-enabled the test in #61

  10. added this to the beta milestone on May 11, 2021
  11. added a commit that references this issue on Jun 1, 2023
    940d454
  12. added a commit that references this issue on Jun 1, 2023
    100b99d
  13. added a commit that references this issue on Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions