kubernetes-sigs / reference-docs

Tools to build reference documentation for Kubernetes APIs and CLIs.
Apache License 2.0
87 stars 102 forks source link

[genref] Strip prefix in map types. #343

Closed trasc closed 9 months ago

trasc commented 9 months ago

This PR applies the StripPrefix logic for map types (keys and values).

tengqm commented 9 months ago

/approve

k8s-ci-robot commented 9 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tengqm, trasc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/reference-docs/blob/master/OWNERS)~~ [tengqm] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
alculquicondor commented 9 months ago

@tengqm did you miss the LGTM or are you waiting for someone else to take a look?

sftim commented 9 months ago

This needs an LGTM review in order to merge. @alculquicondor if you can point this PR out to people who review Go code, it'll help.

sftim commented 9 months ago

(I don't know your intent here @tengqm )

tengqm commented 9 months ago

I was trying to let someone else chime in with a lgtm, although I think this is a good improvement to the current code. If the PR receives no reviews from other reviewers, and I still remember here is a PR to be merged, I'll give it a lgtm.

trasc commented 9 months ago

@tengqm @sftim Not necessary related to this PR, but , is there a plan to have releases in this project, or adding go module version tags?

tengqm commented 9 months ago

@tengqm @sftim Not necessary related to this PR, but , is there a plan to have releases in this project, or adding go module version tags?

No plan yet. Open to all kinds of suggestions.

trasc commented 9 months ago

@tengqm @sftim Not necessary related to this PR, but , is there a plan to have releases in this project, or adding go module version tags?

No plan yet. Open to all kinds of suggestions.

We are thinking of using genref in kueue (https://kueue.sigs.k8s.io/docs/) and being able to reference by a version instead of a commit hash will help.

Currently we are doing something like:

https://github.com/kubernetes-sigs/kueue/blob/099ed21f62fe46f2ee451f7ffa40bcea03def9ff/Makefile#L317-L321

tengqm commented 9 months ago

@tengqm @sftim Not necessary related to this PR, but , is there a plan to have releases in this project, or adding go module version tags?

No plan yet. Open to all kinds of suggestions.

We are thinking of using genref in kueue (https://kueue.sigs.k8s.io/docs/) and being able to reference by a version instead of a commit hash will help.

Currently we are doing something like:

https://github.com/kubernetes-sigs/kueue/blob/099ed21f62fe46f2ee451f7ffa40bcea03def9ff/Makefile#L317-L321

Okay. If a version tag is needed, we can actually do it starting now. How about we tag the current master head as 'v0.28.0' or something like that?

trasc commented 9 months ago

@tengqm @sftim Not necessary related to this PR, but , is there a plan to have releases in this project, or adding go module version tags?

No plan yet. Open to all kinds of suggestions.

We are thinking of using genref in kueue (https://kueue.sigs.k8s.io/docs/) and being able to reference by a version instead of a commit hash will help. Currently we are doing something like: https://github.com/kubernetes-sigs/kueue/blob/099ed21f62fe46f2ee451f7ffa40bcea03def9ff/Makefile#L317-L321

Okay. If a version tag is needed, we can actually do it starting now. How about we tag the current master head as 'v0.28.0' or something like that?

It should be fine, but in order to reference genref we might also need the genref/v0.28.0 tag, and it will be even better if this PR is also merged.

tengqm commented 9 months ago

/lgtm

tengqm commented 9 months ago

PR kicked in and tag 'v0.28.0' for the project has been added.

trasc commented 9 months ago

PR kicked in and tag 'v0.28.0' for the project has been added.

Thanks @tengqm. Can you also push a tag called genref/v0.28.0? We need that to be able to do thinks like go install github.com/kubernetes-sigs/reference-docs/genref@0.28.0 since genref it's a go module (has it's own go.mod/ go.sum).

tengqm commented 9 months ago

PR kicked in and tag 'v0.28.0' for the project has been added.

Thanks @tengqm. Can you also push a tag called genref/v0.28.0? We need that to be able to do thinks like go install github.com/kubernetes-sigs/reference-docs/genref@0.28.0 since genref it's a go module (has it's own go.mod/ go.sum).

done

trasc commented 9 months ago

PR kicked in and tag 'v0.28.0' for the project has been added.

Thanks @tengqm. Can you also push a tag called genref/v0.28.0? We need that to be able to do thinks like go install github.com/kubernetes-sigs/reference-docs/genref@0.28.0 since genref it's a go module (has it's own go.mod/ go.sum).

done

Hi @tengqm, it looks to be a small issue , the tag should be genref/v0.28.0. (not generef/v0.28.0)

tengqm commented 9 months ago

should be okay now.