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

return git info in /extended/v1/status #724

Merged
merged 11 commits into from
Aug 27, 2021
Merged

Conversation

rafaelcr
Copy link
Collaborator

@rafaelcr rafaelcr commented Aug 25, 2021

Description

This PR adds git info (latest tag, current branch, current commit hash) to the /extended/v1/status endpoint so users can determine which API version they're currently running.

Closes #577

Type of Change

  • New feature
  • Bug fix
  • API reference/documentation update
  • Other

Does this introduce a breaking change?

No

Are documentation updates required?

Yes, endpoint documentation should be updated.

Testing information

Running npm run git-info regenerates the git file. This can be tested by calling /extended/v1/status.

Checklist

  • Code is commented where needed
  • Unit test coverage for new or modified code paths
  • npm run test passes
  • Changelog is updated
  • Tag 1 of @kyranjamie or @zone117x for review

@vercel
Copy link

vercel bot commented Aug 25, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/blockstack/stacks-blockchain-api/DDBpk9NxEcUq2Jm52Wsom9xR7cWq
✅ Preview: https://stacks-blockchain-api-git-feat-status-git-info-blockstack.vercel.app

@codecov
Copy link

codecov bot commented Aug 25, 2021

Codecov Report

Merging #724 (6308f48) into develop (439d4f4) will decrease coverage by 0.03%.
The diff coverage is 52.63%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #724      +/-   ##
===========================================
- Coverage    65.75%   65.72%   -0.04%     
===========================================
  Files           78       79       +1     
  Lines         8002     8020      +18     
  Branches      1254     1255       +1     
===========================================
+ Hits          5262     5271       +9     
- Misses        2735     2744       +9     
  Partials         5        5              
Impacted Files Coverage Δ
src/index.ts 0.00% <0.00%> (ø)
src/api/routes/status.ts 53.33% <53.33%> (ø)
src/api/init.ts 82.95% <100.00%> (+0.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 439d4f4...6308f48. Read the comment docs.

@rafaelcr rafaelcr marked this pull request as ready for review August 26, 2021 14:54
@rafaelcr rafaelcr requested a review from zone117x August 26, 2021 14:54
package.json Outdated Show resolved Hide resolved
Copy link
Member

@zone117x zone117x left a comment

Choose a reason for hiding this comment

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

LGTM!
cc @CharlieC3 for any gotchas around the way we're bundling git info here, for example is the updated version tag going to be available at this stage of the build process during automated releases?

@CharlieC3
Copy link
Member

is the updated version tag going to be available at this stage of the build process during automated releases?

I think it will be available. The step which builds and publishes the docker image runs after the semantic release step which creates the new tag. Plus, the .dockerignore file isn't ignoring the .git directory, so the full context should be present when the docker image builds.

@rafaelcr rafaelcr merged commit 0538ae2 into develop Aug 27, 2021
@rafaelcr rafaelcr deleted the feat/status-git-info branch August 27, 2021 19:24
@rafaelcr
Copy link
Collaborator Author

Thanks @CharlieC3 @zone117x 👍

@blockstack-devops
Copy link

🎉 This PR is included in version 0.65.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

4 participants