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

Export types to make them reusable for other packages #33

Merged
merged 8 commits into from
Jun 22, 2021

Conversation

rfranzke
Copy link
Member

What this PR does / why we need it:
Export types to make them reusable for other packages

/invite @amshuman-kr
/squash

Release note:

Export types in `pkg/restarter` and `pkg/scaler` to make them reusable for other packages.

@rfranzke rfranzke requested a review from a team as a code owner June 18, 2021 11:49
@gardener-robot gardener-robot added merge/squash size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 18, 2021
@gardener-robot
Copy link

@amshuman-kr You have pull request review open invite, please check

Copy link
Collaborator

@amshuman-kr amshuman-kr left a comment

Choose a reason for hiding this comment

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

Thanks @rfranzke! Do you plan to reuse them elsewhere?

/lgtm

Copy link
Collaborator

@amshuman-kr amshuman-kr left a comment

Choose a reason for hiding this comment

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

@rfranzke make check is failing with the following logs. Could you please address them. Apart from that, LGTM.

pkg/restarter/types.go:47:6: exported type Service should have comment or be unexported
pkg/restarter/types.go:51:6: exported type DependantPods should have comment or be unexported
pkg/scaler/types.go:61:6: exported type ProbeDependants should have comment or be unexported
pkg/scaler/types.go:67:6: exported type ProbeConfig should have comment or be unexported
pkg/scaler/types.go:77:6: exported type ProbeDetails should have comment or be unexported
pkg/scaler/types.go:81:6: exported type DependantScaleDetails should have comment or be unexported

@rfranzke
Copy link
Member Author

rfranzke commented Jun 21, 2021

Do you plan to reuse them elsewhere?

Yes, as part of gardener/gardener#2754, the Helm charts will be eliminated in favor of Golang struct usages, and it would be great if the DWD config can be handled similarly.

Could you please address them

Could you recommend reasonable doc strings (maybe directly via GitHub suggestions)? I'm not too much into all this code.

Copy link
Collaborator

@amshuman-kr amshuman-kr left a comment

Choose a reason for hiding this comment

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

I have added the suggested comments for the now public types.

pkg/restarter/types.go Show resolved Hide resolved
pkg/restarter/types.go Show resolved Hide resolved
pkg/scaler/types.go Show resolved Hide resolved
pkg/scaler/types.go Show resolved Hide resolved
pkg/scaler/types.go Show resolved Hide resolved
pkg/scaler/types.go Show resolved Hide resolved
rfranzke and others added 4 commits June 21, 2021 13:37
Co-authored-by: Amshuman K R <amshuman.rao.karaya@sap.com>
Co-authored-by: Amshuman K R <amshuman.rao.karaya@sap.com>
Co-authored-by: Amshuman K R <amshuman.rao.karaya@sap.com>
Co-authored-by: Amshuman K R <amshuman.rao.karaya@sap.com>
rfranzke and others added 2 commits June 21, 2021 13:37
Co-authored-by: Amshuman K R <amshuman.rao.karaya@sap.com>
Co-authored-by: Amshuman K R <amshuman.rao.karaya@sap.com>
Copy link
Collaborator

@amshuman-kr amshuman-kr left a comment

Choose a reason for hiding this comment

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

/lgtm

@amshuman-kr amshuman-kr merged commit 2cd8f69 into gardener:master Jun 22, 2021
@rfranzke rfranzke deleted the enh/export branch June 22, 2021 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants