elastic / apm-agent-php

Apache License 2.0
252 stars 69 forks source link

updatecli: dynamic specs #1123

Closed v1v closed 7 months ago

v1v commented 7 months ago

What does this PR do?

Test

GITHUB_WORKSPACE=/tmp \
  PATH=/opt/homebrew/bin:$PATH \
  GIT_USER="Victor Martinez" \
  GIT_EMAIL="VictorMartinezRubio@gmail.com" \
  GITHUB_TOKEN=$(gh auth token) \
  updatecli apply --config .ci/updatecli/updatecli.d --values .ci/updatecli/values.yml --debug

or without pushing any changes

GITHUB_WORKSPACE=/tmp \
  PATH=/opt/homebrew/bin:$PATH \
  GIT_USER="Victor Martinez" \
  GIT_EMAIL="VictorMartinezRubio@gmail.com" \
  GITHUB_TOKEN=$(gh auth token) \
  updatecli apply --config .ci/updatecli/updatecli.d --values .ci/updatecli/values.yml --push=false --debug

additionally, you can change the org from elastic to your own GitHub avatar.

https://github.com/elastic/apm-agent-php/pull/1124 was created accordingly

intuibase commented 7 months ago

Hey @v1v What is the background to this change? What does this tool give us?

v1v commented 7 months ago

What is the background to this change?

It used to have defined the json-specs and specs from elastic/apm and elastic/apm-data in a static manner, so if for some reason those specs were renamed then they will be required to be changed in the updatecli pipeline. That's not convenience when there are 8 APM Agents.

If you search for Simplify tests specs update from APM to APM agents in this PR you can find the link to the private GitHub repository with the context.

What does this tool give us?

That particular automation was already put in place in https://github.com/elastic/apm-agent-php/pull/889

Back in the days, we used to centralise all those changes but we came up with the proposal to let the consumers own the automation.