Skip to content

Conversation

@pavanputhra
Copy link
Contributor

  • Introduced build arguments in Dockerfile for versioning information (version, git commit, build time).
  • Enhanced server startup logging to include version details.
  • Added a new /version endpoint to return server version information.
  • Implemented a health check endpoint that includes version info in the response.
  • Updated GitHub Actions workflow to automate CalVer versioning and tagging for Docker images.

- Introduced build arguments in Dockerfile for versioning information (version, git commit, build time).
- Enhanced server startup logging to include version details.
- Added a new `/version` endpoint to return server version information.
- Implemented a health check endpoint that includes version info in the response.
- Updated GitHub Actions workflow to automate CalVer versioning and tagging for Docker images.
@pavanputhra pavanputhra requested a review from Copilot January 18, 2026 08:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces versioning and health monitoring capabilities to the vCon server. The changes enable CalVer-based automatic versioning during builds and provide endpoints for clients to check server version and health status.

Changes:

  • Added version management module with functions to retrieve version, git commit, and build time information
  • Implemented /version and /health API endpoints for monitoring
  • Enhanced Docker build process to inject versioning metadata via build arguments
  • Automated CalVer versioning and release creation in GitHub Actions workflow

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
server/version.py New module providing version information retrieval functions with environment variable fallbacks
server/main.py Added startup logging to display version information when server initializes
server/api.py Implemented public /version and /health endpoints returning version metadata
docker/Dockerfile Added build arguments and environment variables for version injection
.github/workflows/docker-publish.yml Automated CalVer version generation, git tagging, Docker image tagging, and GitHub release creation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@slyapustin
Copy link
Member

@pavanputhra Just a suggestion: it is common for API servers to return the version in response headers. This makes it easy to inspect using curl, proxies, load balancers, and APM tools.

@pavanputhra
Copy link
Contributor Author

@pavanputhra Just a suggestion: it is common for API servers to return the version in response headers. This makes it easy to inspect using curl, proxies, load balancers, and APM tools.

You, mean in every API calls?

- Introduced VersionHeaderMiddleware to append version and commit information to all API responses.
- Updated the version endpoint to reflect the new naming convention.
- Enhanced response headers for better debugging and monitoring capabilities.
@pavanputhra
Copy link
Contributor Author

@slyapustin Updated according to your comments

@slyapustin
Copy link
Member

@pavanputhra How do you plan to update VCON_SERVER_VERSION?
It is currently based on an environment variable set externally.

Should we consider defining the version inside the app instead (https://peps.python.org/pep-0396/)? That would be a more Pythonic approach and would allow the version to be tracked within the application without relying on an environment variable.

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.

3 participants