-
Notifications
You must be signed in to change notification settings - Fork 180
feat(conformance): add version for conformance test report. #1133
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
Conversation
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Hi @zetxqx. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/assign @robscott |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @zetxqx!
Thanks @zetxqx! /lgtm |
Thanks @zetxqx! /lgtm |
pkg/consts/consts.go
Outdated
limitations under the License. | ||
*/ | ||
|
||
package consts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shared offline with @zetxqx my concern about the name selection consts and it's location under pkg which may become a place where everybody put their non related consts, like a centralized place for putting all constants of the repo which I'm generally against.
we agreed to create a version/version.go
at the root level to specify versioning related consts (package version
).
for example like this project:
https://github.com/kubernetes/kops/blob/master/kops-version.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not related to this PR, but using version.go
will also allow us to define in this file CommitSHA
and BuildRef
vars which are currently located under /epp/pkg/metrics/metrics.go
(I don't see how is it related to metrics.go
).
gateway-api-inference-extension/pkg/epp/metrics/metrics.go
Lines 39 to 45 in 48966b8
var ( | |
// The git hash of the latest commit in the build. | |
CommitSHA string | |
// The build ref from the _PULL_BASE_REF from cloud build trigger. | |
BuildRef string | |
) |
I will push it in a follow up PR. (cc @kfswain)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! thanks @nirrozenbaum , renamed to version/version.go. Could you take another look?
cc: @robscott
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JeffLuoo wrote this, I believe, to emit the commitSHA to help give context to any logs emitted (so when debugging, you can look at the specific SHA & know what the codebase looked like at that point in time). I think same with the pull base. I believe that is the fork the build is based on. Jeff to confirm however.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I placed the var in metrics.go
for adding the metadata metric related to the IG https://github.com/kubernetes-sigs/gateway-api-inference-extension/blob/main/cmd/epp/runner/runner.go#L245. The metric tells you the build hash and version (usually tag) of the image.
Those two variables are passed in from the Dockerfile in go build
here: https://github.com/kubernetes-sigs/gateway-api-inference-extension/blob/main/Dockerfile#L25 where the variables are passed in from:
gateway-api-inference-extension/cloudbuild.yaml
Lines 12 to 15 in c46a7e7
- GIT_TAG=$_GIT_TAG | |
- EXTRA_TAG=$_PULL_BASE_REF | |
- DOCKER_BUILDX_CMD=/buildx-entrypoint | |
- GIT_COMMIT_SHA=$_PULL_BASE_SHA |
PULL_BASE_SHA
is a keyword that cloudbuild job will use to set the environment variable, check https://docs.prow.k8s.io/docs/jobs/ for environment variables. I used PULL_BASE_REF
and PULL_BASE_SHA
.
When you add the change, can you make sure the metric will still have the hash and build tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JeffLuoo sure!
thanks for the detailed response 👍
/lgtm Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nirrozenbaum, zetxqx 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 |
GatewayAPIInferenceExtensionVersion
to the conformance report.Example report now(the first line have the GatewayAPIInferenceExtensionVersion):