-
Notifications
You must be signed in to change notification settings - Fork 593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added ceOverrides Extensions support for ApiSeverSource #4476
Conversation
/assign @nachocano |
/retest |
Codecov Report
@@ Coverage Diff @@
## master #4476 +/- ##
==========================================
- Coverage 81.27% 81.25% -0.03%
==========================================
Files 282 282
Lines 8004 8011 +7
==========================================
+ Hits 6505 6509 +4
- Misses 1112 1114 +2
- Partials 387 388 +1
Continue to review full report at Codecov.
|
Thanks @capri-xiyue ! |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: capri-xiyue, nachocano The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold |
/hold cancel |
The following is the coverage report on the affected files.
|
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.
/hold
ceOverrides come from the v2/adapter client. You should not need to do any of this.
ceOverridesExtensions := make(map[string]string) | ||
if len(env.CEOverrides) > 0 { | ||
if err := json.Unmarshal([]byte(env.CEOverrides), &ceOverridesExtensions); err != nil { | ||
panic("failed to create ceOverridesExtensions from json") |
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.
Likely don't want to panic.
@@ -65,14 +65,20 @@ func NewAdapter(ctx context.Context, processed adapter.EnvConfigAccessor, ceClie | |||
if err := json.Unmarshal([]byte(env.ConfigJson), &config); err != nil { | |||
panic("failed to create config from json") | |||
} | |||
|
|||
ceOverridesExtensions := make(map[string]string) |
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.
There is a real stuct that should be used for the ceOverrides, it is part of the source duck type
Nobody is setting the overrides when creating the outbound event. Is this using v2/adapter? There might be a bug then. |
I checked the pingsource, looks like pingsource is also set the setting the overrides by itself eventing/pkg/adapter/mtping/runner.go Line 78 in a6fc540
|
I think I found the root cause. And in PingSource, looks like it doesn't marshall ceOverrides at all. And pingsource relies on setting the ceOverrides.Extensions in adapter by itself (#3331) |
Closed this PR and will fix the issue in this #4477 |
Great work!! |
I will create another issue for PingSource so that PingSource doesn't need to set extensions in its own adapter. |
Fixes #4475
Proposed Changes