knative / knative/pkg

Add warning for Source.spec.ceOverride.extension names that are longer than 20 characters and with uppercase letters

Open
#2,258 5 comments 0 reactions 0 assignees View on GitHub
triage/accepted
Dominant language
Go
Stars
276
Forks
343
Avg merge
1d 1h
Merged PRs (30d)
1

Description

**Problem**
As stated on the [Cloud Events Spec](https://github.com/cloudevents/spec/blob/v1.0.1/spec.md#attribute-naming-convention)
the attribute naming convention suggest (SHOULD, not MUST) that the names are no longer than 20 characters. We should add at maybe a warning for that cases, even when this does not imply an error. Also, when there are keys with upper case letters there could be a collision (cause the keys get converted to lower-case), in that keys the value corresponds with the last defined key (generally)

**[Persona:](https://github.com/knative/eventing/blob/main/docs/personas.md)**
Producers, consumers and integrators

**Exit Criteria**
When you set an extension name longer than 20 characters on any source.spec.ceOverride.extensions extension, the logs show a warning about that extension name

**Additional context (optional)**
[Here](https://github.com/knative/pkg/blob/main/apis/duck/v1/source_types.go) should be any warning or validation related to sources 😉

Contributor guide

Open the contributing guide

Research direction

Start with apis/duck/v1/source_types.go and trace how source.spec.ceOverride.extensions is validated or reported. Done when extension names longer than 20 characters and names containing uppercase letters produce warnings without becoming errors, with coverage for the requested behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.