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

chore(logs): no active endpoints is logged at debug instead of warning level #4161

Merged
merged 1 commit into from
Jun 13, 2023

Conversation

programmer04
Copy link
Member

@programmer04 programmer04 commented Jun 12, 2023

What this PR does / why we need it:

The message no active endpoints is logged often at least once during normal operation due to eventual consistency of the whole K8s ecosystem.

2023-06-12T12:51:30.065792925Z stderr F time="2023-06-12T12:51:30Z" level=info msg="successfully synced configuration to Kong" update_strategy=InMemory url="https://10.244.0.7:8444"
2023-06-12T12:51:30.070302425Z stderr F time="2023-06-12T12:51:30Z" level=info msg="successfully synced configuration to Kong" update_strategy=InMemory url="https://10.244.0.6:8444"
2023-06-12T12:51:30.877209092Z stderr F time="2023-06-12T12:51:30Z" level=info msg="successfully synced configuration to Konnect" update_strategy="WithBackoff(DBMode)" url="https://us.kic.api.konghq.tech/kic/api/runtime_groups/ea93254c-5c46-4b2d-b43f-cebf606fc51f"
2023-06-12T12:51:38.937834596Z stderr F time="2023-06-12T12:51:38Z" level=warning msg="no active endpoints" service_name=echo service_namespace=default service_port="&ServicePort{Name:,Protocol:TCP,Port:1027,TargetPort:{0 1027 },NodePort:0,AppProtocol:nil,}"
2023-06-12T12:51:38.937851304Z stderr F time="2023-06-12T12:51:38Z" level=info msg="no targets could be found for kubernetes service default/echo" service_name=default.echo.echo.1027
2023-06-12T12:51:38.937866596Z stderr F time="2023-06-12T12:51:38Z" level=info msg="no targets found to create upstream" service_name=default.echo.echo.1027
2023-06-12T12:51:39.084362096Z stderr F time="2023-06-12T12:51:39Z" level=info msg="successfully synced configuration to Kong" update_strategy=InMemory url="https://10.244.0.7:8444"
2023-06-12T12:51:39.090115638Z stderr F time="2023-06-12T12:51:39Z" level=info msg="successfully synced configuration to Kong" update_strategy=InMemory url="https://10.244.0.6:8444"
2023-06-12T12:51:40.342402221Z stderr F time="2023-06-12T12:51:40Z" level=info msg="successfully synced configuration to Konnect" update_strategy="WithBackoff(DBMode)" url="https://us.kic.api.konghq.tech/kic/api/runtime_groups/ea93254c-5c46-4b2d-b43f-cebf606fc51f"
2023-06-12T12:51:42.061711514Z stderr F time="2023-06-12T12:51:42Z" level=info msg="successfully synced configuration to Kong" update_strategy=InMemory url="https://10.244.0.6:8444"
2023-06-12T12:51:42.062431264Z stderr F time="2023-06-12T12:51:42Z" level=info msg="successfully synced configuration to Kong" update_strategy=InMemory url="https://10.244.0.7:8444"

Showing it in logs at a warning level may be misleading for end users. Since it's normal behavior. This PR changes the logging level to debug for this message.

@programmer04 programmer04 added the area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. label Jun 12, 2023
@programmer04 programmer04 added this to the KIC v2.11.0 milestone Jun 12, 2023
@programmer04 programmer04 self-assigned this Jun 12, 2023
@programmer04 programmer04 marked this pull request as ready for review June 12, 2023 13:11
@programmer04 programmer04 requested a review from a team as a code owner June 12, 2023 13:11
@programmer04 programmer04 enabled auto-merge (squash) June 12, 2023 13:11
@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Patch coverage: 100.0% and no project coverage change.

Comparison is base (6a17e9a) 60.5% compared to head (d7c4139) 60.6%.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #4161   +/-   ##
=====================================
  Coverage   60.5%   60.6%           
=====================================
  Files        150     150           
  Lines      16843   16843           
=====================================
+ Hits       10204   10214   +10     
+ Misses      5995    5984   -11     
- Partials     644     645    +1     
Impacted Files Coverage Δ
internal/dataplane/parser/parser.go 75.4% <100.0%> (-0.8%) ⬇️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@programmer04 programmer04 merged commit 611f3c6 into main Jun 13, 2023
@programmer04 programmer04 deleted the impr-log branch June 13, 2023 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants