Skip to content

feat/vcs info#1998

Open
alanpeixinho wants to merge 1 commit into
kernelci:mainfrom
profusion:feat/vcs-info
Open

feat/vcs info#1998
alanpeixinho wants to merge 1 commit into
kernelci:mainfrom
profusion:feat/vcs-info

Conversation

@alanpeixinho

@alanpeixinho alanpeixinho commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

What it is

Shows the deployed version (git describe --tags --always, uses tag if present, otherwise uses short commit) at the bottom of the sidebar, so we can tell which build is running even when drift is backend-only.

How to test

Dev

  • Start frontend with pnpm dev
  • Sidebar version should match git describe --tags --always --dirty.

Docker

  • Use APP_VERSION=$(git describe --tags --always) docker compose build dashboard.
  • Sidebar version should match APP_VERSION.

Closes #1611

@alanpeixinho

Copy link
Copy Markdown
Contributor Author
sidebar-vcs-info

file: ./dashboard/Dockerfile
push: true
build-args: |
VITE_APP_VERSION=${{ steps.version.outputs.value }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just a nit: your commit message says VITE_VERSION but actually is VITE_APP_VERSION

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed


- name: Compute app version
id: version
run: echo "value=$(git describe --tags --always)" >> "$GITHUB_OUTPUT"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we use a descriptive name here?

@alanpeixinho alanpeixinho Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Absolutelly. Do you have any suggestion?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you have any suggestion?

version or repo_version or app_version or APP_VERSION (or equivalent if you decide to change APP_VERSION)

Comment thread docker-compose.yml
context: .
dockerfile: ./dashboard/Dockerfile
args:
VITE_APP_VERSION: ${APP_VERSION:-}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why mix APP_VERSION and VITE_APP_VERSION?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The VITE_ prefix is required by VITE.
But, on our own variables, I would rather keep them agnostic (if we ever change vite).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In that case, I would prefer FRONTEND_VERSION or DASHBOARD_VERSION

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, use APP_VERSION as the container ARG/ENV, and set VITE_APP_VERSION inside the container, so we only interact with "our" variable when building (e.g. on the deploy-containers workflow)

    * Include a VITE_APP_VERSION derived from git describe.
    * Include frontend sidebar information showing VITE_VERSION.

    Closes kernelci#1611

Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
@mentonin

Copy link
Copy Markdown
Contributor

Can we make this a link to our repo? Maybe a permalink to the specific version, if not dirty

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.

Add git tag and commit to sidebar

3 participants