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 latest commit hash to site #741

Closed
scottx611x opened this issue Oct 8, 2015 · 17 comments
Closed

Add latest commit hash to site #741

scottx611x opened this issue Oct 8, 2015 · 17 comments

Comments

@scottx611x
Copy link
Member

This will aid in debugging which code is being used by a specific instance.
Potentially add this info within the About tab.

@scottx611x scottx611x added this to the Next milestone Oct 8, 2015
@scottx611x scottx611x self-assigned this Oct 8, 2015
@ngehlenborg
Copy link
Contributor

git rev-parse HEAD provides the commit hash. Alternatively we could use git describe. We should integrate this into our build process and store the git info either in the settings.json or in a separate file that we can access from both Python and JavaScript.

@scottx611x
Copy link
Member Author

@ngehlenborg Sorry, I did not see this comment before I closed this issue, but I ended up using git rev-parse HEAD regardless.

@hackdna
Copy link
Member

hackdna commented Oct 8, 2015

Note that if the subprocess call to launch git produces an exception the whole application will fail to start.

@scottx611x
Copy link
Member Author

@hackdna Thanks for the heads up. Fixed this in 9dcd4f5.

@ngehlenborg ngehlenborg modified the milestones: Next, Gardner Oct 19, 2015
@scottx611x
Copy link
Member Author

fix try/except:754, add except Exception:

@hackdna
Copy link
Member

hackdna commented Jan 27, 2016

@scottx611x
Copy link
Member Author

Closed with commit: a100b05

@hackdna
Copy link
Member

hackdna commented Feb 2, 2016

Reopening, please see my comment on your commit for details.

@hackdna hackdna reopened this Feb 2, 2016
hackdna added a commit that referenced this issue Feb 2, 2016
@hackdna
Copy link
Member

hackdna commented Feb 2, 2016

Fixed in f48b57f

@hackdna hackdna closed this as completed Feb 2, 2016
@hackdna
Copy link
Member

hackdna commented Feb 9, 2016

@hackdna hackdna reopened this Feb 9, 2016
@ngehlenborg
Copy link
Contributor

Can you describe what you expect?

@hackdna
Copy link
Member

hackdna commented Feb 9, 2016

The link is broken, it should point to Github, for example: fe77b29. In any case, this is not a priority at the moment.

@scottx611x
Copy link
Member Author

@hackdna I'm not going to work on this immediately, but could you tell me what settings configuration you were using for this, as well as anything else that I would need to replicate the issue?

@drj11
Copy link
Contributor

drj11 commented Feb 10, 2016

the "URL" comes from the git remote whence the git repo was cloned.

See this code in base.py: https://github.com/parklab/refinery-platform/blob/fe77b29e84accc87221daca0333d9f040c5f5db3/refinery/config/settings/base.py#L475

So if you used a git remote of the form git@github.com... then the URL will start with that, if you use a git remote of the form https://github.com... then it will start like that.

the AWS install uses https://github.com/parklab/refinery-platform.git as the remote, so it should get the right URL (haven't tried it, it's broken for other reasons right now. sigh).

We can of course translate from git@github.com: to https://github.com/ for github, but for other remotes we cannot in general know what the right translation is.

@scottx611x
Copy link
Member Author

@drj Thanks for shedding some light on this!

@hackdna hackdna removed this from the Nahant milestone Feb 10, 2016
@drj11
Copy link
Contributor

drj11 commented Feb 11, 2016

As per my previous comment, it shows the right URL on an AWS install, because of the git remote I use:

giturl

The hover-over is cute. 🐼

@scottx611x
Copy link
Member Author

Closing as now we just include the full SHA without a link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants