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 a route which returns the API version #112

Open
RemiBardon opened this issue Jan 4, 2025 · 0 comments
Open

Add a route which returns the API version #112

RemiBardon opened this issue Jan 4, 2025 · 0 comments
Assignees
Labels
ci Improvements to the CI enhancement New feature or request good first issue Good for newcomers

Comments

@RemiBardon
Copy link
Member

RemiBardon commented Jan 4, 2025

Sometimes @Paloma-Sanchez seems to have issues where she runs a Docker image but Dokcer uses an outdated version and bugs aren't fixed as expected. To help detecting this, I suggest we add a route which returns informations about the api version.

We should return the tag, but also the date at which the image was built, which is far easier to reason with.

Also, since we won't have the opportunity to return the current tag for edge and local builds, returning the build date will make total sense.

On the version information route, we could return an object like this:

{
    "version": "v0.4.0 (2025-01-01)",
    "tag": "v0.4.0",
    "build_date": "2025-01-01",
    "build_timestamp": "2025-01-01T22:12:00Z",
    "commit_short": "e3e6bbb",
    "commit_long": "e3e6bbba82fa0d1934990f878c1db376fc35f7d8"
}

This way, we'd support adding more keys in the future if needed.

For local builds, it could look like:

{
    "version": "local (2025-01-04)",
    "tag": "local",
    "build_date": "2025-01-04",
    "build_timestamp": "2025-01-04T11:09:00Z",
    "commit_short": null,
    "commit_long": null
}

(We might want to add commit information if there are no unstaged changes.)

Finally, for edge builds it'd look like this:

{
    "version": "edge (2025-01-01)",
    "tag": "edge",
    "build_date": "2025-01-01",
    "build_timestamp": "2025-01-01T22:15:00Z",
    "commit_short": "e3e6bbb",
    "commit_long": "e3e6bbba82fa0d1934990f878c1db376fc35f7d8"
}
@RemiBardon RemiBardon added enhancement New feature or request good first issue Good for newcomers ci Improvements to the CI labels Jan 4, 2025
@github-project-automation github-project-automation bot moved this to Backlog & Ideas 💡 in Prose Pod API to-do list Jan 4, 2025
@RemiBardon RemiBardon self-assigned this Jan 4, 2025
@RemiBardon RemiBardon moved this from Backlog & Ideas 💡 to Not Started 🕑 in Prose Pod API to-do list Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Improvements to the CI enhancement New feature or request good first issue Good for newcomers
Projects
Status: Not Started 🕑
Development

No branches or pull requests

1 participant