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

Track dependency objects even if they don't exist #1082

Merged
merged 2 commits into from
Dec 5, 2022

Conversation

gcapizzi
Copy link
Contributor

@gcapizzi gcapizzi commented Dec 2, 2022

This should fix #1028.

In order to be able to track objects that don't exist yet, tracker.Tracker tracks objects by a reconciler.Key consisting of its schema.GroupKind and its types.NamespacedName.

Given the schema.GroupKind is derived from the object TypeMeta, I made sure that every object instantiated in tests has it set. I believe this should also be the case in production.

In order to make sure the schema.GroupKind was properly taken into account, I modified the testhelpers.FakeTracker to use the full reconciler.Key as its tracking key.

I wasn't able to run the end-to-end tests locally, unfortunately. Unit tests are passing but it would be nice if someone on the team could check the end-to-ends are also happy.

Please take a look and let me know how it looks!

This will allow us to track objects that don't exist yet.

Issue: buildpacks-community#1028
@matthewmcnew
Copy link
Collaborator

Thanks @gcapizzi

@tomkennedy513 tomkennedy513 merged commit d8a483e into buildpacks-community:main Dec 5, 2022
@davewalter davewalter deleted the track-by-key branch December 6, 2022 14:00
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.

Resources are not tracked if they are created out-order
3 participants