get a particular service and revision based on name parameter#150
get a particular service and revision based on name parameter#150knative-prow-robot merged 1 commit intoknative:masterfrom
Conversation
|
Hi @savitaashture. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
| return nil, nil | ||
| } | ||
| revision.GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{ | ||
| Group: "knative.dev", |
There was a problem hiding this comment.
The coordinates are wrong (whould be serving.knative.dev for the Group), but we should get #134 merged as soon as possible which avoids this kind of hardcoding of the GKV. @sixolet @cppforlife can we please get #134 merged soon to avoid piling up on this technical debt ?)
There was a problem hiding this comment.
Sure...Once that is merged i will rechange this
rhuss
left a comment
There was a problem hiding this comment.
Thanks a lot ! I have some comments though.
On a more general level: I see a lot of duplicated code. Would it make sense to unify "revision get" and "service get" where possible ?
|
|
||
| func createMockRevisionWithParams(name, svcName string, version bool) *v1alpha1.Revision { | ||
| var apiVersion string | ||
| if version { |
There was a problem hiding this comment.
Why do you have different api versions ?
There was a problem hiding this comment.
This condition i have added to check the apiVersion
Because in the base code
when we do
kn revision get -o yaml
apiVersion: knative.dev/v1alpha1
items:
- apiVersion: serving.knative.dev/v1alpha1
kind: Revision
metadata:
annotations:
autoscaling.knative.dev/target: "10"
serving.knative.dev/lastPinned: "1559284138"
creationTimestamp: "2019-05-31T06:28:47Z"
generateName: autoscale-go-
generation: 1
If its a list then it is giving apiversion as knative.dev
and after adding my logic to get the single revision the apiversion should be serving.knative.dev
So in order to use the same function in test case i just added a boolean variable to check whether thats a get all revisions or get a revision based on name.
But as you said once after this merge
#134
GVK will be handled i think that time this condition is not required.
b1593c5 to
a3fc452
Compare
Found fakeRevisionGet and fakeServiceGet duplicate code modified and updated. |
|
@savitaashture thanks a lot for your updates ! Could you please rebase on latest mastrer, there has been some structural changes. Nothing big, probbaly just import conflicts. |
@rhuss I have rebased with latest master changes. |
|
/ok-to-test |
|
@savitaashture : |
d9bcedb to
8eba6dd
Compare
@navidshaikh @rhuss Rebased |
navidshaikh
left a comment
There was a problem hiding this comment.
Filtering a service by its name makes sense as the name is user provided, but the revision name is generated at server, how can we expect the user to remember the complicated name generated for revision and use it to filter revisions?
One of the candidate to land in kn config, but yes the default timeout can be increased. Another option, we can set |
|
@savitaashture #134 has been merged. Could you please rebase ? |
Done |
| } else if !action.Matches("list", "services") { | ||
| t.Errorf("Bad action %v", action) | ||
| } | ||
| assert.Check(t, util.ContainsAll(output[0], "NAME", "DOMAIN", "GENERATION", "AGE", "CONDITIONS", "READY", "REASON")) |
There was a problem hiding this comment.
I'm fine with either. However I suggest to merge this PR first, and then update #247 based on this.
|
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the ℹ️ Googlers: Go here for more info. |
rhuss
left a comment
There was a problem hiding this comment.
looks good, thanks ! Minor nit about naming, otherwise we are good to merge.
| } else if !action.Matches("list", "services") { | ||
| t.Errorf("Bad action %v", action) | ||
| } | ||
| assert.Check(t, util.ContainsAll(output[0], "NAME", "DOMAIN", "GENERATION", "AGE", "CONDITIONS", "READY", "REASON")) |
There was a problem hiding this comment.
I'm fine with either. However I suggest to merge this PR first, and then update #247 based on this.
|
@savitaashture if you update the docs a bit, could you also please squash the PR to a single commit and force push it again ? I hope that we then get rid of the CLA issue so that we can merge that PR. Thanks ! |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
|
The following is the coverage report on pkg/.
|
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhuss, savitaashture The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
#143
current:
Expected: Should list only that perticular service.
something like below