Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

piu.yaml MUST have a priority over autodetection #37

Open
CyberDem0n opened this issue Dec 14, 2017 · 10 comments
Open

piu.yaml MUST have a priority over autodetection #37

CyberDem0n opened this issue Dec 14, 2017 · 10 comments

Comments

@CyberDem0n
Copy link

#34 and #35 have changed old and absolutely valid behavior:

  • if odd-host isn't passed as an argument, piu should take whatever is written in piu.yaml and only if config is not there or invalid it should go with autodetection.
  • IMO, --check/--no-check should be switch off by default. In most cases we are trying to connect to a live instance. If you really want to verify that instance is up and running you can always specify --check.

In other words: piu shouldn't do any calls to AWS API if it is possible. We already suffering quite a lot from RateLimit exceptions and latest changes made it even worse, because for every piu run it does at least one API call.

@aermakov-zalando
Copy link
Contributor

@CyberDem0n Your account is somewhat of a special case, and the previous two changes were about improving the UX of normal users whose accounts usually don't bump into rate limits. Are you using Piu with different AWS accounts, or do you want to always use the same account by default?

@CyberDem0n
Copy link
Author

In 99% of cases I am using it with the default account (configured in piu.yaml). The same applies to the other members of my team.

@aermakov-zalando
Copy link
Contributor

I can add support for 2 new config settings that you could use to disable autodetection and instance validation. Would something like this work for you?

@Jan-M
Copy link

Jan-M commented Jan 19, 2018

Make check disabled by default. And if you need put it into piu yaml that people can enable this as default behavior.

Regarding odd host I also agree with Alexander.

@aermakov-zalando
Copy link
Contributor

aermakov-zalando commented Jan 19, 2018

@Jan-M I'll agree about the check, but not about the Odd host autodetection since it wastes a ridiculous amount of time for people with more than 1 AWS account. I've seen someone in a Friday demo wasting a minute on typing out -O ... and then fixing 2 misspellings in the hostname.

@CyberDem0n
Copy link
Author

I am not asking to disable auto-detection. My suggestion is to change the order in which it is picking what odd host it should use:

  1. command line argument -O, --odd-host
  2. environment variable ODD_HOST
  3. odd_host from piu.yaml
  4. try to "auto-detect" it.

Right now 4 has higher precedence than 3, what makes a really horrible user experience.

@aermakov-zalando
Copy link
Contributor

A lot of people already have an odd host in their piu.yaml files and this effectively disable auto-detection.

@aermakov-zalando
Copy link
Contributor

I can rename the config setting to force a migration. Would that work for you?

@CyberDem0n
Copy link
Author

A lot of people already have an odd host in their piu.yaml

These people can simply remove odd_host from there.

I can rename the config setting to force a migration. Would that work for you?

What do you mean?

@aermakov-zalando
Copy link
Contributor

I'd like to improve the UX by default for most of the users and the issue seems to only be affecting your account.

I meant renaming the config setting to default_odd_host or something like that. Then you'd still be able to configure it statically and for the rest of the users the config would be ignored.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants