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

config: fixing bug sosEndpoint lost after user switch account #652

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

elkezza
Copy link
Contributor

@elkezza elkezza commented Nov 18, 2024

Fixing bug sosEnpoint lost in the .toml file, in case the user added sosEndpoint, it gets lost after switching the account.

Checklist

(For exoscale contributors)

  • Changelog updated (under Unreleased block)
  • Testing

Testing

Before the fix

This is how the toml file looks like

defaultZone = 'at-vie-1'
key = 'test'
name = 'Test'
secret = 'test2348198test'
sosendpoint = 'https://sos-{zone}.exo.io'

[[accounts]]
defaultZone = 'at-vie-1'
key = 'test2'
name = 'test-2'
secret = 'test3'
sosendpoint = 'https://ppsos-{zone}.exo.io'

After the user switch the account

go run . config
Use the arrow keys to navigate: j k l h 
? Configured accounts (* = default account):
  >Test*
    test-2
    <Configure a new account>

defaultZone = 'at-vie-1'
key = 'test'
name = 'Test'
secret = 'testkey'

[[accounts]]
defaultZone = 'at-vie-1'
key = 'test2'
name = 'test-2'
secret = 'testKey'

After the fix

defaultZone = 'at-vie-1'
key = 'test'
name = 'Test'
secret = 'test2348198test'
sosendpoint = 'https://sos-{zone}.exo.io'

[[accounts]]
defaultZone = 'at-vie-1'
key = 'test2'
name = 'test-2'
secret = 'test3'
sosendpoint = 'https://ppsos-{zone}.exo.io'

After the user switch the account

go run . config
Use the arrow keys to navigate: j k l h 
? Configured accounts (* = default account):
  >Test*
    test-2
    <Configure a new account>

defaultZone = 'at-vie-1'
key = 'test'
name = 'Test'
secret = 'testkey'
sosendpoint = 'https://ppsos-{zone}.exo.io'

[[accounts]]
defaultZone = 'at-vie-1'
key = 'test2'
name = 'test-2'
secret = 'testKey'
sosendpoint = 'https://ppsos-{zone}.exo.io'

elkezza and others added 2 commits November 18, 2024 17:24
@elkezza elkezza requested a review from a team November 18, 2024 17:51
Copy link
Member

@sauterp sauterp left a comment

Choose a reason for hiding this comment

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

nice! thanks

@elkezza elkezza merged commit cc0f332 into master Nov 19, 2024
1 check passed
@elkezza elkezza deleted the salehelkaza/sc-109025/cli-exoscale-toml-changes-lost branch November 19, 2024 10:46
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.

3 participants