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

logs storage service and RPC definitions #277

Merged
merged 1 commit into from
Dec 17, 2022

Conversation

sayan-biswas
Copy link
Contributor

This PR separates the service definition of logs from the results in the Proto file. Also the logs service registration is made optional at the API server and the watcher can negotiate the availability of logs service through a reflection client and enable/disable sending logs.

@tekton-robot tekton-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 8, 2022
@tekton-robot
Copy link

Hi @sayan-biswas. Thanks for your PR.

I'm waiting for a tektoncd 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.

@tekton-robot tekton-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Dec 8, 2022
@sayan-biswas
Copy link
Contributor Author

/assign @adambkaplan

@adambkaplan
Copy link
Contributor

/ok-to-test

@tekton-robot tekton-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 Dec 8, 2022
Copy link
Contributor

@adambkaplan adambkaplan left a comment

Choose a reason for hiding this comment

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

/approve

My only main comment is that in the future, we will need to create mechanisms for the watcher to store metadata of logs forwarded by other systems/services.

cmd/watcher/main.go Show resolved Hide resolved
Comment on lines +41 to +42
resultsClient: resultsClient,
logsClient: logs.Get(ctx),
Copy link
Contributor

Choose a reason for hiding this comment

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

Non-blocking observation - some things we are wiring through the Context object, others we are not. Unsure if/how we can establish some consistency here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All the other clients and informers used in Knative are injected in the controller context (as in other tekton controllers). I guess injected client is the consistent way when working with Knative.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. We can try moving to knative/pkg but it's okay for now. We did this with the Trigger's EventListener sink HTTP server. The first implementation wasn't Knative. I will look into doing this with GRPC.

Comment on lines +125 to +139
if configFile.LOGS_API {
v1alpha2pb.RegisterLogsServer(s, v1a2)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes sense to me - if we want logs to be an opt-in feature, disable the API completely if it is not available.

@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adambkaplan

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

@tekton-robot tekton-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Dec 8, 2022
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 11, 2022
| TLS_HOSTNAME_OVERRIDE| Override the hostname used to serve TLS. This should not be set (or set to the empty string) in production environments. | results.tekton.dev |
| TLS_PATH | Path to TLS files | /etc/tls |
| LOGS_API | Enable logs storage service | false (default) |
| Environment Variable | Description | Example |
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this line in the doc.

@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 13, 2022
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 15, 2022
@adambkaplan
Copy link
Contributor

/assign @dibyom

/cc @alan-ghelardi

Discussed with @sayan-biswas - I closed #258, and instead of one big PR we think it's better to land it in pieces. This adds logs as an optional feature on the apiserver. If logs are disabled, the APIs are not served.

@tekton-robot
Copy link

@adambkaplan: GitHub didn't allow me to request PR reviews from the following users: alan-ghelardi.

Note that only tektoncd members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/assign @dibyom

/cc @alan-ghelardi

Discussed with @sayan-biswas - I closed #258, and instead of one big PR we think it's better to land it in pieces. This adds logs as an optional feature on the apiserver. If logs are disabled, the APIs are not served.

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.

@alan-ghelardi
Copy link
Contributor

Awesome, although I cannot approve yet.

Copy link
Member

@dibyom dibyom left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 17, 2022
@tekton-robot tekton-robot merged commit d7db9dd into tektoncd:main Dec 17, 2022
Copy link
Contributor

@khrm khrm left a comment

Choose a reason for hiding this comment

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

/kind feature
We need this label for release as discussed in the last WG call.

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 27, 2023
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. kind/feature Categorizes issue or PR as related to a new feature. 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants