Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 12, 2025

Adds end-to-end test coverage for the Protocol Buffer client transport layer, mirroring the existing CoreV1ApiTest structure.

Changes

  • New test: ProtoClientTest.java in e2e/src/test/java/io/kubernetes/client/e2e/basic/
    • Tests namespace CRUD operations (create, list, get, delete) using protocol buffer encoding
    • Validates ObjectOrStatus response handling
    • Verifies protocol buffer message types (Namespace, NamespaceList, ObjectMeta)

Example Usage

ProtoClient protoClient = new ProtoClient(client);

Namespace namespace = Namespace.newBuilder()
    .setMetadata(ObjectMeta.newBuilder().setName("e2e-proto-test").build())
    .build();

ObjectOrStatus<Namespace> result = protoClient.create(
    namespace, "/api/v1/namespaces", "v1", "Namespace");

assertThat(result.object).isNotNull();
assertThat(result.status).isNull();

Test follows patterns from ProtoExample.java and uses the same testing conventions as other e2e tests in the basic package.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • groovy.jfrog.io
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.11/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.11/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.11 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.11/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/java/java org.codehaus.plexus.classworlds.launcher.Launcher spotless:check -Dspotless.check.skip=false -pl e2e (dns block)
  • repository.sonatype.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.11/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.11/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.11 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.11/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/java/java org.codehaus.plexus.classworlds.launcher.Launcher clean compile -DskipTests -q (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Protocol Buffer client needs e2e test support</issue_title>
<issue_description>Similar to https://github.com/kubernetes-client/java/blob/master/e2e/src/test/java/io/kubernetes/client/e2e/basic/CoreV1ApiTest.java we should add a test which uses protocol buffers for transport.

There is an example of how to use protocol buffers here:
https://github.com/kubernetes-client/java/blob/master/examples/examples-release-latest/src/main/java/io/kubernetes/client/examples/ProtoExample.java</issue_description>

<agent_instructions>Please add e2e tests for the protocol buffers client.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 12, 2025
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 12, 2025
Copilot AI changed the title [WIP] Add e2e test support for Protocol Buffer client Add e2e tests for Protocol Buffer client Nov 12, 2025
Copilot AI requested a review from brendandburns November 12, 2025 14:34
Copilot finished work on behalf of brendandburns November 12, 2025 14:34
@brendandburns
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Nov 12, 2025
Copy link
Contributor

@brendandburns brendandburns left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Thanks this is great!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 12, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, Copilot

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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 12, 2025
@brendandburns brendandburns removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Protocol Buffer client needs e2e test support

3 participants