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

Get the library version form /healthcheck response #2799

Closed
11 tasks done
cbeauchesne opened this issue Jul 23, 2024 · 0 comments
Closed
11 tasks done

Get the library version form /healthcheck response #2799

cbeauchesne opened this issue Jul 23, 2024 · 0 comments
Assignees

Comments

@cbeauchesne
Copy link
Collaborator

cbeauchesne commented Jul 23, 2024

The initial solution to get library version was, at build step :

  1. at lib install, run some bash command line that get the version
  2. store it in a file SYSTEM_TESTS_LIBRARY_VERSION
  3. then, get it in the build process thanks to a docker run weblog cat SYSTEM_TESTS_LIBRARY_VERSION
  4. and put it as a env var in the weblog image with docker build --arg version=$VERSION

This mechanism offers one great advantage : for a given language, only one file must be adapted : install_ddtrace.sh script.

But it comes with some disadvantages :

  1. extra build time, the docker run cat is not free
  2. the bash CLI may be difficult to get it work with different library version
  3. and, the worst disadvantage : the version has to be known at the build step. If this is not an issue for common CI run, it make the build step a mandatory step if the lib is modified, where in theory, it can be injected at run step, making the dev process was smoother

The disadvantage 3 has been the main motivation from getting away from the existing solution, for the nodejs library who wanted to be able to mount directly their sources at the run step.

The target solution is to get this version thanks to the healthcheck requests :

  • no extra time, as this request has to be done
  • can handle version issue natively without tricking bash command lines

At the non-negligible cost of requiring all weblogs to be adapted.

cbeauchesne added a commit that referenced this issue Aug 26, 2024
@cbeauchesne cbeauchesne changed the title Get the library version form healtcheck response Get the library version form /healthcheck response Aug 30, 2024
@cbeauchesne cbeauchesne self-assigned this Oct 11, 2024
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

No branches or pull requests

1 participant