Skip to content

Commit dfe0faf

Browse files
authored
Only set metrics in the current step (#289)
This changes the way we export gcloud metrics from using `exportVariable` to setting `process.env` directly. The current approach exports the environment variable for all current **and future** steps. That means if a workflow uses deploy-appengine and then manually makes a few gcloud calls in subsequent steps, all of those calls would be attributed to deploy-appengine. It makes sense to do this for something like setup-gcloud, where the attribution _should_ go to the installation step. However, in this case, we are unintentionally attributing future gcloud commands to deploy-appengine. The new implementation only sets the values for the current process environment. Even though that _shouldn't_ carry to future steps, it also restores the previous environment values before exiting. Additionally, it sets the "version" metric as well, so we can start tracking that.
1 parent 502e2a3 commit dfe0faf

File tree

3 files changed

+157
-170
lines changed

3 files changed

+157
-170
lines changed

0 commit comments

Comments
 (0)