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: Determine git revision hash once at startup #113

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

gwhitney
Copy link
Collaborator

@gwhitney gwhitney commented Apr 9, 2024

This way, the server continues to supply the correct git revision hash
even if the code changes after startup. Unless overridden by an
environment variable, simply uses git rev-parse --short HEAD. In
production, uses the environment override because the eventual flask
process doesn't have the correct permissions to perform the git
command.

Resolves #108.

  This way, the server continues to supply the correct git revision hash
  even if the code changes after startup. Unless overridden by an
  environment variable, simply uses `git rev-parse --short HEAD`. In
  production, uses the environment override because the eventual flask
  process doesn't have the correct permissions to perform the git
  command.

  Resolves numberscope#108.
@gwhitney gwhitney requested a review from katestange April 9, 2024 22:58
Copy link
Member

@katestange katestange left a comment

Choose a reason for hiding this comment

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

Works on my machine! Passes tests and returns the correct short hash for this commit.

@katestange katestange merged commit 2cb6471 into numberscope:main Apr 9, 2024
gwhitney added a commit to gwhitney/backscope that referenced this pull request Apr 10, 2024
katestange pushed a commit that referenced this pull request Apr 10, 2024
Vectornaut pushed a commit to Vectornaut/backscope that referenced this pull request Apr 10, 2024
Merge in commit hash endpoint (pull requests numberscope#113 and numberscope#114). Also, add
some requirements that seemed to be missing. Not sure how that happened.
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.

get_commit endpoint doesn't report actual code running if directory has changed since server start
2 participants