feat: add OLake version information to log output#897
Closed
officialasishkumar wants to merge 2 commits intodatazip-inc:stagingfrom
Closed
feat: add OLake version information to log output#897officialasishkumar wants to merge 2 commits intodatazip-inc:stagingfrom
officialasishkumar wants to merge 2 commits intodatazip-inc:stagingfrom
Conversation
Add build-time version variables (version, commitSHA, releaseChannel) to the constants package, populated via ldflags during build. On startup, the OLake version, commit SHA, and release channel are logged as the first informational message after logger initialization. The version resolution checks the build-time injected variable first, then falls back to the DRIVER_VERSION environment variable (set in Docker images), and defaults to "dev" for local development. Also fixes the ldflags paths in build.sh to use the full Go import path (github.com/datazip-inc/olake/constants) and updates the telemetry package to use the centralized version function from constants, removing the duplicated environment variable lookup. Closes datazip-inc#861
|
|
Collaborator
|
@officialasishkumar We usually do not consider the PR until unless you have requested first for getting the issue assigned to you. Since the issue is not requested yet can you please go ahead and request for the issue to be assigned to you so that I can do the same. Also can you please sign the CLA as well. |
Collaborator
|
Closing the PR as no further response was received. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add build-time version information (version, commit SHA, release channel) to the OLake log output. In Kubernetes environments with multiple OLake jobs running concurrently, it can be difficult to determine which OLake version was used for a particular job. This change logs the version as the first informational message after logger initialization, making it easy to identify the OLake version from log files.
Changes:
version,commitSHA, andreleaseChannelvariables to theconstantspackage, populated via ldflags during buildGetVersion(),GetCommitSHA(), andGetReleaseChannel()getter functions for accessing version infoprotocol/root.goafter logger initializationbuild.shto use the full Go import path (github.com/datazip-inc/olake/constants)constants.GetVersion()function, removing duplicated env var lookupThe version resolution follows a priority order:
DRIVER_VERSIONenvironment variable (set in Docker images)"dev"for local developmentFixes #861
Type of change
How Has This Been Tested?
go vetgo test ./types/...,go test ./constants/...)DRIVER_VERSIONenv var fallback works when ldflags are not injectedScreenshots or Recordings
N/A - log output change
Documentation
Related PR's (If Any):