Closed xinnjie closed 1 year ago
Hi @xinnjie. 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.
/assign @khrm
/ok-to-test
/assign @sayan-biswas @enarha
We can probably add this. There are a lot of CLI prs remaining. We need to merge these.
Could you give the pr a lgtm if it is ok to add the feature? Thanks a lot. @khrm
@xinnjie I'll check this out today.
We probably need this behind a flag not automatically port-forward. @sayan-biswas @avinal What do you think?
Agreed!!
Although there's a pre-condition to this automatic behaviour (server address not configured), but still I feel a flag would provide more explicit control to the user.
We probably need this behind a flag not automatically port-forward. @sayan-biswas @avinal What do you think?
I have similar point as Sayan, but I am more in favor of automatic since a condition is already defined. That said, a flag would be useful from a user's control perspective.
@xinnjie The changes look good to me, but I am unable to test due to a problem with my setup. I will put my test results if I fix my setup.
Sorry for late response.
@avinal @sayan-biswas @khrm
how about adding a flag -portforward
to enable port-forwarding while address
is empty, and default values is true
. That said, when address
is empty, port-forwarding is the default behavior, users can choose to disable it explicitly.
I prefer port-forward automatically (when address
is empty), because there is a use case that tekton-results-api-service
is not exported outside the cluster, and people who do not export the tekton-results-api-service
need auto port-forwarding more while people export the tekton-results-api-service
will set address
by default.
portforward
flag added.
Test case:
portforward
not set in config file and command line, addr
not set. Port forward run as expected.
When portforward: false
is added to config file.
> ./tkn-results list -
Dial: context deadline exceeded
Error: context deadline exceeded
Usage:
tkn-results list [flags] <parent>
...
When portforward
not set in config file and --portforward=false
set in command line:
> ./tkn-results --portforward=false list -
Dial: context deadline exceeded
Error: context deadline exceeded
Usage:
tkn-results list [flags] <parent>
<parent>: Parent name to query. This is typically corresponds to a namespace, but may vary depending on the API Server. "-" may be used to query all parents.
Please any one review this PR. It has been 2 weeks now.
cc @enarha @sayan-biswas as discussed in the WG call, I have tested it, please put a final review, it is ready to be merged.
@xinnjie Apologies for the delay on this one. Can you please rebase and fix the conflicts (I want to avoid doing that manually) and I'll make sure we address the PR in the next couple of days. Thank you again.
Rebased.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: avinal, sayan-biswas
The full list of commands accepted by this bot can be found here.
The pull request process is described here
/lgtm
Changes
If Results API server address not specified, tkn-result would port-forward to
service/tekton-results-api-service
automatically. It helps a lot whenservice/tekton-results-api-service
is not exported.Test case:
Kubectl port-forward
manually./kind feature
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you review them:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes