navin
de3e9cc204
Fixing all deprecated use of sets.String ( #2915 )
...
* Fixing all deprecated use of sets.String
* review comments
* Fixing deprecated use of sets.String
2024-01-08 15:21:18 +00:00
Dave Protasowski
8532ae0645
update OWNERS files to use teams with active members ( #2672 )
...
* update OWNERS files to use teams with active members
* add eventing-wg leads as approvers to /apis
2023-02-06 16:58:45 +00:00
Dave Protasowski
44d1d7d978
Go1.19 changes ( #2631 )
...
* run goimports
* ignore linter errors for now
* fix boilerplate
2022-11-03 22:34:05 +00:00
Dave Protasowski
1ad02a5662
Drop error from changeset.Get signature ( #2549 )
...
* Drop error from changeset.Get signature
We simply return 'unknown'
* update mako/sidecar's use of changeset
2022-07-18 16:36:59 +00:00
Dave Protasowski
473ba31eb9
Bump min go version to 1.18 && read build info from embedded binary ( #2548 )
...
* Bump min go version to 1.18 & read build SHA from binary
* GitHub Commit ID is really a Git Revision
* update go.sum
* fix spelling
* Address PR feedback
- Use a sync.Once to prevent double parsing
- Support SHA256
- Allow non-SHA revision strings
* Don't include 'unknown' revision value in logs
2022-07-18 14:57:59 +00:00
Paul Schweigert
5569169b0c
update boilerplate date ( #2539 )
...
Signed-off-by: Paul S. Schweigert <paulschw@us.ibm.com>
2022-06-30 22:25:31 +00:00
Antoine Cotten
18f6995887
Log metrics/logging init messages at debug level ( #2522 )
2022-05-25 15:30:05 +00:00
Matt Moore
af54d7330b
Support fetching configs from `ctx`. ( #2505 )
...
* Support fetching configs from `ctx`.
This enables callers of `sharedmain` to infuse `ctx` with a `logging.Config` or `leaderelection.Config` instead of relying on the API server for it.
* Move context methods into appropriate packages, drop stutter
2022-05-03 15:25:57 +00:00
Pierangelo Di Pilato
a850b9e047
Use t.Setenv instead of os.Setenv in tests ( #2454 )
...
Go 1.17 introduced a new handy API for setting env vars scoped for
a single test so we can avoid the hard to read set and reset env
loops.
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
2022-03-10 10:00:48 -08:00
knative-automation
e61a20dd64
Update actions ( #2313 )
...
Signed-off-by: Knative Automation <automation@knative.team>
2021-10-15 12:26:13 -07:00
Markus Thömmes
a1bc850346
Print proper warning logs from API warnings ( #2168 )
2021-06-24 05:13:45 -07:00
Dave Protasowski
6484377731
update boilerplate date ( #2134 )
2021-05-28 13:21:29 -07:00
Evan Anderson
728bc4ad4e
Update OWNERS_ALIASES to match autogen in community ( #2078 )
2021-04-08 07:42:51 -07:00
Dave Protasowski
8cd47b5af3
drop excess logger properties ( #1993 )
2021-01-20 12:02:53 -08:00
Markus Thömmes
261c9b4624
Remove unnecessary intermediate loggers ( #1969 )
...
* Remove unnecessary intermediate loggers
* Make linter happy
* Collapse logging variable into if contexts
2020-12-16 08:27:58 -08:00
Victor Agababov
7e918163fc
Fix some nits around logging ( #1946 )
2020-12-07 14:50:40 -08:00
Ian Milligan
a536174bdf
Use zapdriver config as base zap config ( #1773 )
...
* Use zapdriver config as base zap config
Changes the encoding of the timestamp, severity, and message fields to
be parseable by Stackdriver.
* Wrap zap core with zapdriver core
Automatically adds labels and source location to log messages.
2020-12-03 11:31:09 -08:00
Dave Protasowski
c4c261429d
include a message when the logging config is bad ( #1892 )
...
* include a message when the logging config is bad
* tweak warning message
2020-11-03 20:51:04 -08:00
Markus Thömmes
565516e224
Add errorlint and fix all existing issues ( #1855 )
2020-10-29 01:14:35 -07:00
Matt Moore
b8a7aae928
Add a list of known-heavy things, check a few places. ( #1860 )
2020-10-27 16:38:34 -07:00
Victor Agababov
2fd5431265
Downstream is updated, to remove outdated methods ( #1856 )
2020-10-27 12:23:33 -07:00
Victor Agababov
5394608723
Add proper cased function to deprecate the old one ( #1848 )
...
* Add proper cased function to deprecate the old one
Json -> JSON
2 less linter errors!
* cmt
2020-10-26 14:18:41 -07:00
Markus Thömmes
e0e4ebada1
Remove NamespacedName logging helper ( #1836 )
2020-10-23 10:20:38 -07:00
Josh Soref
b39d5da935
Spelling ( #1797 )
...
* spelling: adopted
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: aliased
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: apierrs
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: assignment
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: available
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: coexistence
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: commit
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: conversions
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: creates
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: custom
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: determine
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: different
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: distribution
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: duplicate
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: editing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: endpoint
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: environment
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: generate
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: implementation
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: identified
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: ignore
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: indicates
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: interface
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: interleaved
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: labels
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: label
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: mimic
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: namespaced
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: necessary
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: organization
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: populatable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: prometheus
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: refer
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: reference
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: repetitive
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: response
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: something
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: specable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: spoofing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: synchronized
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: this
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: trailing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: unsupported
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: validation
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* chore: reviewdog go header boilerplate
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2020-10-18 14:22:57 -07:00
Victor Agababov
7bad843466
Enable golint and exclude some other generated or additional dirs ( #1783 )
...
* Enable golint and exclude some other generated or additional dirs
Also remove `test` ignore, since it's covered by path ignore rule.
* meh
* fixes
* more
* progressing
* further
* like a boss
2020-10-07 14:58:20 -07:00
Victor Agababov
a371418524
v2 ( #1754 )
2020-09-29 13:18:29 -07:00
Markus Thömmes
5fbbde31b3
Align linters with serving (enables stylecheck and asciicheck) ( #1738 )
2020-09-23 07:37:40 -07:00
Victor Agababov
8d478d55c0
Remove ClearAll from the codebase ( #1657 )
...
now that I've verified it does not exist in any of the repos that are of any importance
we can remove it :-)
2020-08-27 16:14:07 -07:00
Victor Agababov
7aa8743aaa
Some minor test coverage improvements and code flow improvements ( #1649 )
...
This way it's shorter and easier to read and also cover those super-important functions with
unit tests, since why not? :)
2020-08-24 15:46:47 -07:00
Victor Agababov
fef70cc261
Unexport some constants ( #1393 )
...
* fix the space issue
* merge shenanigans
* nit and tests
* Unexport some constants that don't seem to be used anywhere
2020-06-09 11:40:32 -07:00
Victor Agababov
874e3e0c13
Remove the junk file ( #1351 )
2020-05-25 14:10:48 -07:00
Victor Agababov
c18785f019
Fix the if order ( #1352 )
...
:shamecube:
2020-05-25 13:59:48 -07:00
Victor Agababov
1ceb875570
Fix \" escaping and other nits in the pkg ( #1339 )
2020-05-16 09:36:02 -07:00
Victor Agababov
f6cfa4c47c
Clean context.TODO in pkg and other minor nits ( #1337 )
...
- TODO is for migration, we know we want background there
- other nits
2020-05-15 10:58:02 -07:00
Victor Agababov
66f1d63f10
Fix logging around pkg ( #1310 )
...
- use more performant functions (mostly remove formatters were possible)
- move zap.Error() to the call site, rather than creating a new sugared logger with a key attached (not cheap)
- fix *w usages where the key was not provided.
2020-05-07 15:00:45 -07:00
Victor Agababov
2581370e4a
Add custom object encoders for the set of string and namespaced name ( #1309 )
...
* Add custom object encoders for the set of string and namespaced name
In future we might add more (endpoints is a really good candidate)
* switch NN logging
* usage
* nn without ns
* nit
2020-05-06 18:13:44 -07:00
Victor Agababov
0eed424fa4
Cleanup the logging CM handling. ( #1223 )
...
Raise test coverage, improve code flow, etc.
2020-04-14 16:31:46 -07:00
Victor Agababov
2dab1c49bd
Normalize CM owners across CM directories ( #1210 )
...
Make sure they're uniform more or less.
Also add myself for CM approvers, given I've rewrote most of them recently.
2020-04-09 15:44:04 -07:00
Matt Moore
9b3ea736c6
golang format tools ( #1102 )
...
Produced via:
`gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)`
`goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party)`
/assign n3wscott
/cc n3wscott
2020-02-18 06:47:59 -08:00
savitaashture
0fcde3c27d
Modify TestLogger util function to support for Benchmark testing ( #1074 )
...
* Modify TestLogger util function to support for Benchmark type
* fix review comment
* fix review comment
2020-02-17 06:52:09 -08:00
Scott Nichols
298f22bea6
update boilerplate to use 2020 ( #979 )
2020-01-07 16:04:51 -08:00
coryrc
d3841ea2c3
Remove ugly constant string being printed in every log. ( #878 )
...
In every log we get the ugly string printed:
2019-11-13T08:44:42.421-0800 info logging/config.go:50
Successfully created the logger. {"knative.dev/jsonconfig": "{\n\t
\"level\": \"debug\",\n\t \"encoding\": \"console\",\n\t
\"outputPaths\": [\"stdout\"],\n\t \"errorOutputPaths\":
[\"stderr\"],\n\t \"encoderConfig\": {\n\t \"timeKey\":
\"ts\",\n\t \"messageKey\": \"message\",\n\t \"levelKey\":
\"level\",\n\t \"nameKey\": \"logger\",\n\t \"callerKey\":
\"caller\",\n\t \"messageKey\": \"msg\",\n\t \"stacktraceKey\":
\"stacktrace\",\n\t \"lineEnding\": \"\",\n\t \"levelEncoder\":
\"\",\n\t \"timeEncoder\": \"iso8601\",\n\t \"durationEncoder\":
\"\",\n\t \"callerEncoder\": \"\"\n\t }\n\t}"}
It's all a constant (see test/logging/logging.go:newLogger), except
"level", which is then printed immediately afterward. So just remove
printing this string.
2019-11-13 19:30:28 -08:00
Markus Thömmes
56c2594e4f
Assorted linting fixes. ( #840 )
...
* Remove unused code.
* Remove unneeded loops.
* Remove unneeded Printf calls.
* Use time.Since instead of time.Now().Sub.
* Remove unused values.
* Rename error variable according to conventions.
* Return error last.
* Simplify array allocations.
* Remove leaky ticker.
* Remove Yoda conditions.
* Remove deprecated function to talk to GKE.
* Remove dot import.
* Remove empty critical section and replace with a channel operation.
* Add linter directives to explicitly state wanted weirdness.
* Update deps.
* Fix broken line.
2019-11-01 12:49:12 -07:00
Antoine Cotten
ec5f5148b8
Do not override log level if component is undefined in logging config ( #780 )
...
* Do not override log level if component undefined
* review(vagababov): Remove empty line
2019-10-20 14:14:22 -07:00
Tara Gu
06918f4c69
Remove caching in test logger setup ( #661 )
...
* Remove caching in test logger setup
* Revert "Remove caching in test logger setup"
This reverts commit e3c5349e3c .
* Don't create new logger in SetupFakeContextWithCancel
* Revert "Don't create new logger in SetupFakeContextWithCancel"
This reverts commit 2d57ccf028 .
* Remove test logger cache, and leave an empty shell for ClearAll()
2019-09-20 10:42:06 -07:00
Markus Thömmes
7b725e1ae6
Use a nil map instead of an empty map for the same effect. ( #695 )
2019-09-19 13:00:00 -07:00
mattmoor-sockpuppet
a07e7def0a
golang format tools ( #659 )
...
Produced via:
`gofmt -s -w $(find -path './vendor' -prune -o -type f -name '*.go' -print))`
`goimports -w $(find -name '*.go' | grep -v vendor)`
/assign mattmoor
2019-09-11 07:12:29 -07:00
Ignacio Cano
c56cedc7e7
Serializing/Deserializing Logging and Metrics configs ( #656 )
...
* source stats reporter... should be used by well-behaved sources
* public fields
* moving serialization/deserialization of metrics and logging maps to pkg
* nits
* adding UT
* same order
* updates
* sock-puppet
* unregistration problem?
* removing base64 encoding
* removing TODO
* comments after review
* removing the other constants
2019-09-10 12:36:29 -07:00
Andrea Frittoli
554d86c2d5
Reducing the log level for github commit to info ( #506 )
...
The logger by default attempts to fetch the commit id from kodata.
When that fails log a message with info rather than warning, to
avoid creating spurious warning message when starting applications.
Fixes #505
Signed-off-by: Andrea Frittoli <andrea.frittoli@uk.ibm.com>
2019-08-28 12:58:41 -07:00
Matt Moore
222dd25986
Migrate pkg to use the knative.dev/pkg import path ( #489 )
...
* Manual changes.
* scripted changes.
2019-06-26 13:02:06 -07:00