chanzuckerberg / cellxgene-census

CZ CELLxGENE Discover Census
https://chanzuckerberg.github.io/cellxgene-census/
MIT License
84 stars 22 forks source link

Add the census builder version to the report #645

Open ebezzi opened 1 year ago

ebezzi commented 1 year ago

The version used to run the census builder should be part of the release notes, to make sure that the latest version is currently in use.

Note that we have the following options:

  1. Just report the git_sha saved in the root collection metadata - free but hard to parse (the git SHA needs to be manually checked against the list of commits).
  2. Include the git tag somewhere in the builder - possibly in the census summary, so that it gets reported automatically? This would help since the git tag is actually based on the Census release version (something like v1.3.0+dev123). If, in the future, we decide to deploy the builder on release rather than from main, which I believe we will, this will be the exact version of the census.

@atolopko-czi @bkmartinjr any thoughts?

atolopko-czi commented 1 year ago

The version used to run the census builder should be part of the release notes

What do we mean by "release notes" here? Since the issue title says "to the report", I assume the builder-generated summary report, right? (And not API release notes, e.g.)

I think we have two separate concerns here:

  1. How to identify the builder version: e.g. sha1 vs semver. I think this is the less important concern, and sha1 seems fine IMO.
  2. How to capture the builder version. As long as we're running the builder from a git checkout of main, I think we can just report the builder version in the builder's summary, as returned by get_git_commit_sha() for now.

I would do this:

  1. Rename get_git_commit_sha() to get_builder_version(), and have it report a string, which can be sha1 for now. If we decide to change the version label to a semver, we just change the impl of that method.
  2. Continue to report get_builder_version() in the Census data summary metadata.
  3. Report the get_builder_version() in the summary report (the primary purpose of this issue, I believe).
  4. Future work: Have the builder's docker image creation job initialize an env var with sha1 and update get_builder_version() to detect the version from an env var set in the docker image.