fix: Replace custom module in PhpSdkDev#9379
Merged
Merged
Conversation
fb106a6 to
8d4df2b
Compare
jedevc
reviewed
Jan 14, 2025
| ); | ||
|
|
||
| if (dag()->alwaysExec()->lastExitCode($result) === '3') { | ||
| if ($result->exitCode() === '3') { |
Contributor
There was a problem hiding this comment.
exitCode returns an int:
dagger/sdk/php/generated/Container.php
Line 156 in 504787f
lastExitCode which returns a string https://github.com/charjr/dagger-always-exec/blob/d478c1aaf4c5290926d2d1978d98d9f0054529eb/src/AlwaysExec.php#L61)
Contributor
Author
There was a problem hiding this comment.
Good spot! I've fixed this and reversed it to be stricter.
Instead of throwing on 3 (the bad exit code we expect to see) I've changed it to throw on anything that isn't 0, 1, 2 (the good exit codes we expect to see).
Thanks to the `:expect` flag on calls to `withExec` The custom-module _always-exec_ used in the PhpSdkDev is now obsolete. This PR removes the depedency on the custom module _always-exec_. Also throw an error for anything that is **not** what we expect, This is different from prior behaviour which only threw for errors we expected. (exit code 3) Signed-off-by: John Charman <john.charman@imhotek.net>
8d4df2b to
cc3a93e
Compare
jedevc
approved these changes
Jan 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks to the
:expectflag on calls towithExecThe custom-module always-exec used in the PhpSdkDev is now obsolete.
This PR removes the depedency on the custom module always-exec.