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

fix: Remove duplicate CSV nativeAPIs, sort by multi-field comparator #933

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

MikeEdgar
Copy link
Contributor

@MikeEdgar MikeEdgar commented Aug 22, 2024

This PR removes duplicate entries from the generated CSV's spec.nativeAPIs array.

Currently, output like the following may occur when multiple dependent resources handle native k8s types of the same kind, such as [1].

...
spec:
  ...
  nativeAPIs:
    - kind: ConfigMap
      group: ""
      version: v1
    - kind: Secret
      group: ""
      version: v1
    - kind: ServiceAccount
      group: ""
      version: v1
    - kind: ServiceAccount
      group: ""
      version: v1
    - kind: Service
      group: ""
      version: v1
    - kind: Service
      group: ""
      version: v1
    - kind: Deployment
      group: apps
      version: v1
    - kind: Deployment
      group: apps
      version: v1
    - kind: Ingress
      group: networking.k8s.io
      version: v1
    - kind: ClusterRoleBinding
      group: rbac.authorization.k8s.io
      version: v1
    - kind: ClusterRoleBinding
      group: rbac.authorization.k8s.io
      version: v1
    - kind: ClusterRole
      group: rbac.authorization.k8s.io
      version: v1
    - kind: ClusterRole
      group: rbac.authorization.k8s.io
      version: v1
  ...

[1] https://github.com/streamshub/console/tree/main/operator/src/main/java/com/github/streamshub/console/dependents

Signed-off-by: Michael Edgar <medgar@redhat.com>
@metacosm metacosm self-requested a review August 23, 2024 20:02
@metacosm metacosm merged commit cc34493 into quarkiverse:main Aug 23, 2024
6 checks passed
@MikeEdgar MikeEdgar deleted the distinct-nativeapis branch August 23, 2024 20:06
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.

2 participants