Tim Hockin
2e2ae029c3
Fix instrumentation tests
...
1) Fail if we can't read critical env vars
2) Don't rely on KUBE_ROOT env var when `go list` works
3) Don't rely on GOOS env var when `go env` works
4) Don't quietly ignore "can't read" errors
Once we stop ignoring errors, some tests fail for real (and should
always have failed).
The "Imported k8s.io/staging constant" test seems to not be allowed at
all anymore. Han said to nix it and he'd look async.
Oversall this test is dodgy. You REALLY can't glue strings together and
expect valid Go module paths. We should consider a deeper rework.
2024-02-29 22:07:41 -08:00
Han Kang
44f1c4dd94
fix duplicate metrics issue
2023-06-29 12:30:30 -07:00
Han Kang
1e99f54bb6
adjust sizes and documentation
...
Change-Id: Icd89c0c5bd6fbfb616255132db602b4db5ee2fe9
2022-10-25 16:32:55 -04:00
Han Kang
325f09045f
add automated documentation generation from our static analysis pipeline
...
Change-Id: I66a0b4fd836ad3b51873517f16eb5a73b05bf329
2022-10-25 14:44:09 -04:00
ahrtr
fe95aa614c
io/ioutil has already been deprecated in golang 1.16, so replace all ioutil with io and os
2022-02-03 05:32:12 +08:00
Pat Christopher
f720c4fd44
hack/verify fixes
2021-07-28 19:26:44 -07:00
Pat Christopher
4549573a44
minor cleanups
2021-07-27 18:39:33 -07:00
Pat Christopher
169583bf4e
tests for path resolver, add KUBE_ROOT to both top level func calls
2021-07-14 20:35:49 -07:00
Pat Christopher
e75f3fb563
add happy path tests for two types of imports
2021-07-13 20:08:13 -07:00
Pat Christopher
bde2ef2a1a
review comments
2021-07-13 19:02:23 -07:00
Pat Christopher
ef3c344868
seems to work, needs tests and a lot of cleanup
2021-07-12 20:28:10 -07:00
Han Kang
c3f550f3cb
fix arguments too long error
2021-02-08 11:55:25 -08:00
Marek Siarkowicz
4dd546cf2c
Allow usage of consts and variables for stable metrics in static analysis
2019-11-08 09:41:59 +01:00
Marek Siarkowicz
c62da00c56
Pass list of files through stdin to avoid hitting ARG_MAX on some environments
2019-10-25 18:52:23 +02:00
Marek Siarkowicz
53fc6f9b58
Finish implementation of stable metrics static analysis
...
Handle "DeprecatedVersion" field
Fix kube metrics framework path
Implement handling prometheus util functions for generating buckets
2019-08-21 23:46:36 +02:00
Marek Siarkowicz
a5377a684c
Implement stable metric validation and verification
...
Based on KEP:
https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/20190605-metrics-validation-and-verification.md
Add //test/instrumentation:stable_metric_test that compares metrics
in source code to those available in
"test/instrumentation/testdata/stable-metrics-list.yaml".
2019-08-12 12:01:35 +02:00
Marek Siarkowicz
0260d4f287
Setup directories for Metrics validation and verification KEP
...
KEP link: https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/20190605-metrics-validation-and-verification.md
2019-08-06 15:11:39 +02:00