elastic / elastic/elastic-package

[CI] Allow to trigger PR CI builds running elastic-package commands with trace log level

Open
#2,774 0 comments 0 reactions 0 assignees View on GitHub
Team:Ecosystem
Dominant language
Go
Stars
72
Forks
141
Avg merge
19h 42m
Merged PRs (30d)
55

Description

Follows #1903

After being reviewed the messages shown by `elastic-package` in https://github.com/elastic/elastic-package/pull/2756, it would be interesting to allow developers to trigger CI builds with log level `trace` if it is needed.

It could be leveraged the GitHub comments to run the same pipeline with another debug mode:
https://github.com/elastic/elastic-package/blob/6003ba88bc1ddd3e26e56bf47de4f4e3306c76e7/.buildkite/pull-requests.json#L12-L13

In order to show the trace level `elastic-package` needs to set the parameter `-vv` or `-v -v` in the corresponding commands of the scripts used in CI.

Another approach is to add support of a new environment variable like `ELASTIC_PACKAGE_LOG_LEVEL` and set that variable with the corresponding value (`debug` or `trace`). For this approach there are some open questions:
- What would be the order of preference between parameter and environment variable?
- For instance, what if there is `ELASTIC_PACKAGE_LOG_LEVEL=trace` set but the command defines the parameter `-v` (`debug`), or vice-versa?
- If the environment variable is set, then all commands that are now executed without `debug` mode would start to show `debug` or `trace` messages.

This same change should be applied for the CI builds triggered in Pull Requests of the [integrations repository](https://github.com/elastic/integrations)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with .buildkite/pull-requests.json at the referenced command configuration and review the elastic-package changes discussed in pull request #2756. Determine how a pull-request comment can trigger the same pipeline with trace logging, including the parameter-versus-environment-variable behavior. Done means the relevant CI builds for both elastic-package and integrations can be run with the requested trace output.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
ci-cd, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.