edmunds / shadowreader

Serverless load testing for replaying website traffic. Powered by AWS Lambda.
Apache License 2.0
158 stars 13 forks source link

Replace all instances of "slave" with "worker" #27

Closed luckymike closed 6 years ago

luckymike commented 6 years ago

Master/Slave terminology has lost favor in the industry (e.g. https://medium.com/@mikebroberts/let-s-stop-saying-master-slave-10f1d1bf34df). In addition to being offensive to a lot of folks, it is a poor representation of the interaction between components. worker is a widely accepted, accurate substitute for systems with one component coordinates work among one or more other components.

This PR replaces all instances of slave with worker. Tests pass with the following updated config file (based on the config file downloaded here: https://github.com/edmunds/shadowreader/blob/master/.travis.yml#L28) :

# Copyright 2018 Edmunds.com, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This is an example config file for running CI tests
plugins:
  loader_middleware: loader_middleware
  replay_mode: replay_past
  producer: alb

config:
  # The following variables must be set according to where your ELB logs are being written to
  access_logs_bucket: myelb-logs-bucket/AWSLogs/123456789/elasticloadbalancing/us-east-1/
  plugins_location: plugins
  env_vars_to_get: [
                       'region', 'stage', 'parsed_data_bucket',
                       'consumer_master_past_name', 'consumer_worker_name'
                   ]
  timeouts:
    init_timeout: 1 # Requests sent by the load test must establish a connection under this many seconds otherwise it will result in a timeout
    resp_timeout: 3 # Requests sent by the load test must return a response under this many seconds otherwise it will result in a timeout

Thank you for considering this to make a more inclusive project.

ysawa0 commented 6 years ago

Hi @luckymike thanks for your contribution! I have looked over the request and think this would be a great change. I can work with you on verifying the changes and making them work with the tests/Travis. I will open up a separate PR for this.

luckymike commented 6 years ago

Great, thanks! I believe all that's necessary is updating the config file that travis downloads to use the new consumer_worker_name env var.

ysawa0 commented 6 years ago

@luckymike can you pull in the latest changes to master to your branch? I have resolved the issues with Travis.

cardoni commented 6 years ago

Thanks for your contribution, @luckymike!

luckymike commented 6 years ago

It looks like this fails on the PR because $TRAVIS_BRANCH is the target branch of the PR, rather than the source branch:

Per: https://docs.travis-ci.com/user/environment-variables

TRAVIS_BRANCH: for push builds, or builds not triggered by a pull request, this is the name of the branch. for builds triggered by a pull request this is the name of the branch targeted by the pull request. for builds triggered by a tag, this is the same as the name of the tag (TRAVIS_TAG).

ysawa0 commented 6 years ago

@luckymike can you try again? I've made the necessary changes to the build script.

luckymike commented 6 years ago

Looks like we're closer, but travis is looking for the branch in your repo rather than my fork :)

ysawa0 commented 6 years ago

All right, more changes merged from #32. Let's try this again.

luckymike commented 6 years ago

Looks like we're good now!