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

Catch correct exception when trying to access step context #1681

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

schustmi
Copy link
Contributor

@schustmi schustmi commented Jul 10, 2023

Describe changes

During the StepContext rework, the StepEnvironment was replaced by the get_step_context() function to get the pipeline/run name. We used a try...except block to catch the KeyError that occurred when we're not running inside a pipeline step, but this now needs to be a RuntimeError to work with the new get_step_context().

Pre-requisites

Please ensure you have done the following:

  • I have read the CONTRIBUTING.md document.
  • If my change requires a change to docs, I have updated the documentation accordingly.
  • If I have added an integration, I have updated the integrations table and the corresponding website section.
  • I have added tests to cover my changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (add details above)

@github-actions github-actions bot added internal To filter out internal PRs and issues bug Something isn't working labels Jul 10, 2023
@schustmi schustmi requested a review from stefannica July 10, 2023 07:52
@schustmi schustmi merged commit 348162f into develop Jul 12, 2023
17 of 28 checks passed
@schustmi schustmi deleted the bugfix/step-context-outside-of-pipeline branch July 12, 2023 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working internal To filter out internal PRs and issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant