kubernetes-sigs / gateway-api

Repository for the next iteration of composite service (e.g. Ingress) and load balancing APIs.
https://gateway-api.sigs.k8s.io
Apache License 2.0
1.75k stars 453 forks source link

Publish policy on using generics in gateway-api #1388

Open keithmattix opened 1 year ago

keithmattix commented 1 year ago

What would you like to be added: With generics shipping in go1.18, the gateway-api project needs to have some kind of policy around when and how generics should be used. If upstream Kubernetes has a policy, we likely need to mirror it. If further discussion is needed, please use GitHub Discussions and/or Slack to engage members of the community.

Why this is needed: Generics are a very new Go feature, and the implications of using them in a large codebase/project are unknown. Thus, it will be useful for contributors to have guidelines for how to use generics in the gateway-api codebase.

/good-first-issue

k8s-ci-robot commented 1 year ago

@keithmattix: This request has been marked as suitable for new contributors.

Guidelines

Please ensure that the issue body includes answers to the following questions:

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-good-first-issue command.

In response to [this](https://github.com/kubernetes-sigs/gateway-api/issues/1388): > > >**What would you like to be added**: >With generics shipping in go1.18, the gateway-api project needs to have some kind of policy around when and how generics should be used. If upstream Kubernetes has a policy, we likely need to mirror it. > >**Why this is needed**: >Generics are a very new Go feature, and the implications of using them in a large codebase/project are unknown. Thus, it will be useful for contributors to have guidelines for how to use generics in the gateway-api codebase. > > > >/good-first-issue Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
akankshakumari393 commented 1 year ago

I would like to work on this issue. But would need guidance as well /assign

mikemorris commented 1 year ago

Refs https://github.com/kubernetes/community/blob/master/sig-architecture/generics.md for the upstream Kubernetes policy, and https://github.com/kubernetes/kubernetes/issues/106846 as a specific attempt at introducing generics in a meaningful way.

FWIW I did previously introduce some trivial usage of generics in https://github.com/kubernetes-sigs/gateway-api/pull/1081

akankshakumari393 commented 1 year ago

We have a upstream Kubernetes policy in place for using generics, I think we should mirror it for single source of truth

k8s-triage-robot commented 1 year ago

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

This bot triages PRs according to the following rules:

You can:

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

/lifecycle stale

shaneutt commented 5 months ago

Where are we at with this?