Skip to content

Add Domainmapping AutoTLS e2e test - #10795

Merged
knative-prow-robot merged 5 commits into
knative:mainfrom
YoussB:dm_autotls_e2e
May 11, 2021
Merged

knative-prow-robot merged 5 commits into
knative:mainfrom
YoussB:dm_autotls_e2e

Conversation

@YoussB

@YoussB YoussB commented Feb 16, 2021 •

Copy link
Copy Markdown
Contributor

Fixes #10247

Proposed Changes

  • Adds an e2e test under test/autotls/ that tests autotls with domainmapping.
  • The test is very similar to test/conformance/api/v1alpha1/domain_mapping_test.go except for the fact that it tests with https instead of http.
  • for the time being I am using functions from conformance but can be moved to a shared place?
  • currently having the check for alpha features commented out in until I figure out how to enable these features in prow.

Release Note

 "NONE"

@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 16, 2021
@google-cla google-cla Bot added the cla: yes Indicates the PR's author has signed the CLA. label Feb 16, 2021
@knative-prow-robot

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@knative-prow-robot knative-prow-robot added area/test-and-release It flags unit/e2e/conformance/perf test issues for product features size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 16, 2021
@codecov

codecov Bot commented Feb 16, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #10795 (2b35f20) into main (e4c7848) will increase coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #10795      +/-   ##
==========================================
+ Coverage   87.66%   87.74%   +0.08%     
==========================================
  Files         191      191              
  Lines        9190     9211      +21     
==========================================
+ Hits         8056     8082      +26     
+ Misses        881      876       -5     
  Partials      253      253              
Impacted Files Coverage Δ
pkg/reconciler/revision/background.go 91.66% <0.00%> (-3.52%) ⬇️
pkg/reconciler/configuration/configuration.go 86.71% <0.00%> (-1.57%) ⬇️
pkg/reconciler/autoscaling/kpa/scaler.go 88.73% <0.00%> (-1.41%) ⬇️
pkg/autoscaler/metrics/http_scrape_client.go 86.66% <0.00%> (-0.84%) ⬇️
cmd/queue/main.go 0.50% <0.00%> (ø)
pkg/reconciler/metric/metric.go 100.00% <0.00%> (ø)
pkg/apis/serving/v1/revision_types.go 100.00% <0.00%> (ø)
pkg/reconciler/revision/resources/deploy.go 100.00% <0.00%> (ø)
pkg/reconciler/autoscaling/kpa/kpa.go 94.73% <0.00%> (+0.09%) ⬆️
pkg/reconciler/revision/revision.go 87.50% <0.00%> (+0.40%) ⬆️
... and 5 more

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 e4c7848...2b35f20. Read the comment docs.

@YoussB

YoussB commented Feb 16, 2021

Copy link
Copy Markdown
Contributor Author

/test pull-knative-serving-contour-tls

Comment thread test/e2e/autotls/domain_mapping_test.go Outdated
)

