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

fix: improve execute error #46

Merged
merged 2 commits into from
Jul 16, 2024
Merged

fix: improve execute error #46

merged 2 commits into from
Jul 16, 2024

Conversation

loks0n
Copy link
Contributor

@loks0n loks0n commented Jul 4, 2024

Executor is throwing error that includes docker API response:

image

Instead, we should just show the failed build logs.

@loks0n loks0n requested review from Meldiron and christyjacob4 July 12, 2024 11:44
@@ -584,7 +584,7 @@ public function execute(

$parsedResponse = json_decode($result['response'], true);
if ($parsedResponse['Running'] === true || $parsedResponse['ExitCode'] !== 0) {
throw new Orchestration('Failed to execute command: '.$result['response'].' Exit Code: '.$parsedResponse['ExitCode']);
throw new Orchestration('Failed to execute command. Exit code: '.$parsedResponse['ExitCode']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're removing the docker API error message, can we make this error message more verbose like how to debug or what are the likely causes of this failure?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only reason this will be thrown is if the user provided build script does not completely successfully. Which is written to the $output reference, there's not really any more detail needed imo

@loks0n loks0n requested review from vermakhushboo and christyjacob4 and removed request for christyjacob4 July 15, 2024 10:16
@christyjacob4 christyjacob4 merged commit cae1ae4 into main Jul 16, 2024
5 checks passed
@christyjacob4 christyjacob4 deleted the fix-improve-execute-error branch July 16, 2024 13:27
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.

3 participants