-
Notifications
You must be signed in to change notification settings - Fork 14
Ecosystem implementation #3683
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
Ecosystem implementation #3683
Conversation
The depot does not actually contain buildplan artifact structs, so we can only use IDs.
@@ -90,7 +91,7 @@ type setup struct { | |||
toInstall buildplan.ArtifactIDMap | |||
|
|||
// toUninstall encompasses all artifacts that will need to be uninstalled for this runtime. | |||
toUninstall map[strfmt.UUID]struct{} | |||
toUninstall map[strfmt.UUID]bool |
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.
The depot does not have enough information to construct a buildplan.Artifact
object. The depot only tracks artifact IDs, and we infer what artifacts to uninstall by IDs that do not exist in the incoming buildplan. I am changing from struct{}
to bool
to better reflect this for now, as it was a source of confusion.
CP-956, which is to implement Remove()
and Untrack()
should hopefully figure out how best to accomplish what we want.
@@ -269,11 +281,18 @@ func (s *setup) update() error { | |||
} | |||
} | |||
|
|||
// Tell applicable ecosystems to perform any final uninstall actions. |
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.
I'm not convinced we can have Apply()
do both uninstall and install at the same time, so I'm calling Apply()
here after all of the Remove()
calls, and then again later in this file after all of the Add()
calls.
Feel free to correct me on this.
|
||
// TODO: CP-956 | ||
//if ecosys := filterEcosystemMatchingArtifact(artifact, s.ecosystems); ecosys != nil { | ||
// err := ecosys.Remove(artifact) |
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.
The depot does not have enough information to construct an artifact
(buildplan.Artifact
), so CP-956 will have to figure out what approach to take when re-enabling this block of code.
@mitchell-as could you open a new PR? I'll close this one. Since I opened it I can't properly review it. |
@Naatan done. |
Remove()
andUntrack()
function, which is to be done in CP-956.Track()
andUntrack()
as necessary.Add()
andRemove()
functions do not call the depot's existing artifact install and uninstall routines, justTrack()
andUntrack()
.