openservicemesh / osm

Open Service Mesh (OSM) is a lightweight, extensible, cloud native service mesh that allows users to uniformly manage, secure, and get out-of-the-box observability features for highly dynamic microservice environments.
https://openservicemesh.io/
Apache License 2.0
2.59k stars 277 forks source link

Move the required truncation of certificate expiration time to the GetExpiration method #5212

Closed steeling closed 1 year ago

steeling commented 2 years ago

Move truncation into GetExpiration so GetExpiration correctly returns the time with monotonic clock truncated

codecov-commenter commented 2 years ago

Codecov Report

Merging #5212 (f3b5815) into main (26080f9) will increase coverage by 0.18%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #5212      +/-   ##
==========================================
+ Coverage   66.94%   67.12%   +0.18%     
==========================================
  Files         200      200              
  Lines       16403    16442      +39     
==========================================
+ Hits        10981    11037      +56     
+ Misses       5369     5351      -18     
- Partials       53       54       +1     
Flag Coverage Δ
unittests 67.12% <100.00%> (+0.18%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/certificate/certificate.go 82.97% <100.00%> (ø)
pkg/certificate/manager.go 87.08% <100.00%> (+1.03%) :arrow_up:
pkg/debugger/certificate.go 89.74% <100.00%> (+3.69%) :arrow_up:
pkg/k8s/events/types.go 64.15% <0.00%> (-2.52%) :arrow_down:
pkg/envoy/generator/rds.go 74.41% <0.00%> (-1.67%) :arrow_down:
pkg/k8s/types.go 100.00% <0.00%> (ø)
pkg/k8s/client.go 80.70% <0.00%> (ø)
pkg/catalog/catalog.go 100.00% <0.00%> (ø)
pkg/certificate/providers/mrc.go 50.00% <0.00%> (ø)
pkg/envoy/generator/lds/builder.go 52.75% <0.00%> (ø)
... and 10 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

keithmattix commented 2 years ago

Looks good, but I'll approve when tests pass

jaellio commented 1 year ago

@steeling could you add a brief description to the PR? Thanks!