GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — warn on extraneous keys used in func.yaml by gauron99 · Pull Request #3611 · knative/func Conversation
|
|
Skipping CI for Draft Pull Request. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ddf6369 to
466cbd5
Compare
There was a problem 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.
There was an error while loading. Please reload this page.
466cbd5 to
df47c5f
Compare
df47c5f to
5a0d73b
Compare
There was a problem 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.
There was an error while loading. Please reload this page.
| 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)) | ||
| } | ||
| }) | ||
| } | ||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
nit: use early return
| 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.
There was an error while loading. Please reload this page.
| // 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 |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
typo: Aditionaly => Additionally
Sorry, something went wrong.
There was an error while loading. Please reload this page.
5a0d73b to
b2d0a34
Compare
|
/approve |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
/unhold |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.