Repository navigation
fix(gateway): skip providers without an env block - #278
Merged
Merged
Conversation
inference-gateway-maintainer
Bot
requested a review
from a team
as a code owner
October 4, 2026 11:04
inference-gateway-releaser Bot
added a commit
that referenced
this pull request
Oct 4, 2026
## [0.27.1](v0.27.0...v0.27.1) (2026-10-04) ### ♻️ Improvements * bump go toolchain to 1.26.8 ([#282](#282)) ([949858a](949858a)) ### 🐛 Bug Fixes * **gateway:** pass server and metrics ports to container ([#279](#279)) ([d3e3915](d3e3915)) * **gateway:** skip providers without an env block ([#278](#278)) ([b069167](b069167)) ### 📚 Documentation * **agents:** add code readability guidelines ([#275](#275)) ([6b6a444](6b6a444)) * correct gateway auth and tracing claims ([#276](#276)) ([9f79f76](9f79f76)) * fix gateway label selector and orchestrator snippets ([#280](#280)) ([bb93ed2](bb93ed2)) * **readme:** document gateway spec.a2a support ([#277](#277)) ([aad725c](aad725c))
Contributor
|
🎉 This PR is included in version 0.27.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
updateProvidersSummarydereferenced the optionalProviderSpec.Envpointer unconditionally (range *p.Env), so any Gateway with a supported provider and noenvblock -- name: ollamabeing the obvious case - panicked on every reconcile. The panic happened inreconcileGatewayStatusafter the workload was already applied, so controller-runtime recovered it and requeued forever whilestatus.url,status.providerSummary,status.mcpServersandstatus.a2aAgentsstayed empty.A provider with no
envhas no Secret to check, so it is now skipped the same way a provider with an unresolvable secret is, and the rest of the status is written normally. One nil guard before the first dereference covers bothrange *p.Envloops. The other.Envreads in the controllers (gateway_controller.gocontainer env,agent_controller.go,orchestrator_controller.go) already nil-check, so nothing else needed changing.Changes
internal/controller/gateway_controller.go: skip providers whoseenvis unset inupdateProvidersSummary.internal/controller/gateway_controller_test.go: newGateway providers summaryspecs - an env-lessollamaprovider yields an empty summary instead of panicking, and an enabled provider whose Secret holds the API key is still listed.task test,task fmt,task vetandtask lintall pass (0 lint issues).no docs ticket: internal-only bug fix, no user-facing API or behavior change beyond no longer panicking.
Closes #272