func TestDomainMappingAutoTLS(t *testing.T) {
//if !test.ServingFlags.EnableAlphaFeatures {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove or uncomment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am still trying to figure out how this will run with prow

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

that's why I left the comment :), but will sure have to either uncomment of remove once the PR is ready, Thanks :)

Comment thread test/e2e/autotls/domain_mapping_test.go Outdated
Comment on lines +97 to +129
waitErr := wait.PollImmediate(test.PollInterval, test.PollTimeout, func() (bool, error) {
state, err := clients.ServingAlphaClient.DomainMappings.Get(context.Background(), dm.Name, metav1.GetOptions{})
if err != nil {
return true, err
}

return state.IsReady(), nil
})
if waitErr != nil {
t.Fatalf("The DomainMapping %s was not marked as Ready: %v", dm.Name, waitErr)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fold into if like on line 72.

Comment thread test/e2e/autotls/domain_mapping_test.go Resolved
@vagababov

Copy link
Copy Markdown
Contributor

/assign @julz

@julz julz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

mostly looking good, thanks! I think we want to align it with the other autotls tests which should help get it working properly in prow/non-prow contexts

Comment thread test/e2e/autotls/domain_mapping_test.go Outdated
}

// Should be able to access the test image text via the mapped domain.
if err := shared.CheckDistribution(ctx, t, clients, &url.URL{Host: host, Scheme: "https"}, test.ConcurrentRequests, test.ConcurrentRequests, []string{test.PizzaPlanetText1}, resolvableCustomDomain); err != nil {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this isn't quite the way you want to do this here. I'd grab the code from auto_tls_test to make the TLS request with the right credentials. Since this is in the autotls package I'd expect it to work with the cases outlined in the README.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@julz I think I've addressed the comments, but let me if I missed anything

Comment thread test/e2e/autotls/domain_mapping_test.go Resolved
@YoussB
YoussB force-pushed the dm_autotls_e2e branch 2 times, most recently from 9517659 to b89dc1d Compare February 23, 2021 01:00
@YoussB
YoussB marked this pull request as ready for review February 23, 2021 01:03
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 23, 2021
@YoussB

YoussB commented Feb 23, 2021

Copy link
Copy Markdown
Contributor Author

/retest pull-knative-serving-istio-stable-no-mesh-tls

@knative-prow-robot

Copy link
Copy Markdown
Contributor

@YoussB: The /retest command does not accept any targets.
The following commands are available to trigger jobs:

  • /test pull-knative-serving-build-tests
  • /test pull-knative-serving-unit-tests
  • /test pull-knative-serving-upgrade-tests
  • /test pull-knative-serving-istio-latest-mesh
  • /test pull-knative-serving-istio-latest-mesh-tls
  • /test pull-knative-serving-istio-latest-no-mesh
  • /test pull-knative-serving-istio-latest-no-mesh-tls
  • /test pull-knative-serving-istio-stable-mesh
  • /test pull-knative-serving-istio-stable-mesh-tls
  • /test pull-knative-serving-istio-stable-no-mesh
  • /test pull-knative-serving-istio-stable-no-mesh-tls
  • /test pull-knative-serving-gloo-0.17.1
  • /test pull-knative-serving-gloo-0.17.1-tls
  • /test pull-knative-serving-kourier-stable
  • /test pull-knative-serving-kourier-stable-tls
  • /test pull-knative-serving-contour-latest
  • /test pull-knative-serving-contour-tls
  • /test pull-knative-serving-ambassador-latest
  • /test pull-knative-serving-ambassador-latest-tls
  • /test pull-knative-serving-kong-latest
  • /test pull-knative-serving-kong-latest-tls
  • /test pull-knative-serving-https

Use /test all to run the following jobs:

  • pull-knative-serving-build-tests
  • pull-knative-serving-unit-tests
  • pull-knative-serving-upgrade-tests
  • pull-knative-serving-istio-stable-no-mesh
  • pull-knative-serving-istio-stable-no-mesh-tls
Details

In response to this:

/retest pull-knative-serving-istio-stable-no-mesh-tls

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.

@YoussB

YoussB commented Feb 23, 2021

Copy link
Copy Markdown
Contributor Author

/test pull-knative-serving-istio-stable-no-mesh-tls

@YoussB

YoussB commented Feb 23, 2021

Copy link
Copy Markdown
Contributor Author

/test pull-knative-serving-contour-tls

@YoussB
YoussB force-pushed the dm_autotls_e2e branch 6 times, most recently from b854a47 to c31dd3c Compare February 24, 2021 22:21
@YoussB

YoussB commented Feb 25, 2021

Copy link
Copy Markdown
Contributor Author

/test pull-knative-serving-contour-tls

@google-cla google-cla Bot added the cla: no Indicates the PR's author has not signed the CLA. label Apr 21, 2021
@google-cla

google-cla Bot commented Apr 21, 2021

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

thx @nak3

Signed-off-by: Bishoy Youssef <[email protected]>
@google-cla google-cla Bot added cla: yes Indicates the PR's author has signed the CLA. and removed cla: no Indicates the PR's author has not signed the CLA. labels Apr 21, 2021
@YoussB

YoussB commented Apr 21, 2021

Copy link
Copy Markdown
Contributor Author

/test pull-knative-serving-istio-stable-no-mesh-tls-with-http01

@YoussB

YoussB commented Apr 21, 2021

Copy link
Copy Markdown
Contributor Author

Thanks @nak3 for the suggestions, I have committed them all.
@ZhiminXiang, Last I checked http01 was still failing but not sure why, I am trying it again.

@YoussB

YoussB commented Apr 22, 2021

Copy link
Copy Markdown
Contributor Author

/test pull-knative-serving-istio-stable-no-mesh-tls-with-http01

1 similar comment
@ZhiminXiang

Copy link
Copy Markdown

/test pull-knative-serving-istio-stable-no-mesh-tls-with-http01

Comment thread test/e2e/autotls/domain_mapping_test.go Resolved
@YoussB

YoussB commented Apr 26, 2021

Copy link
Copy Markdown
Contributor Author

/test pull-knative-serving-istio-stable-no-mesh-tls-with-http01

Signed-off-by: Bishoy Youssef <[email protected]>
@YoussB

YoussB commented Apr 26, 2021

Copy link
Copy Markdown
Contributor Author

/test pull-knative-serving-istio-stable-no-mesh-tls-with-http01

@YoussB

YoussB commented Apr 26, 2021

Copy link
Copy Markdown
Contributor Author

Thanks @ZhiminXiang for the pointers, I wouldn't have been able to find this problem myself.

This should be ready to be merged now :)
CC: @julz @tcnghia

Comment thread test/e2e/autotls/domain_mapping_test.go Resolved
@nak3

nak3 commented May 6, 2021

Copy link
Copy Markdown
Contributor

@YoussB I'm sorry to have kept you waiting. Zhimin is taking leave until June 😅
I left one more comment. Let's merge this once it was addressed.

@xtreme-sameer-vohra

Copy link
Copy Markdown

Hey @YoussB,
Looks like there is a tiny linter issue - https://github.com/knative/serving/pull/10795/checks?check_run_id=2532560594
Let @shinigambit or I know if you want to take care of it or if Fabian should do so 🙇

Signed-off-by: Bishoy Youssef <[email protected]>
@YoussB

YoussB commented May 10, 2021

Copy link
Copy Markdown
Contributor Author

Thanks for the reminder @xtreme-sameer-vohra ... I will be happy to see this to completion :)

@YoussB

YoussB commented May 10, 2021

Copy link
Copy Markdown
Contributor Author

@nak3 lmk if there is anything else you want me to change.

@nak3

nak3 commented May 11, 2021

Copy link
Copy Markdown
Contributor

/lgtm
/approve

Thank you @YoussB

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label May 11, 2021
@knative-prow-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nak3

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 May 11, 2021
@knative-prow-robot
knative-prow-robot merged commit 3a38d70 into knative:main May 11, 2021
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. area/test-and-release It flags unit/e2e/conformance/perf test issues for product features cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support AutoTLS for DomainMapping

9 participants