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: return correct exit code when one env failed #17

Merged
merged 5 commits into from
Dec 30, 2022
Merged

Conversation

jiacai2050
Copy link
Member

@jiacai2050 jiacai2050 commented Dec 30, 2022

Which issue does this PR close?

Closes #16

Rationale for this change

When one env run failed, its error will be ignored, which is not what we expect.

What changes are included in this PR?

  • Return error out when a env run failed
  • Add a bad example to test this.
    • It will also write a file lock as liveness flag, CI will ensure it's got deleted after running
  • Remove some unnecessary code.

Are there any user-facing changes?

No

How does this change test

New bad example

@jiacai2050 jiacai2050 changed the title return correct exit code when one env failed fix: return correct exit code when one env failed Dec 30, 2022
@@ -44,15 +44,12 @@ impl EnvController for MyController {

#[tokio::main]
async fn main() {
let args: Vec<String> = env::args().collect();
Copy link
Member Author

@jiacai2050 jiacai2050 Dec 30, 2022

Choose a reason for hiding this comment

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

Remove unnecessary part, the basic example should be as simple as possible.

Copy link
Member

Choose a reason for hiding this comment

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

👍

.gitignore Show resolved Hide resolved
src/runner.rs Outdated Show resolved Hide resolved
@@ -44,15 +44,12 @@ impl EnvController for MyController {

#[tokio::main]
async fn main() {
let args: Vec<String> = env::args().collect();
Copy link
Member

Choose a reason for hiding this comment

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

👍

@waynexia waynexia merged commit f5aeca1 into main Dec 30, 2022
@waynexia waynexia deleted the fix-exit-code branch December 30, 2022 05:15
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.

Return RunFailed error
2 participants