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

improve: mapping from annotation depends on type #2586

Closed
wants to merge 96 commits into from
Closed

Conversation

csviri
Copy link
Collaborator

@csviri csviri commented Nov 17, 2024

No description provided.

csviri and others added 30 commits November 13, 2024 20:02
Signed-off-by: Chris Laprun <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource

- use this name when throwing aggregate exception

Signed-off-by: Attila Mészáros <[email protected]>

* refactor to use a dedicated interface for setting the name

Signed-off-by: Attila Mészáros <[email protected]>

* refactor: add default implementation for name() (#2255)

Signed-off-by: Chris Laprun <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>

---------

Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Chris Laprun <[email protected]>
Co-authored-by: Chris Laprun <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Chris Laprun <[email protected]>
Co-authored-by: Chris Laprun <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Chris Laprun <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Chris Laprun <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
…2321)

Fixes #2311

Overriding getPrimaryResourceType should allow to make things work even
in deeper hierarchies.

Signed-off-by: Chris Laprun <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
csviri and others added 17 commits November 13, 2024 20:06
Signed-off-by: Attila Mészáros <[email protected]>
* imporve diff logging

Signed-off-by: bachmanity1 <[email protected]>

* compute diff only when actual doesn't match desired

Signed-off-by: bachmanity1 <[email protected]>

* slight improvements

Signed-off-by: bachmanity1 <[email protected]>

* increase context size

Signed-off-by: bachmanity1 <[email protected]>

* fix style

Signed-off-by: bachmanity1 <[email protected]>

* calculate diff only if debug is enabled

Signed-off-by: bachmanity1 <[email protected]>

* print actual resources when trace is enabled

Signed-off-by: bachmanity1 <[email protected]>

* use java-diff-utils

Signed-off-by: bachmanity1 <[email protected]>

* add unit tests

---------

Signed-off-by: bachmanity1 <[email protected]>
* feat(build): split ITs by category, parallel CRD generation

Also avoid generating CRDs when not needed by default, summarizes test
results.

* chore(deps): bump actions-setup-minikube to 2.13.0
* feat: default to use vertx client
* chore(ci): reduce tested combinations, only run client tests on baseapi
* fix: increase deletion timeout

---------

Signed-off-by: Chris Laprun <[email protected]>
Signed-off-by: Chris Laprun <[email protected]>
…resource requirements (#2565)

* refactor: clean up SSABasedGenericKubernetesResourceMatcher

Signed-off-by: David Sondermann <[email protected]>

* test: add missing tests for StatefulSet with VolumeClaimTemplates for SSABasedGenericKubernetesResourceMatcher

Signed-off-by: David Sondermann <[email protected]>

* fix: Fix infinite resource updates due to canonical format conversion of resource requirements

Signed-off-by: David Sondermann <[email protected]>

* test: Add test cases with init containers to ResourceRequirementsSanitizerTest

Signed-off-by: David Sondermann <[email protected]>

---------

Signed-off-by: David Sondermann <[email protected]>
Signed-off-by: Chris Laprun <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 17, 2024
@csviri csviri linked an issue Nov 17, 2024 that may be closed by this pull request
Signed-off-by: Attila Mészáros <[email protected]>
@@ -53,7 +53,8 @@ public List<EventSource<?, InformerRemoteClusterCustomResource>> prepareEventSou
.from(ConfigMap.class, InformerRemoteClusterCustomResource.class)
// owner references do not work cross cluster, using
// annotations here to reference primary resource
.withSecondaryToPrimaryMapper(Mappers.fromDefaultAnnotations())
.withSecondaryToPrimaryMapper(
Mappers.fromDefaultAnnotations(InformerRemoteClusterCustomResource.class))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could eliminate the part where we pass the class of primary resource. Maybe a setter on SecondaryToPrimaryMapper for the primary class?
@metacosm

@csviri csviri requested a review from metacosm November 19, 2024 17:01
@csviri csviri marked this pull request as ready for review November 19, 2024 17:01
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 19, 2024
@openshift-ci openshift-ci bot requested a review from adam-sandor November 19, 2024 17:01
@csviri
Copy link
Collaborator Author

csviri commented Nov 20, 2024

replaced by: #2599

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.

6 participants