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

Get Windows Process time correctly #97491

Merged

Conversation

jsturtevant
Copy link
Contributor

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
The process_start_time_seconds gauge falls back to time.now() but we get an error on Windows. This information is available via the windows golang.org/x/sys/windows package we can get an accurate time.

Which issue(s) this PR fixes:

Fixes #97490

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Process start time on Windows now uses current process information

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Dec 23, 2020
@jsturtevant
Copy link
Contributor Author

/sig windows

@k8s-ci-robot k8s-ci-robot added sig/windows Categorizes an issue or PR as relevant to SIG Windows. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 23, 2020
@k8s-ci-robot k8s-ci-robot added area/dependency Issues or PRs related to dependency changes sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. labels Dec 23, 2020
@jsturtevant
Copy link
Contributor Author

/test pull-kubernetes-e2e-azure-disk-windows

@ddebroy
Copy link
Member

ddebroy commented Dec 28, 2020

@jsturtevant since this targets staging, the change needs to be applied to the files in the staged repo: https://github.com/kubernetes/component-base/blob/master/metrics/processstarttime.go. The staging jobs will then automatically copy it in from https://github.com/kubernetes/component-base

@jsturtevant
Copy link
Contributor Author

from that repository (https://github.com/kubernetes/component-base#where-does-it-come-from):

This repository is synced from https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/component-base. Code changes are made in that location, merged into k8s.io/kubernetes and later synced here.
Things you should NOT do
Directly modify any files in this repo. Those are driven from k8s.io/kubernetes/staging/src/k8s.io/component-base.

@jsturtevant
Copy link
Contributor Author

did something change?

@ddebroy
Copy link
Member

ddebroy commented Dec 29, 2020

You are right! I had the auto publishing flow reversed. So please ignore the above comment.

@ddebroy
Copy link
Member

ddebroy commented Dec 29, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 29, 2020
@marosset
Copy link
Contributor

marosset commented Jan 4, 2021

/test pull-kubernetes-e2e-aks-engine-azure-windows
/test pull-kubernetes-e2e-aks-engine-windows-contianerd

@marosset
Copy link
Contributor

marosset commented Jan 4, 2021

/milestone v1.21

@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Jan 4, 2021
@marosset
Copy link
Contributor

marosset commented Jan 5, 2021

/retest

@fedebongio
Copy link
Contributor

/remove-sig api-machinery

@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Mar 3, 2021
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/apiserver area/cloudprovider area/kubectl sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 3, 2021
@jsturtevant
Copy link
Contributor Author

something went wrong with the rebase and removal of bazel. Got a ci error that said to run hack/update-vendor.sh but the outcome doesn't look right 27a8912

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 3, 2021
@jsturtevant
Copy link
Contributor Author

/retest

1 similar comment
@jsturtevant
Copy link
Contributor Author

/retest

@kcmartin
Copy link

kcmartin commented Mar 5, 2021

Hello! I am from the Bug Triage team! Friendly reminder that code freeze is starting March 9th, 2021 (less than 1 week from now). We want to ensure that each PR has a chance to be merged before code freeze.

As the PR is tagged for 1.21, is it still planned for this release?

@jsturtevant
Copy link
Contributor Author

jsturtevant commented Mar 5, 2021

Yes, just waiting for approval. Had LGTM but needed to rebase due to bazel being removed.

the azure disk is a flake #98084 and #98492 but not blocking

/test pull-kubernetes-e2e-azure-disk-windows

/cc @ehashman mtaufen

@stealthybox
Copy link
Member

Thanks for this cleanup

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 5, 2021
@stealthybox
Copy link
Member

/test pull-kubernetes-e2e-azure-disk-windows

@lavalamp
Copy link
Member

lavalamp commented Mar 5, 2021

/approve

I'd like to see a test but my ideas for testing this aren't very good

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jsturtevant, lavalamp

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 Mar 5, 2021
@k8s-ci-robot k8s-ci-robot merged commit ecdbcd8 into kubernetes:master Mar 6, 2021
SIG-Windows automation moved this from Reviewed - Needs Approval From Other SIGs to Done (v1.21) Mar 6, 2021
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/apiserver area/cloudprovider area/dependency Issues or PRs related to dependency changes area/kubectl cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/windows Categorizes an issue or PR as relevant to SIG Windows. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Process start time metric errors on Windows with "could not read /proc"