Skip to content

Conversation

@thaJeztah
Copy link
Member

Store a reference to the options in the client, so that they can be used for later use. Now that resolveContextName() is a very lightweight function we can also dynamically get its value and use it for cli.CurrentContext().

- A picture of a cute animal (not mandatory but encouraged)

Store a reference to the options in the client, so that they can be
used for later use. Now that resolveContextName() is a very lightweight
function we can also dynamically get its value and use it for
cli.CurrentContext().

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added status/2-code-review area/context kind/refactor PR's that refactor, or clean-up code labels Nov 28, 2022
@thaJeztah thaJeztah added this to the 23.0.0 milestone Nov 28, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #3884 (70738f8) into master (cbf0522) will increase coverage by 0.00%.
The diff coverage is 75.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3884   +/-   ##
=======================================
  Coverage   59.22%   59.23%           
=======================================
  Files         285      287    +2     
  Lines       24653    24656    +3     
=======================================
+ Hits        14601    14605    +4     
  Misses       9168     9168           
+ Partials      884      883    -1     

@thaJeztah thaJeztah marked this pull request as draft November 28, 2022 09:57
@thaJeztah
Copy link
Member Author

FWIW; moved this back to draft, as I'm still on the fence if we should resolve the context once at startup, or dynamically. Reason is that other properties (e.g. "DockerEndpoint" may not be resolved dynamically, so it would not make much sense to resolve this one dynamically.

So I may reduce this change back to only storing the options.

@thaJeztah
Copy link
Member Author

closing in favour of #3847

@thaJeztah thaJeztah closed this Nov 28, 2022
@thaJeztah thaJeztah deleted the context_lazy_evaluate_step1 branch November 28, 2022 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/context kind/refactor PR's that refactor, or clean-up code status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants