Skip to content

fix: do not reuse connection for the commands#1624

Merged
jackdelahunt merged 1 commit intomainfrom
do-not-reuse-connection
Jul 1, 2022
Merged

fix: do not reuse connection for the commands#1624
jackdelahunt merged 1 commit intomainfrom
do-not-reuse-connection

Conversation

@wtrocki
Copy link
Collaborator

@wtrocki wtrocki commented Jul 1, 2022

This PR disables connection reuse.
In previous change I have noticed that we always refresh mas-sso tokens even when we do control plane commands only:

https://github.com/redhat-developer/app-services-cli/pull/1599/files

That would obviously cause problems in long term and was removed. As results we noticed 401 with tokens failing. Reason was that we had cache for connection function that was undocumented. I think we should disable this cache. This will create connection object couple times for 2-3 commands but overall it doesn't cause any extra problems and enables us to mix mas-sso commands

Note that mas-sso goes away so this is only temporary change anyway.

Verification

// wait 5 min after any command
rhoas kafka topic list

@wtrocki wtrocki requested a review from jackdelahunt July 1, 2022 14:20
@jackdelahunt jackdelahunt merged commit 72169ff into main Jul 1, 2022
@jackdelahunt jackdelahunt deleted the do-not-reuse-connection branch July 1, 2022 14:31
@jackdelahunt
Copy link
Contributor

Tested and verified 👍

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.

2 participants