sauce_whisk icon indicating copy to clipboard operation
sauce_whisk copied to clipboard

Inconsistent ENV usage across languages is problematic

Open bootstraponline opened this issue 10 years ago • 6 comments

sauce_whisk

ENV['SAUCE_USERNAME'] ||= 'test_user' ENV['SAUCE_ACCESS_KEY'] ||= 'test_key'

sauce-java

private static final String SAUCE_USER_NAME = "SAUCE_USER_NAME"; private static final String SAUCE_API_KEY = "SAUCE_API_KEY";

I think Sauce should have a standard naming convention for the ENV vars instead of different values for each project.

bootstraponline avatar Apr 14 '14 16:04 bootstraponline

The sauce java client ended up supporting:

  • SAUCE_USER_NAME
  • SAUCE_USERNAME
  • SAUCE_API_KEY
  • SAUCE_ACCESS_KEY

There's still a great deal of inconsistency depending on the clients (most use only two from the above list). The java client is the only one that supports all 4. It'd be good to know what ones are "official."

bootstraponline avatar May 01 '15 15:05 bootstraponline

i don't think Sauce can have any stance on 'official' names for env vars. but i agree that the various clients should endeavor to use the same thing to avoid surprise.

jlipps avatar May 01 '15 16:05 jlipps

Sauce could say here's what we're supporting consistently across the clients instead of using different names in the docs and each language. That's what I meant by 'official.' People run into the same issue with the appium clients. I've settled on SAUCE_USERNAME and SAUCE_ACCESS_KEY since that tends to be used more frequently. If people are using the other names then it's going to break. Ultimately I think the official sauce clients should support all 4 since it's not the users fault there's inconsistency in naming.

bootstraponline avatar May 01 '15 16:05 bootstraponline

fair enough. i think the sauce docs should always use 1 style as an example, and have all the clients support all 4 styles.

jlipps avatar May 01 '15 16:05 jlipps

sounds good to me :+1:

bootstraponline avatar May 01 '15 16:05 bootstraponline

I agree it'd be good to at least standardise on what we do it in docs; Personally I like API_KEY but the term ACCESS_KEY is more widely used.

DylanLacey avatar May 06 '15 05:05 DylanLacey