Skip to content

Config options fix#2321

Merged
k8s-ci-robot merged 3 commits intokubernetes-sigs:mainfrom
shmuelk:config-options-fix
Feb 12, 2026
Merged

Config options fix#2321
k8s-ci-robot merged 3 commits intokubernetes-sigs:mainfrom
shmuelk:config-options-fix

Conversation

@shmuelk
Copy link
Copy Markdown
Contributor

@shmuelk shmuelk commented Feb 12, 2026

What type of PR is this?
/kind bug

What this PR does / why we need it:
A textual configuration is required by the EPP to run.

If neither the config-text nor the config-file options are specified, the EPP crashes with a nil pointer error.

This PR adds to the options validation code a check that one of the config-text or config-file command line arguments has been specified.

In addition this PR adds a very simple log setup for the initial log messages issued before the command line arguments parse and validate correctly. Without this, no error messages show up in the EPP's stdout. See https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/log#hdr-The_Log_Handle for more details.

Which issue(s) this PR fixes:
Fixes #2297

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 12, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Feb 12, 2026

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit 62ae6a6
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/698da7d82d0d56000858f22c
😎 Deploy Preview https://deploy-preview-2321--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 12, 2026
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 12, 2026
}
}

if opts.ConfigText == "" && opts.ConfigFile == "" {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Q: is it (or should it be) possible to run EPP without a configuration file? There are runner options that set config directly in code (With...()). Sould the validation also check the configuration pointers on the runner?

Copy link
Copy Markdown
Contributor

@ahg-g ahg-g Feb 12, 2026

Choose a reason for hiding this comment

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

Ideally we should have a default configuration. I think in general our config defaulting, especially the way individual plugins config defaulting is done needs re-work.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

practically atm we provide default plugins for certain extension points.
we don't provide default configuration if non was specified.
as an immediate fix for the segfault this looks good from my side.
longer term I agree default configuration would be a nicer solution.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The current With...() functions of the runner do not set enough configuration related stuff.

When the datalayer goes production, there will be more work done.

Copy link
Copy Markdown
Contributor

@nirrozenbaum nirrozenbaum left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

holding in case @elevran or @ahg-g have more comments.
if not please unhold.
/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 12, 2026
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 12, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nirrozenbaum, shmuelk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 12, 2026
@ahg-g
Copy link
Copy Markdown
Contributor

ahg-g commented Feb 12, 2026

/lgtm

@ahg-g
Copy link
Copy Markdown
Contributor

ahg-g commented Feb 12, 2026

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 12, 2026
@k8s-ci-robot k8s-ci-robot merged commit 751a0ad into kubernetes-sigs:main Feb 12, 2026
11 checks passed
@shmuelk
Copy link
Copy Markdown
Contributor Author

shmuelk commented Feb 12, 2026

I have created issue #2324 to discuss and track the adding of a default configuration for the EPP.

@kfswain
Copy link
Copy Markdown
Collaborator

kfswain commented Feb 13, 2026

/cherrypick release-1.3

@k8s-infra-cherrypick-robot
Copy link
Copy Markdown

@kfswain: #2321 failed to apply on top of branch "release-1.3":

Applying: Added check that one of confi-text or config-file is specified
Applying: Added dummy config-file argument to get tests to pass
Applying: Add a very basic logger to log startup messages in case of errors
Using index info to reconstruct a base tree...
M	cmd/epp/runner/runner.go
A	pkg/common/observability/logging/logger.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/epp/util/logging/logger.go
CONFLICT (content): Merge conflict in pkg/epp/util/logging/logger.go
Auto-merging cmd/epp/runner/runner.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0003 Add a very basic logger to log startup messages in case of errors

Details

In response to this:

/cherrypick release-1.3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

kfswain pushed a commit that referenced this pull request Feb 14, 2026
* Added check that one of confi-text or config-file is specified

Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>

* Added dummy config-file argument to get tests to pass

Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>

* Add a very basic logger to log startup messages in case of errors

Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>

---------

Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
RyanRosario pushed a commit to RyanRosario/gateway-api-inference-extension that referenced this pull request Mar 9, 2026
* Added check that one of confi-text or config-file is specified

Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>

* Added dummy config-file argument to get tests to pass

Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>

* Add a very basic logger to log startup messages in case of errors

Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>

---------

Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Segmentation fault when config file or config text is not configured

7 participants