drone / proposal

Drone Project Design Documents
13 stars 4 forks source link

Show environment variables for every step of every build in the UI #25

Open djmattyg007 opened 2 years ago

djmattyg007 commented 2 years ago

Being able to see the environment variables that were used for a particular step can be extremely helpful when debugging issues that occur in CI.

As a workaround, I currently add a step to my pipeline that looks like this (any image will do):

kind: "pipeline"
name: "printenv"
clone:
  disable: true
steps:
  - name: "printenv"
    image: "python:3.10"
    commands:
      - "env | sort"

However this is annoying to do, and is usually only done retroactively. It's also not complete - it doesn't capture environment variables that may be set for other steps, for example.

MarieReRe commented 2 years ago

Hey 👋🏻 @djmattyg007 Thanks for submitting your proposal. We usually review PRs every Tuesday but I will keep you up to date if anything changes. 🎉

bradrydzewski commented 1 year ago

👋 hey there. The main concern I have is that we create 70+ environment variables for each step and storing this would have a significant impact on database size. The database is often the main bottleneck when it comes to scaling a system, which is why we tend to be pretty conservative with the amount of information we store.

djmattyg007 commented 1 year ago

@bradrydzewski Could it be a feature toggle? That way for smaller users where database size isn't really a concern (like myself in a home setting), it can be turned on permanently. For bigger users, they can turn it on just when they need to (like when debugging issues), and leave it turned off most of the time.

It's probably worth noting that there isn't really a need to have each environment variable stored separately for indexing purposes. It's enough to have them all stored together and displayed in a single text box that can be searched with Ctrl+F in a browser, like how Buildkite operates.