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

Improve the annotations of some structs in pkg/api #2164

Merged
merged 1 commit into from
May 12, 2021
Merged

Improve the annotations of some structs in pkg/api #2164

merged 1 commit into from
May 12, 2021

Conversation

IsaacHe20
Copy link
Contributor

Fixed some annotations that violated the golang struct annotation specification.

@vmwclabot
Copy link

@heshengyuan1311, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

@vmwclabot
Copy link

@heshengyuan1311, your company's legal contact has approved your signed contributor license agreement. It will also be reviewed by VMware, but the merge can proceed.

tnqn
tnqn previously approved these changes May 11, 2021
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

Thanks @heshengyuan1311. Do you happen to have the link of "golang struct annotation specification" about this so we can reference to it when reviewing similar changes?

@codecov-commenter
Copy link

codecov-commenter commented May 11, 2021

Codecov Report

Merging #2164 (c5be5a1) into main (03fe6ee) will decrease coverage by 19.86%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2164       +/-   ##
===========================================
- Coverage   61.20%   41.33%   -19.87%     
===========================================
  Files         270      132      -138     
  Lines       20478    16539     -3939     
===========================================
- Hits        12533     6837     -5696     
- Misses       6646     9115     +2469     
+ Partials     1299      587      -712     
Flag Coverage Δ
kind-e2e-tests ?
unit-tests 41.33% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/agent/agent_linux.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/ovs/openflow/default.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/agent/config/node_config.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/apis/controlplane/helper.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/agent/cniserver/pod_configuration_linux.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/apis/controlplane/v1beta1/register.go 0.00% <0.00%> (-92.86%) ⬇️
pkg/ovs/openflow/logs.go 9.52% <0.00%> (-90.48%) ⬇️
pkg/apis/controlplane/register.go 0.00% <0.00%> (-90.00%) ⬇️
pkg/agent/nodeportlocal/k8s/annotations.go 0.00% <0.00%> (-83.88%) ⬇️
pkg/agent/client.go 0.00% <0.00%> (-77.42%) ⬇️
... and 226 more

@IsaacHe20
Copy link
Contributor Author

Thanks @heshengyuan1311. Do you happen to have the link of "golang struct annotation specification" about this so we can reference to it when reviewing similar changes?

Thanks for reviewing. I fix these annotations beacuse of the rule of godoc. https://blog.golang.org/godoc

antoninbas
antoninbas previously approved these changes May 11, 2021
Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

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

LGTM. I confirmed that the current documentation doesn't render properly because of the missing empty lines. I have also confirmed that K8s always leaves an empty line between code generation directive and actual type comments.

@antoninbas
Copy link
Contributor

/skip-all

@antoninbas
Copy link
Contributor

@heshengyuan1311 CI is failing with the following error:

=== Start resetting changes introduced by YEAR ===
=== pkg/controller/networkpolicy/testing/mock_networkpolicy.go is reset ===
=== pkg/apis/system/v1beta1/zz_generated.deepcopy.go is reset ===
=== pkg/agent/cniserver/ipam/testing/mock_ipam.go is reset ===
The generated code is not up-to-date
You can regenerate it with 'make codegen' and commit the changes
Error: Process completed with exit code 1.

Can you run make codegen and commit the changes?

@IsaacHe20 IsaacHe20 dismissed stale reviews from antoninbas and tnqn via 434e1e6 May 12, 2021 03:08
@IsaacHe20
Copy link
Contributor Author

IsaacHe20 commented May 12, 2021

Thanks @heshengyuan1311. Do you happen to have the link of "golang struct annotation specification" about this so we can reference to it when reviewing similar changes?

Thanks for reviewing,

@heshengyuan1311 CI is failing with the following error:

=== Start resetting changes introduced by YEAR ===
=== pkg/controller/networkpolicy/testing/mock_networkpolicy.go is reset ===
=== pkg/apis/system/v1beta1/zz_generated.deepcopy.go is reset ===
=== pkg/agent/cniserver/ipam/testing/mock_ipam.go is reset ===
The generated code is not up-to-date
You can regenerate it with 'make codegen' and commit the changes
Error: Process completed with exit code 1.

Can you run make codegen and commit the changes?

repushed the commit with codegen.

@antoninbas
Copy link
Contributor

/skip-all

Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

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

Thanks for regenerating the code - let's see if the CI job succeeds

Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

LGTM

@vmwclabot
Copy link

@heshengyuan1311, VMware has approved your signed contributor license agreement.

@tnqn tnqn merged commit 25f0ca3 into antrea-io:main May 12, 2021
heanlan pushed a commit to heanlan/antrea that referenced this pull request May 12, 2021
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.

5 participants