Skip to content

script: abort execution with a warning when the op is not concrete - #57

Merged
aluzzardi merged 1 commit into
mainfrom
clean-abort-non-concrete
Jan 21, 2021
Merged

aluzzardi merged 1 commit into
mainfrom
clean-abort-non-concrete

Conversation

@aluzzardi

Copy link
Copy Markdown
Contributor

This will:

  • Abort the script rather than continuing into the next op, resulting in weird errors (e.g. Unknown desc = open /tmp/buildkit-mount998455317/out: no such file or directory)
  • Issue a warning
  • Display the validation error

Example:

5:17PM WRN script is not concrete, aborting execution error="invalid interpolation: test.#dagger.compute.1.args.2: non-concrete value string (type string)" path=test

@aluzzardi

Copy link
Copy Markdown
Contributor Author

Also, using cue.Value.Validate(cue.Concrete(true)) rather than our home made recursive validator so we get a clean warning to display

@aluzzardi
aluzzardi force-pushed the clean-abort-non-concrete branch from 4a6d381 to 4edc576 Compare January 21, 2021 01:34
@aluzzardi
aluzzardi merged commit a9698cc into main Jan 21, 2021
@aluzzardi
aluzzardi deleted the clean-abort-non-concrete branch January 21, 2021 02:06
@aluzzardi aluzzardi linked an issue Jan 21, 2021 that may be closed by this pull request
aluzzardi pushed a commit that referenced this pull request Sep 16, 2022
Use the term "extension" in cloak.yaml and README
gerhard pushed a commit that referenced this pull request May 23, 2023
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.

Export does not seem to work

1 participant