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

config: validate log levels #4367

Merged
merged 3 commits into from Jul 17, 2023
Merged

config: validate log levels #4367

merged 3 commits into from Jul 17, 2023

Conversation

calebdoxsey
Copy link
Contributor

Summary

Validate the log_level and proxy_log_level options to prevent envoy crashing on invalid values.

The supported log levels are the superset of all the know log levels from our documentation, envoy and zerolog, because this option was previously unconstrained, so this should not be a breaking change.

Related issues

Checklist

  • reference any related issues
  • updated docs
  • updated unit tests
  • updated UPGRADING.md
  • add appropriate tag (improvement / bug / etc)
  • ready for review

@calebdoxsey calebdoxsey added bug Something isn't working backport 0-22-0 labels Jul 17, 2023
@calebdoxsey calebdoxsey requested a review from a team as a code owner July 17, 2023 20:59
@coveralls
Copy link

coveralls commented Jul 17, 2023

Coverage Status

coverage: 63.359% (-0.1%) from 63.478% when pulling 09574e0 on cdoxsey/validate-log-levels into a138859 on main.

Copy link
Contributor

@kenjenkins kenjenkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I like the idea of introducing an explicit type for the log level.

config/log.go Outdated Show resolved Hide resolved
config/log_level.go Show resolved Hide resolved
config/log_level.go Outdated Show resolved Hide resolved
@calebdoxsey calebdoxsey merged commit 78e7a3e into main Jul 17, 2023
9 checks passed
@calebdoxsey calebdoxsey deleted the cdoxsey/validate-log-levels branch July 17, 2023 22:41
@backport-actions-token
Copy link

The backport to 0-22-0 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-0-22-0 0-22-0
# Navigate to the new working tree
cd .worktrees/backport-0-22-0
# Create a new branch
git switch --create backport-4367-to-0-22-0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick --mainline 1 78e7a3e7d0e8d031995a54f1821daca071a8a685
# Push it to GitHub
git push --set-upstream origin backport-4367-to-0-22-0
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-0-22-0

Then, create a pull request where the base branch is 0-22-0 and the compare/head branch is backport-4367-to-0-22-0.

@calebdoxsey calebdoxsey mentioned this pull request Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 0-22-0 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants