GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — warn on extraneous keys used in func.yaml by gauron99 · Pull Request #3611 · knative/func

Conversation

@gauron99

@gauron99 gauron99 commented Apr 15, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

adding a warning for extraneous keys

❯ func run
Warning (unknown fields will be ignored):
 'func.yaml' is not valid:
  line 7: unknown field "junk"
  line 8: unknown field "builder"
  line 9: unknown field "tralala"

when we have the latest (migrated) spec present, we do a strict Unmarshal (which errors on extraneous keys) and we print a warning like above.
Note that Im adding the "once" because NewFunction is actually called few times throughout a lets say "func deploy" call.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@knative-prow

knative-prow Bot commented Apr 15, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow knative-prow Bot added the do-not-merge/work-in-progress 🤖 PR should not merge because it is a work in progress. label Apr 15, 2026
@gauron99
gauron99 marked this pull request as ready for review April 15, 2026 17:37
@knative-prow knative-prow Bot added approved 🤖 PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/work-in-progress 🤖 PR should not merge because it is a work in progress. labels Apr 15, 2026
@knative-prow
knative-prow Bot requested review from dsimansk and jrangelramos April 15, 2026 17:37
@knative-prow knative-prow Bot added the size/S 🤖 PR changes 10-29 lines, ignoring generated files. label Apr 15, 2026
@codecov

codecov Bot commented Apr 15, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.30%. Comparing base (76c33b2) to head (b2d0a34).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3611      +/-   ##
==========================================
+ Coverage   56.27%   56.30%   +0.03%     
==========================================
  Files         180      180              
  Lines       20522    20549      +27     
==========================================
+ Hits        11548    11571      +23     
- Misses       7773     7777       +4     
  Partials     1201     1201              
Flag Coverage Δ
e2e 36.22% <70.00%> (+0.02%) ⬆️
e2e go 32.86% <66.66%> (+0.01%) ⬆️
e2e node 28.62% <66.66%> (+0.03%) ⬆️
e2e python 33.23% <66.66%> (+0.01%) ⬆️
e2e quarkus 28.76% <66.66%> (+0.03%) ⬆️
e2e rust 28.18% <66.66%> (+0.03%) ⬆️
e2e springboot 26.65% <66.66%> (+0.03%) ⬆️
e2e typescript 28.73% <66.66%> (+<0.01%) ⬆️
e2e-config-ci 18.08% <66.66%> (+<0.01%) ⬆️
integration 17.51% <66.66%> (+0.04%) ⬆️
unit macos-14 43.35% <100.00%> (+0.05%) ⬆️
unit macos-latest 43.35% <100.00%> (+0.05%) ⬆️
unit ubuntu-24.04-arm 43.55% <100.00%> (+0.04%) ⬆️
unit ubuntu-latest 44.23% <100.00%> (+0.04%) ⬆️
unit windows-latest 43.38% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gauron99
gauron99 force-pushed the push-kxrnrqtrmwxs branch from ddf6369 to 466cbd5 Compare April 15, 2026 18:52
@gauron99
gauron99 requested review from lkingland and matejvasek and removed request for dsimansk and jrangelramos April 15, 2026 20:28
twoGiants
twoGiants suggested changes Apr 16, 2026
View reviewed changes

@twoGiants twoGiants left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looks good! Just add a few test cases covering the new conditional logic. Thank you 😸 👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@knative-prow knative-prow Bot assigned twoGiants Apr 16, 2026
@gauron99
gauron99 force-pushed the push-kxrnrqtrmwxs branch from 466cbd5 to df47c5f Compare April 16, 2026 08:38
@knative-prow knative-prow Bot added size/L 🤖 PR changes 100-499 lines, ignoring generated files. and removed size/S 🤖 PR changes 10-29 lines, ignoring generated files. labels Apr 16, 2026
@gauron99
gauron99 force-pushed the push-kxrnrqtrmwxs branch from df47c5f to 5a0d73b Compare April 16, 2026 09:17
twoGiants
twoGiants approved these changes Apr 16, 2026
View reviewed changes

