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

Add build info #25

Merged
merged 2 commits into from
Jul 3, 2024
Merged

Add build info #25

merged 2 commits into from
Jul 3, 2024

Conversation

sylvain-morin
Copy link
Contributor

No description provided.

@sylvain-morin sylvain-morin requested a review from pleary July 1, 2024 11:40
@@ -77,6 +78,14 @@ def h3_04_bounds_route(self):
return f"Unknown taxon_id {taxon_id}", 422
return results_dict

def build_info_route(self):
return {
"git_branch": os.environ["GIT_BRANCH"],
Copy link
Member

Choose a reason for hiding this comment

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

This will raise an error if these environment variables are not defined. Maybe that's desired. Some of the other versions will handle that a little better by returning empty hashes or nothing at all. The node API for example will also return a 500 if this endpoint fails, so in deployments where these environment variables are not defined, a handful of the build_info endpoints in the different codebases will render a 500 error of some sort

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I replaced them by os.getenv("xxx", "") to avoid such failure

@sylvain-morin sylvain-morin merged commit 710e0dc into main Jul 3, 2024
9 checks passed
@sylvain-morin sylvain-morin deleted the build_info branch July 3, 2024 08:23
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