-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Track deployment namespaces in Deployer #6170
Track deployment namespaces in Deployer #6170
Conversation
58701ac
to
35ef4ad
Compare
Codecov Report
@@ Coverage Diff @@
## master #6170 +/- ##
==========================================
+ Coverage 71.20% 71.27% +0.06%
==========================================
Files 481 479 -2
Lines 21587 21550 -37
==========================================
- Hits 15371 15359 -12
+ Misses 5235 5212 -23
+ Partials 981 979 -2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get rid of all the Provider
interfaces before this. That would help clean up few interfaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple small nits, nothing major
@tejal29 should that block this change? not saying we shouldn't clean it up, but I'm not convinced it needs to happen before this, it seems a bit orthogonal. |
Is this |
The number of unnecessary changes in this PR will reduce. If we do them later, we will be adding a bunch of changes and then deleting them in the later PR. |
0e1a3ac
to
c2b042f
Compare
Good catch, meant to do this. Updated
Done. #6190 has also been merged to remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT.
Testing deploy now.
// cluster. Returns the list of impacted namespaces. | ||
Deploy(context.Context, io.Writer, []graph.Artifact) ([]string, error) | ||
// cluster. | ||
Deploy(context.Context, io.Writer, []graph.Artifact) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yay!
Testing Notes
|
a bad merge seems to have reverted #6135 |
Related: #6117
Description
Currently, the
Deploy()
method defined on allDeployer
implementations returns two values: anyerror
seen during the deployment, and a list ofnamespaces
deployed to. This list of namespaces is then returned back to theRunner
, which updates them on theRunContext
to be used later. This pattern is:runContext.GetNamespaces()
live inside theDeployer
implementation, andDeployer
implementations that have no use for the concept of a namespaceThis change moves the tracking of all deployed namespaces into the
Deployer
, which can then feed those namespaces to any subcomponents that require them to function properly.This changes the
Deploy
call to a very simple API:Additionally, all sub-components that provide a
Start()
method for orchestration by theRunner
(Accessor
,Debugger
,Monitor
, andLogger
have had thenamespaces
parameter removed from their signatures. UsingAccessor
as an example:All Kubernetes-based
Deployer
implementations provide atrackNamespaces()
method, called at the end of aDeploy()
, which will update an internal[]string
with the new namespaces. This[]string
is then passed by reference to all subcomponents, which can consume whatever the contents are as the effective namespaces.NOTE: We can safely use a
*[]string
to represent the active namespaces, as we know that no subcomponents will be activated by theRunner
until theDeploy()
call exits successfully.This change is a non-functional refactor.