@twoGiants twoGiants left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looks good! Thank you for the tests.

I have just a minor nit => optional.

/approve
/lgtm
/hold for others

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gauron99 reacted with hooray emoji
All reactions
  • 🎉 1 reaction
Comment thread pkg/functions/function_migrations.go
Comment on lines +26 to +35
if f.Root != "" {
if bb, readErr := os.ReadFile(filepath.Join(f.Root, FunctionFile)); readErr == nil {
unknownFieldsOnce.Do(func() {
var strict Function
if strictErr := yaml.UnmarshalStrict(bb, &strict); strictErr != nil {
fmt.Fprintf(os.Stderr, "Warning (unknown fields will be ignored):\n %v\n.\n", formatUnmarshalError(strictErr))
}
})
}
}

@twoGiants twoGiants Apr 16, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

nit: use early return

Suggested change
if f.Root != "" {
if bb, readErr := os.ReadFile(filepath.Join(f.Root, FunctionFile)); readErr == nil {
unknownFieldsOnce.Do(func() {
var strict Function
if strictErr := yaml.UnmarshalStrict(bb, &strict); strictErr != nil {
fmt.Fprintf(os.Stderr, "Warning (unknown fields will be ignored):\n %v\n.\n", formatUnmarshalError(strictErr))
}
})
}
}
if f.Root == "" {
return f, nil
}
if bb, readErr := os.ReadFile(filepath.Join(f.Root, FunctionFile)); readErr == nil {
unknownFieldsOnce.Do(func() {
var strict Function
if strictErr := yaml.UnmarshalStrict(bb, &strict); strictErr != nil {
fmt.Fprintf(os.Stderr, "Warning (unknown fields will be ignored):\n %v\n.\n", formatUnmarshalError(strictErr))
}
})
}

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@knative-prow knative-prow Bot added do-not-merge/hold 🤖 PR should not merge because someone has issued a /hold command. lgtm 🤖 PR is ready to be merged. labels Apr 16, 2026
matejvasek
matejvasek reviewed Apr 16, 2026
View reviewed changes
Comment thread pkg/functions/function_migrations.go Outdated
// Migrate applies any necessary migrations, returning a new migrated
// version of the function. It is the caller's responsibility to
// .Write() the function to persist to disk.
// .Write() the function to persist to disk. Aditionaly it will warn on

@matejvasek matejvasek Apr 16, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

typo: Aditionaly => Additionally

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gauron99 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@gauron99
warn on extraneous keys used in func.yaml
b2d0a34
@gauron99
gauron99 force-pushed the push-kxrnrqtrmwxs branch from 5a0d73b to b2d0a34 Compare April 16, 2026 14:43
@knative-prow knative-prow Bot removed the lgtm 🤖 PR is ready to be merged. label Apr 16, 2026
@matejvasek

matejvasek commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

/approve
/lgtm

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow knative-prow Bot assigned matejvasek Apr 16, 2026
@knative-prow knative-prow Bot added the lgtm 🤖 PR is ready to be merged. label Apr 16, 2026
@knative-prow

knative-prow Bot commented Apr 16, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gauron99, matejvasek, twoGiants

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:
  • OWNERS [gauron99,matejvasek]

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@matejvasek

matejvasek commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

/unhold

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow knative-prow Bot removed the do-not-merge/hold 🤖 PR should not merge because someone has issued a /hold command. label Apr 16, 2026
@knative-prow
knative-prow Bot merged commit 1d63f7b into knative:main Apr 16, 2026
61 of 67 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@gauron99
gauron99 deleted the push-kxrnrqtrmwxs branch August 10, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@matejvasek matejvasek matejvasek left review comments
@lkingland lkingland Awaiting requested review from lkingland
+1 more reviewer
@twoGiants twoGiants twoGiants approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@twoGiants twoGiants

@matejvasek matejvasek

Labels

approved 🤖 PR has been approved by an approver from all required OWNERS files. lgtm 🤖 PR is ready to be merged. size/L 🤖 PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@gauron99 @matejvasek @twoGiants
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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.