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

Introduce a request counter to the auditor #359

Merged
merged 1 commit into from
Jul 21, 2021

Conversation

tylerferrara
Copy link
Contributor

@tylerferrara tylerferrara commented Jul 21, 2021

What type of PR is this?

/kind feature

What this PR does / why we need it:

This change creates a simple request counter, able to concurrently keep track of all HTTP requests made to GCR. The counter is only enabled when the user passes the --verbose flag. In the future, this counter will be logged to gain visibility in the network performance of the auditor.

Supersedes #356

Which issue(s) this PR fixes:

Partially satisfies #358

Special notes for your reviewer:

The auditor does not yet call Increment() to add to the counter. This would perpetually increase the value of the counter if enabled. Once the concurrent logger is implemented (part of #358), which resets the counter every 10min, will the auditor call Increment().

Less importantly, this package is made specifically for the auditor, it can just as easily be used for other commands, like cip run --snapshot.

Does this PR introduce a user-facing change?

NONE

Triggering request counter for the auditor when --verbose flag is present.

cc: @listx @amwat @justaugustus @kubernetes-sigs/release-engineering

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 21, 2021
@k8s-ci-robot k8s-ci-robot added area/artifacts Issues or PRs related to the hosting of release artifacts for subprojects area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. wg/k8s-infra size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 21, 2021
This was referenced Jul 21, 2021
@tylerferrara tylerferrara force-pushed the counter branch 2 times, most recently from bb0e24a to 7a2a632 Compare July 21, 2021 19:11
legacy/querycounter/querycounter.go Outdated Show resolved Hide resolved
legacy/cli/audit.go Outdated Show resolved Hide resolved
legacy/cli/audit.go Outdated Show resolved Hide resolved
legacy/querycounter/querycounter.go Outdated Show resolved Hide resolved
legacy/querycounter/querycounter.go Outdated Show resolved Hide resolved
legacy/querycounter/querycounter.go Outdated Show resolved Hide resolved
legacy/querycounter/querycounter.go Outdated Show resolved Hide resolved
Copy link
Contributor Author

@tylerferrara tylerferrara left a comment

Choose a reason for hiding this comment

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

Replaced all mention of "query" counting with "request" counting.

@tylerferrara tylerferrara changed the title Introduce a query counter to the auditor Introduce a request counter to the auditor Jul 21, 2021
@listx
Copy link
Contributor

listx commented Jul 21, 2021

Thanks!

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: listx, tylerferrara

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 Jul 21, 2021
@k8s-ci-robot k8s-ci-robot merged commit 80d93e4 into kubernetes-sigs:master Jul 21, 2021
tylerferrara pushed a commit to tylerferrara/k8s-container-image-promoter that referenced this pull request Jul 21, 2021
Introduce a request counter to the auditor
tylerferrara pushed a commit to tylerferrara/k8s-container-image-promoter that referenced this pull request Jul 22, 2021
Introduce a request counter to the auditor
tylerferrara pushed a commit to tylerferrara/k8s-container-image-promoter that referenced this pull request Jul 22, 2021
Introduce a request counter to the auditor
tylerferrara pushed a commit to tylerferrara/k8s-container-image-promoter that referenced this pull request Jul 22, 2021
Introduce a request counter to the auditor
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. area/artifacts Issues or PRs related to the hosting of release artifacts for subprojects area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. 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.

3 participants