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

Environment variable configuration changes #1355

Merged
merged 1 commit into from
Apr 29, 2020
Merged

Environment variable configuration changes #1355

merged 1 commit into from
Apr 29, 2020

Conversation

heyman
Copy link
Member

@heyman heyman commented Apr 28, 2020

  • Automatically generate documentation for all available environment variables when documentation is built.
  • Explicitly set environment variable names for the command line options.
  • Rename env variables LOCUST_MASTER, LOCUST_MASTER_PORT in order to make it less likely that they collide with env vars automatically added by Kubernetes. Also change the name of LOCUST_WORKER and LOCUST_MASTER_HOST for consistency.
  • Rename env variable CSVFILEBASE to LOCUST_CSV.
  • Remove --csv-base-name command line option.¨
  • Removed some redundant comments

* Automatically generate documentation for all available environment variables.
* Rename env variables LOCUST_MASTER, LOCUST_MASTER_PORT in order to make it less likely that they collide with env vars automatically added by Kubernetes. Also change the name of LOCUST_WORKER and LOCUST_MASTER_HOST for consistency.
* Rename env variable CSVFILEBASE to LOCUST_CSV.
* Remove --csv-base-name command line option.
@heyman heyman requested a review from cyberw April 28, 2020 16:44
@codecov
Copy link

codecov bot commented Apr 28, 2020

Codecov Report

Merging #1355 into master will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1355   +/-   ##
=======================================
  Coverage   80.69%   80.69%           
=======================================
  Files          24       24           
  Lines        2258     2258           
  Branches      346      346           
=======================================
  Hits         1822     1822           
  Misses        344      344           
  Partials       92       92           
Impacted Files Coverage Δ
locust/argument_parser.py 74.31% <ø> (ø)
locust/main.py 20.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7e65105...97491e4. Read the comment docs.

Copy link
Collaborator

@cyberw cyberw left a comment

Choose a reason for hiding this comment

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

Lgtm. I still prefer auto env vars, but it is not a big thing for me. I also slightly prefer the csv option to be stored as csv and not csv_prefix, but no biggie

You can probably remove the warning I added previously (the one that looks for K8s env vars). I’m on mobile so I cant find the specific file :)

@heyman
Copy link
Member Author

heyman commented Apr 28, 2020

I also slightly prefer the csv option to be stored as csv and not csv_prefix, but no biggie

The argument is still --csv. The only reason I changed the dest param to be csv_prefix was that I think the following help text:

  --csv CSV_PREFIX  Store current request stats to files in CSV format. Setting this option
                    will generate three files: [CSV_PREFIX]_stats.csv,
                    [CSV_PREFIX]_stats_history.csv and [CSV_PREFIX]_failures.csv

is slightly better than:

  --csv CSV      Store current request stats to files in CSV format. Setting this option
                 will generate three files: [CSV]_stats.csv,
                 [CSV]_stats_history.csv and [CSV]_failures.csv

(in the second help text there's a risk of confusion due to the "files in CSV format" string in the first sentence)

@cyberw
Copy link
Collaborator

cyberw commented Apr 28, 2020

Ok!

@heyman heyman merged commit cfa9072 into master Apr 29, 2020
@heyman heyman deleted the env-vars-config branch April 29, 2020 08:54
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.

2 participants