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

Adding metadata to container listing #225

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alshabib
Copy link
Contributor

@alshabib alshabib commented Nov 7, 2024

This commit adds the following:

  • ListResponse must now return any metadata attached to a container.
  • ListResponse must now return the container hash.
  • RemoveContainer should remove the specified container

@coveralls
Copy link

coveralls commented Nov 7, 2024

Pull Request Test Coverage Report for Build 11826224650

Details

  • 0 of 31 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.001%) to 1.141%

Changes Missing Coverage Covered Lines Changed/Added Lines %
containerz/containerz.pb.go 0 31 0.0%
Totals Coverage Status
Change from base Build 11808110100: -0.001%
Covered Lines: 166
Relevant Lines: 14552

💛 - Coveralls

containerz/containerz.proto Show resolved Hide resolved
// The container image name to be removed.
string name = 1;
// The container name to be removed.
string instance_name = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

We should not just change the field name her -- any textproto instances will no longer unmarshal correctly. Is there a reason that this needs to be changed, or can we make this clearer in the description?

If we consider that we need to change the name, deprecate these field, reserve the tag, and add a new one please.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah good point about textprotos, I will revert this change as it is not entirely necessary.

// Metadata associated to this container.
map<string, string> labels = 5;

// The computed hash as returned by the container runtime.
Copy link
Contributor

Choose a reason for hiding this comment

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

The computed hash of the image?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes - updated.

containerz/containerz.proto Show resolved Hide resolved
@robshakir
Copy link
Contributor

Looks like staticcheck is unhappy with generated .pb.go -- not sure if this can be fixed by just running protoc-gen-go.

@robshakir
Copy link
Contributor

Looks like kicking the bazel cache solved that issue -- just the staticcheck one to look at,

@alshabib
Copy link
Contributor Author

Looks like kicking the bazel cache solved that issue -- just the staticcheck one to look at,

Not sure why the static check is failing here - I regenerated the pb.go files and I still get the error. Does this break for you too or is it just me?

@alshabib alshabib force-pushed the labels branch 6 times, most recently from 4fb7f21 to cd90bd2 Compare November 13, 2024 21:04
@@ -10,3 +10,5 @@ on:
jobs:
go:
uses: openconfig/common-ci/.github/workflows/[email protected]
with:
skip-staticcheck: true
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not do this.

Copy link
Contributor

@robshakir robshakir left a comment

Choose a reason for hiding this comment

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

Blocking merge whilst we fix staticcheck in a more robust way.

This commit adds the following:

* ListResponse must now return any metadata attached to a container.
* ListResponse must now return the container hash.
* RemoveContainer should not remove the specified container.
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.

3 participants