akamai / cli-property-manager

Use this Property Manager CLI to automate Akamai property changes and deployments across many environments.
Apache License 2.0
29 stars 22 forks source link

Use .edgerc default section when other sections are missing #85

Closed stevensdavid closed 1 year ago

stevensdavid commented 1 year ago

Hi!

Commands such as akamai pm lpr --groupId <GROUP> --contractId <CONTRACT> expect .edgerc-sections that are specific to the API and do not fall back to the default section if it is missing.

$ akamai pm lpr --groupId <GROUP> --contractId <CONTRACT>

PM CLI Error: 'invalid_section_name' occurred: 
 Section 'papi' not found in edgerc file: '/Users/david/.edgerc'. Possible section names: ['default']

This is confusing to me as I'd expect the CLI to use the default section when other, more specific, sections are not found. Instead, I have to explicitly select the default section using e.g. akamai -s default pm ...

Is this by design or is it something that could be changed?

I'm running

$ akamai --version                                                       
akamai version 1.5.2

$ akamai pm --version                                         
0.7.8-RELEASE
stevensdavid commented 1 year ago

This is potentially better tracked in https://github.com/akamai/cli-property-manager/issues/60 by the way, feel free to close this if the problem is specific to PM.

wzagrajcz commented 1 year ago

Hello @stevensdavid Thanks for opening the issue. Originally it was designed that way but we are considering aligning that behaviour with other cli-packages (so using the default by default). Adding a fallback is something that we also will consider. We will be back if we have a decision.

This particular issue is property-manager specific so I'll transfer the issue to that repository.

Best regards, Wojciech

wzagrajcz commented 1 year ago

Hello @stevensdavid As per now, we decided not to add the fallback to default or change the default option for cli-pm to default. We don't want to add a package specific behaviour here. Need to use papi section is mentioned in readme and the error message seems pretty clear. If You think that any of them needs clarifications, we would be happy to hear Your suggestions.

As per now, I'm closing the issue.

Best regards, Wojciech