Skip to content

Conversation

ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Nov 19, 2024

Closes #15568.

This improves the deprecation warnings, so that they use the config name for however they were supplied for both the deprecated option, and the recommended options.

(I'm assuming it's relatively obvious for users this is an env variable)

$ set -x CODER_ADDRESS 127.0.0.1:3003
$ coder server
WARN: `CODER_ADDRESS` is deprecated, please use `CODER_HTTP_ADDRESS` and `CODER_TLS_ADDRESS` instead.
$ coder server --address 127.0.0.1:3003
WARN: `--address` is deprecated, please use `--http-address` and `--tls-address` instead.

YAML names are fully qualified, to make it clear they're set via YAML

$ coder server --config config.yaml
WARN: `introspection.logging.verbose` is deprecated, please use `introspection.logging.filter` instead.

This PR also applies the middleware to all commands.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ethanndickson ethanndickson marked this pull request as ready for review November 19, 2024 03:17
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up @ethanndickson!

Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@ethanndickson ethanndickson force-pushed the ethan/cli-deprecation-warnings branch from 74836c8 to 3f74426 Compare November 19, 2024 10:04
@ethanndickson ethanndickson enabled auto-merge (squash) November 19, 2024 10:05
@ethanndickson ethanndickson merged commit 1c08580 into main Nov 19, 2024
27 checks passed
@ethanndickson ethanndickson deleted the ethan/cli-deprecation-warnings branch November 19, 2024 10:15
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 this pull request may close these issues.

Unhelpful warning is displayed when using deprecated configs
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy