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

Add DomainMapping conformance test #9780

Merged
merged 7 commits into from
Oct 20, 2020

Conversation

julz
Copy link
Member

@julz julz commented Oct 12, 2020

Fourth part of #9713.

Now that (once #9752 lands) things work end-to-end, add a simple conformance test for DomainMapping.

Looks like this is the only thing outside of Ingress using the new alpha/beta conformance test stuff, so I hope I'm holding this right. Also if we want this to actually run in CI we'll need to deploy config/domain-mapping in test-infra.. gonna need some hand-holding on how that should work.

/hold for #9752.

/assign @mattmoor @dprotaso

@knative-prow-robot knative-prow-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Oct 12, 2020
@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Oct 12, 2020
@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 12, 2020
@knative-prow-robot knative-prow-robot added area/API API objects and controllers area/test-and-release It flags unit/e2e/conformance/perf test issues for product features labels Oct 12, 2020
@@ -35,6 +35,11 @@ func (dm *DomainMapping) GetGroupVersionKind() schema.GroupVersionKind {
return SchemeGroupVersion.WithKind("DomainMapping")
}

// IsReady returns true if the DomainMapping is ready.
func (dms *DomainMappingStatus) IsReady() bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we have moved away from this and are instead providing this method on the type itself, including a Generation check, like:

// IsReady returns true if the Status condition MetricConditionReady
// is true and the latest spec has been observed.
func (m *Metric) IsReady() bool {
	ms := m.Status
	return ms.ObservedGeneration == m.Generation &&
		ms.GetCondition(MetricConditionReady).IsTrue()
}

(this would also make the currently unused ReadyCondition constant used 😂 )

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, I copied this from Route but sure that makes sense, lemme update

@codecov
Copy link

codecov bot commented Oct 12, 2020

Codecov Report

Merging #9780 into master will increase coverage by 0.04%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9780      +/-   ##
==========================================
+ Coverage   87.75%   87.79%   +0.04%     
==========================================
  Files         180      180              
  Lines        8589     8590       +1     
==========================================
+ Hits         7537     7542       +5     
+ Misses        802      799       -3     
+ Partials      250      249       -1     
Impacted Files Coverage Δ
pkg/activator/net/throttler.go 88.00% <50.00%> (-0.04%) ⬇️
...g/apis/serving/v1alpha1/domainmapping_lifecycle.go 76.19% <100.00%> (+5.60%) ⬆️
pkg/queue/breaker.go 96.42% <100.00%> (-0.09%) ⬇️
pkg/reconciler/revision/reconcile_resources.go 80.72% <0.00%> (-2.41%) ⬇️
pkg/activator/net/revision_backends.go 91.40% <0.00%> (+0.90%) ⬆️
pkg/reconciler/autoscaling/kpa/scaler.go 90.00% <0.00%> (+1.42%) ⬆️
pkg/reconciler/configuration/configuration.go 89.34% <0.00%> (+1.63%) ⬆️

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 1c9dcf0...fd1c4f2. Read the comment docs.

Comment on lines +37 to +38
if !test.ServingFlags.EnableAlphaFeatures {
t.Skip("Alpha features not enabled")
}
Copy link
Member

Choose a reason for hiding this comment

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

We should enable this in .github/workflows/kind-e2e.yaml and ./test/e2e-tests.sh otherwise nothing is running this. I feel like we should be running this at least somewhere.

I'd kinda like to see the istio class annotation moved to be config-based before we start adding e2e tests that will light up folks testgrid.

Copy link
Member Author

Choose a reason for hiding this comment

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

added to kind-e2e in #9837, Im gonna ping on slack to try to get some hand-holding for how to go about trying to iterate on modifications to e2e-tests.sh :)

Copy link
Member Author

Choose a reason for hiding this comment

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

.. and added prow e2e in #9851. Think this may be ready to go now.

@julz julz mentioned this pull request Oct 13, 2020
14 tasks
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 15, 2020
@julz julz force-pushed the domainmappingconformance branch from a47e56b to 9d93fc7 Compare October 16, 2020 05:54
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 16, 2020
@julz
Copy link
Member Author

julz commented Oct 16, 2020

Rebased on master so we can try this out with the new e2e test GitHub action 🤞.

@julz
Copy link
Member Author

julz commented Oct 16, 2020

Neat: passes on contour and ingress, fails on kourier as expected bc I don't think we have RewriteHost implemented there yet. Do we want to exclude the kourier row for now or keep it in there as incentive to get that working @mattmoor?

@julz julz changed the title WIP: Add DomainMapping conformance test Add DomainMapping conformance test Oct 16, 2020
@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 Oct 16, 2020
@julz julz force-pushed the domainmappingconformance branch from 4adf445 to 8823a40 Compare October 20, 2020 08:47
@julz
Copy link
Member Author

julz commented Oct 20, 2020

Rebased so we can try this with the prow-based e2e-tests now #9851 has landed 🤞.

@julz
Copy link
Member Author

julz commented Oct 20, 2020

/retest

@mattmoor
Copy link
Member

@julz yeah I'd add an exclude with TODO(#1234) for an issue to track this with kourier?

@julz
Copy link
Member Author

julz commented Oct 20, 2020

good call @mattmoor, done.

Copy link
Member

@mattmoor mattmoor 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 Oct 20, 2020
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: julz, mattmoor

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 Oct 20, 2020
@julz
Copy link
Member Author

julz commented Oct 20, 2020

/unhold

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 20, 2020
@knative-prow-robot knative-prow-robot merged commit 16e6096 into knative:master Oct 20, 2020
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/API API objects and controllers 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.

5 participants