Skip to content

Conversation

@tataruty
Copy link
Contributor

@tataruty tataruty commented Nov 11, 2025

Proposed changes

Problem:
We have some inconsistent messages in status conditions of resources.

(below, we use ConditionType/Status/Reason notation)

A few examples:
"The route is accepted" for HTTPRoute Accepted/True/Accepted . However, we have "GatewayClass is accepted" for GatewayClass Accepted/True/Accepted.
"unsupported value" for Listener Accepted/False/UnsupportedValue. Note that in most other messages, first letter is capitalized.
"invalid backendTLSPolicy" for BackendTLSPolicy Accepted/False/Invalid. Note: first letter is not capitalized, backendTLSPolicy is spelled differently from other similar places. Needed "BackendTLSPolicy"
Acceptance criteria:

Come up with consistent style
Capture rules if necessary
Bring messages with accordance to the style

Solution:
Decided to use next format:

  1. Start with The if can be
  2. Second word make capitalized as it is used everywhere in description for all: Listener, Gateway, GatewayClass, InferencePool and even Route
  3. Replace split to combined, if there is both used, like inference pool => InferencePool.
  4. Example: "The Gateway is invalid"

Testing: Unit tests.

Please focus on (optional):
There is one case when Condition message is built as an error and since error cannot be capitalized, added linter exception for that line

Closes #1809

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

NONE

@tataruty tataruty requested a review from a team as a code owner November 11, 2025 12:13
@github-actions github-actions bot added the chore Pull requests for routine tasks label Nov 11, 2025
@codecov
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

❌ Patch coverage is 53.84615% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.09%. Comparing base (ec97d7a) to head (b2bb2fc).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/controller/state/conditions/conditions.go 6.25% 30 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4253      +/-   ##
==========================================
- Coverage   86.15%   86.09%   -0.06%     
==========================================
  Files         131      131              
  Lines       14196    14205       +9     
  Branches       35       35              
==========================================
  Hits        12230    12230              
- Misses       1764     1769       +5     
- Partials      202      206       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tataruty tataruty force-pushed the chore/status_condition_messages_consistency branch 2 times, most recently from ef756e8 to ec32a94 Compare November 11, 2025 16:29
@tataruty tataruty force-pushed the chore/status_condition_messages_consistency branch from ec32a94 to 938b93e Compare November 11, 2025 19:25
@tataruty tataruty merged commit 9d2bf35 into main Nov 11, 2025
61 of 62 checks passed
@tataruty tataruty deleted the chore/status_condition_messages_consistency branch November 11, 2025 20:26
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in NGINX Gateway Fabric Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Pull requests for routine tasks

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Bring consistency into status condition messages

4 participants