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 handling of resource creation error when emitting JSON output #173

Merged
merged 6 commits into from
Dec 3, 2024

Conversation

ejseqera
Copy link
Member

@ejseqera ejseqera commented Dec 3, 2024

Fixes #166 to improve command output handling and JSON parsing. Modified _execute_command to attempt JSON parsing first before falling back to standard output handling.

Changes:

  • Attempt JSON parsing before error checking
  • Properly respect print_stdout flag for both JSON and standard output
  • Add more test coverage for JSON parsing, output suppression, and error handling

@ejseqera ejseqera requested a review from adamrtalbot December 3, 2024 03:26
seqerakit/cli.py Outdated
Comment on lines 113 to 120

# Create a separate instance of the Overwrite class without JSON output
sp_without_json = seqeraplatform.SeqeraPlatform(
cli_args=sp.cli_args,
dryrun=sp.dryrun,
json=False,
)
self.overwrite_method = overwrite.Overwrite(sp_without_json)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this the same as #172?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it is. Branched off of that feature branch.

@ejseqera ejseqera merged commit d6ceaa8 into dev Dec 3, 2024
2 checks passed
@ejseqera ejseqera deleted the fix-resource-creation-error-handling branch December 3, 2024 15:37
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.

2 participants