func invoke: reject reserved CloudEvents attribute names passed with -e
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start in cmd/invoke.go at the CloudEvents extension-name validation added in #4130. Compare the reserved core attribute list from the issue (id, type, source, specversion, subject, time, datacontenttype, dataschema) against that check, then reject them with a message naming the matching --id, --type or --source flag. Extend the existing extension-name test cases beside that validation; done when reserved names fail with the new message and ordinary extension names still pass.
Written by the indexing model from the issue text.
Description
Follow-up to #4130 / #3346.
func invoke -e name=value sets a CloudEvent extension. #4130 validates the name against the CloudEvents rule for extension names (lowercase letters and digits). Names that are core CloudEvents attributes, such as id, type, source, specversion, subject, time, datacontenttype and dataschema, pass that check and are only rejected later, inside the CloudEvents SDK, with a less helpful error.
Suggested change: reject those names in the same place the extension names are validated in cmd/invoke.go, with a message that says the name is a reserved CloudEvents attribute and points at the flag that sets it where one exists (--id, --type, --source). Add test cases next to the existing extension-name tests.
Open for contribution.
- Dominant language
- Go
- Stars
- 366
- Forks
- 231
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 50
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from knative/func
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
Maintainers usually reply within 2 days
-
MCP config_git_set exposes the GitHub token on the func subprocess command linePossibly taken @anjalirj27 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
Maintainers usually reply within 2 days
-
Deprecation of legacy parliament Python functions (removal in 1.26)Possibly taken @gauron99 claimed this 4 days ago. Openkind/cleanup lifecycle/frozen
knative/func#4185 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
-
Function CR sync should keep the spec fields func does not setPossibly taken @gauron99 claimed this 13 days ago. Open
knative/func#4156 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
-
OCI pusher panics when reused for a second uploadPossibly taken @shreyashsri79 claimed this 18 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
Maintainers usually reply within 2 days
Similar issues
-
Generated cask uses deprecated `postflight` stanza; Homebrew 7 warns on every commandPossibly taken @k4kratik claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
sachincool/cruft#4 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
VictoriaMetrics/VictoriaLogs#1965 ·
Maintainers usually reply within 1 day
-
kind/bug sig/ui
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
kubermatic/dashboard#8540 · 1 comment ·
Maintainers usually reply within 1 day
-
Sign-off cards drift between formats; write down one card formatPossibly taken @keyxmakerx claimed this today. Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
keyxmakerx/Chronicle#2795 ·
Maintainers usually reply within 1 day
-
bug ElasticSearch
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
aliyun/terraform-provider-alicloud#11614 · 1 comment ·
Maintainers usually reply within 1 day