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

Migrate Ginkgo Expectations to operatorpkg #1348

Open
jonathan-innis opened this issue Jun 24, 2024 · 13 comments
Open

Migrate Ginkgo Expectations to operatorpkg #1348

jonathan-innis opened this issue Jun 24, 2024 · 13 comments
Assignees
Labels
good-first-issue Good for newcomers kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@jonathan-innis
Copy link
Member

Description

What problem are you trying to solve?

Right now, we have a bunch of duplicates for "expectations" for Ginkgo testing that are already present in operatorpkg. We should be able to just do a once-off migration over to it and drop all of these exepctations from our codebase.

See: https://github.com/awslabs/operatorpkg/blob/main/test/expectations/expectations.go

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@jonathan-innis jonathan-innis added good-first-issue Good for newcomers kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Jun 24, 2024
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jun 24, 2024
@jeevanpuchakay
Copy link
Contributor

jeevanpuchakay commented Sep 8, 2024

Can you provide a specific instance where we can do this? That can help someone pretty new to this code base (Ex - A test/test-suite where an expectation is a duplicate of something that is already present in operator). If I have understood it correctly we want to adopt the expectations from operatorpkg and drop anyother expectations that are defined locally in a class/else-where.

@jeevanpuchakay
Copy link
Contributor

I think I got it! Gotta replace these with this. Can I get this issue assigned to me?

@jeevanpuchakay
Copy link
Contributor

Checking if there is any developer guide to setup local IDE formatting and a way to run UTs directly from VSCode. Feel free to add these instructions/wiki here if someone has it handy (there alot of docs, its taking time to navigate through them)

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 7, 2024
@jeevanpuchakay
Copy link
Contributor

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 1, 2025
@jeevanpuchakay
Copy link
Contributor

jeevanpuchakay commented Jan 4, 2025

What do we do when we run into a scenario where some of the expectations defined in sigs.k8s.io/karpenter/pkg/test/expectations (local) are not present in github.com/awslabs/operatorpkg/test/expectations? Can we use a named import for local ExpectationsUtility so that there is no issue in redeclaration of same expectations (or do we prefer moving the expectation from local file to operatorpkg)?

cc - @jonathan-innis (original issue author), @njtran (one of my PR reviewer)

@jonathan-innis
Copy link
Member Author

/assign @jeevanpuchakay

@jonathan-innis
Copy link
Member Author

jonathan-innis commented Jan 14, 2025

@jeevanpuchakay In the future, you can assign yourself to these issues yourself if you want by just calling /assign or using any of the other Kuberenetes Contributor Commands

@jonathan-innis
Copy link
Member Author

Can we use a named import for local ExpectationsUtility so that there is no issue in redeclaration of same expectations

I think if we have duplicates in expectations, then we should remove the expectation from this package and rely on the one in operatorpkg. The reason that we couldn't migrate the changes piece-meal in the first-place is because we wanted to continue using dot-imports but we couldn't do that so long as we have duplicates.

@jigisha620
Copy link
Contributor

/triage accepted

@k8s-ci-robot
Copy link
Contributor

@jigisha620: The label triage/accepted cannot be applied. Only GitHub organization members can add the label.

In response to this:

/triage accepted

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@jmdeal
Copy link
Member

jmdeal commented Feb 17, 2025

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Good for newcomers kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

6 participants