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

Phase out environment variables prefixed DRONE_, use WOODPECKER_ #209

Closed
marians opened this issue May 29, 2021 · 5 comments · Fixed by #218
Closed

Phase out environment variables prefixed DRONE_, use WOODPECKER_ #209

marians opened this issue May 29, 2021 · 5 comments · Fixed by #218
Milestone

Comments

@marians
Copy link
Contributor

marians commented May 29, 2021

Currently (as of v0.13.0), every environment variable for configuring woodpecker seems to come in two flavours: One prefixed DRONE_ and one prefixed WOODPECKER_.

The coexistence of these two versions of variables with identical meaning makes documentation, help text, and error messages hard to read (see my PR #208 for an example).

To improve the user experience, I recommend to make a decision regarding when to drop the DRONE_ spelling and communicate that decision clearly.

Since woodpecker is still in the v0.x.x major version realm, I would argue such a change could happen with any minor version bump.

@laszlocph
Copy link
Member

laszlocph commented May 31, 2021

Let's do it.

It has been a maintenance pain.

The main reason for keeping both prefixes is to ease the migration from Drone. While I've seen users migrating from 0.8, many of the new users are either coming from Drone 1.X, or new to Woodpecker completely.

Let's drop DRONE_* and communicate the breaking change in the release notes.

@marians
Copy link
Contributor Author

marians commented May 31, 2021

How about using the occasion for these additional clean-ups?

  • Remove DATABASE_DRIVER in favour of WOODPECKER_DATABASE_DRIVER
  • Remove DATABASE_CONFIG in favour of WOODPECKER_DATABASE_DATASOURCE
  • Remove WOODPECKER_HOSTin favour of WOODPECKER_SERVER_HOST
  • Remove WOODPECKER_SECRET in favour of WOODPECKER_AGENT_SECRET

IMO it would help to remove the guesswork and make the code more maintainable.

@marians
Copy link
Contributor Author

marians commented May 31, 2021

... and rename XDG_CACHE_HOME to WOODPECKER_LETS_ENCRYPT_PATH

@tboerger
Copy link
Contributor

tboerger commented Jun 5, 2021

It's best practice for many projects to prefix the env variables by the project name, so let's use WOODPECKER_.

The xdg env variable should keep the name as it is.

@tboerger
Copy link
Contributor

tboerger commented Jun 5, 2021

XDG_CACHE_HOME is a standard env variable name from freedesktop and it's only the base path where the let's encrypt certificates are stored.

@anbraten anbraten added this to the 0.15.0 milestone Sep 23, 2021
@6543 6543 closed this as completed in #218 Sep 28, 2021
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

Successfully merging a pull request may close this issue.

4 participants