Skip to content
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

Setting tracing config for PingSource #4877

Merged
merged 4 commits into from
Feb 15, 2021
Merged

Setting tracing config for PingSource #4877

merged 4 commits into from
Feb 15, 2021

Conversation

Shashankft9
Copy link
Member

@Shashankft9 Shashankft9 commented Feb 13, 2021

Fixes
#4757

Proposed Changes

  • reading config-tracing cm and setting it for the pingsource adapter

Release Note

Cloudevent traces available for PingSource

Docs
knative/docs#3249

@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Feb 13, 2021
@knative-prow-robot knative-prow-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 13, 2021
@knative-prow-robot knative-prow-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 13, 2021
@knative-prow-robot
Copy link
Contributor

Hi @Shashankft9. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@antoineco
Copy link
Contributor

antoineco commented Feb 13, 2021

Sounds reasonable but it feels to me like we should use the config helper instead of manually handling each ConfigMap.

A hint for the implementation, in case you're willing to tackle it in this PR (I think it would greatly simplify the code);

// reconciler/controller.go

import (
	"knative.dev/eventing/pkg/reconciler/source"
)

// ...

&Reconciler{
	adapterConfigs: source.WatchConfigurations(ctx, "pingsource", cmw),
}
// resources/receive_adapter.go

env = append(env, args.Configs.ToEnvVars()...))

@codecov
Copy link

codecov bot commented Feb 13, 2021

Codecov Report

Merging #4877 (c3985b0) into master (1c771ce) will decrease coverage by 0.00%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4877      +/-   ##
==========================================
- Coverage   81.35%   81.34%   -0.01%     
==========================================
  Files         292      292              
  Lines        8322     8329       +7     
==========================================
+ Hits         6770     6775       +5     
- Misses       1144     1145       +1     
- Partials      408      409       +1     
Impacted Files Coverage Δ
pkg/reconciler/pingsource/pingsource.go 58.10% <50.00%> (-0.47%) ⬇️
...reconciler/pingsource/resources/receive_adapter.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c771ce...e4c1a29. Read the comment docs.

@Shashankft9
Copy link
Member Author

@antoineco mhm I can try refactoring, but maybe in a separate PR? I will try next week, but if not, atleast the traces will be available in 0.21 release. Makes sense?

@antoineco
Copy link
Contributor

I don't mind that but it would actually be less lines of code to implement that change, that's why I was suggesting it.

/ok-to-test

@knative-prow-robot knative-prow-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 13, 2021
Copy link
Contributor

@antoineco antoineco left a comment

Choose a reason for hiding this comment

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

One small comment. Otherwise LGTM 👍

pkg/reconciler/pingsource/pingsource.go Outdated Show resolved Hide resolved
Copy link
Contributor

@antoineco antoineco left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 15, 2021
@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-eventing-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/pingsource/pingsource.go 63.2% 63.3% 0.2

@lionelvillard
Copy link
Member

/approve

@Shashankft9 do you mind opening an issue to use the config helper as @antoineco suggested?

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: antoineco, lionelvillard, Shashankft9

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 15, 2021
@antoineco
Copy link
Contributor

@lionelvillard I'll send a PR with that change right after this gets merged (it's already done)

@Shashankft9
Copy link
Member Author

@antoineco you can open the PR, since it does the same thing but in a better way, would be nice to get that merged instead of this 🤔

@antoineco
Copy link
Contributor

@Shashankft9 it's fine, logical steps are also good when reviewing the commit history 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants