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

Exit with the error on unsupported bitops schema data type in fail_fast mode #368

Merged
merged 1 commit into from
Dec 9, 2022

Conversation

PhillypHenning
Copy link
Contributor

Description

Small update to the exit logic for fail fast usage, this is to properly support our Github Action usage

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Tested locally

Logs

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

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

The PR title will need better detail as we're generating Release notes based on those.

Exit with the error on unsupported data type in bitops schema.

as I have zero context, ^^ is that accurate?

Is there perhaps an example or logs that may highlight the bug we're fixing in this PR?

@PhillypHenning PhillypHenning changed the title Updating exit logic standardizing all sys.exit() execution exit points Dec 2, 2022
@mickmcgrath13
Copy link
Contributor

This PR should probably fix a bug with exiting in run_cmd.

I’m not convinced the exception is being raised..
Might need to use pipe.returncode after pipe.communicate

more context:
pipeline is using bitops 2.2.1:
https://github.com/bitovi/devops-training-ec2-gha-example/actions/runs/3639474356/jobs/6143060556#step:2:240
Pipeline should have failed here (before script):
https://github.com/bitovi/devops-training-ec2-gha-example/actions/runs/3639474356/jobs/6143060556#step:2:760
before script calls run_cmd:

result = run_cmd(["bash", plugin_before_hook_script_path])

run_cmd check BITOPS_fast_fail_mode:
if BITOPS_fast_fail_mode:

@mickmcgrath13
Copy link
Contributor

need this:

process.communicate()
process_return_code = process.returncode
if process_return_code = 0:
  print("yay")
else:
  logger.error("not yay")
  sys.exit(101)

@arm4b arm4b added this to the v2.3.0 milestone Dec 7, 2022
@arm4b arm4b added the bug 🪲 Something isn't working label Dec 7, 2022
@arm4b
Copy link
Member

arm4b commented Dec 7, 2022

@mickmcgrath13 That bug fix is in the #373 PR.

@arm4b arm4b changed the title standardizing all sys.exit() execution exit points Exit with the error on unsupported bitops schema data type in fail_fast mode Dec 7, 2022
@PhillypHenning PhillypHenning merged commit 7546b9d into main Dec 9, 2022
@PhillypHenning PhillypHenning deleted the fail_fast branch December 9, 2022 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants