Skip to content

Don't create builds unless the BuildSpec changes. - #2402

Merged
knative-prow-robot merged 1 commit into
knative:masterfrom
mattmoor:elide-build
Nov 6, 2018
Merged

knative-prow-robot merged 1 commit into
knative:masterfrom
mattmoor:elide-build

Conversation

@mattmoor

@mattmoor mattmoor commented Nov 4, 2018

Copy link
Copy Markdown
Contributor

Things like EnvVar updates should not trigger a fresh build, when a Build is specified in the ConfigurationSpec. This builds on prior changes to lookup a pre-existing build with the same spec before creating its own. This modifies the Build e2e tests to each perform an env-var only update to the configuration, and check that there are no differences in the resulting BuildRef.

Fixes: #439

WIP until #2401 (and it's dependencies) merge

@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 Nov 4, 2018
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 4, 2018

@knative-prow-robot knative-prow-robot 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.

@mattmoor: 1 warning.

Details

In response to this:

Things like EnvVar updates should not trigger a fresh build, when a Build is specified in the ConfigurationSpec. This builds on prior changes to lookup a pre-existing build with the same spec before creating its own. This modifies the Build e2e tests to each perform an env-var only update to the configuration, and check that there are no differences in the resulting BuildRef.

Fixes: #439

WIP until #2401 (and it's dependencies) merge

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.

)

func MakeRevision(config *v1alpha1.Configuration) *v1alpha1.Revision {
func MakeRevision(config *v1alpha1.Configuration, buildRef *corev1.ObjectReference) *v1alpha1.Revision {

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.

Golint comments: exported function MakeRevision should have comment or be unexported. More info.

@mattmoor

mattmoor commented Nov 4, 2018

Copy link
Copy Markdown
Contributor Author

/test pull-knative-serving-unit-tests

Comment thread test/e2e/build_test.go
}
}

func TestBuildAndServe(t *testing.T) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we add an explicit e2e test where updating the build spec triggers a new build?

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'll add that now.

@knative-prow-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattmoor

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

@mattmoor mattmoor changed the title [WIP] Don't create builds unless the BuildSpec changes. Don't create builds unless the BuildSpec changes. Nov 6, 2018
@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 Nov 6, 2018
@mattmoor

mattmoor commented Nov 6, 2018

Copy link
Copy Markdown
Contributor Author

/test pull-knative-serving-unit-tests

Things like EnvVar updates should not trigger a fresh build, when a Build is specified in the ConfigurationSpec.  This builds on prior changes to lookup a pre-existing build with the same spec before creating its own.  This modifies the Build e2e tests to each perform an env-var only update to the configuration, and check that there are no differences in the resulting BuildRef.

Fixes: knative#439
@knative-metrics-robot

Copy link
Copy Markdown

The following is the coverage report on pkg/.
Say /test pull-knative-serving-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/v1alpha1/configuration/configuration.go 90.2% 90.0% -0.2

@dprotaso

dprotaso commented Nov 6, 2018

Copy link
Copy Markdown
Member

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 6, 2018
@mattmoor

mattmoor commented Nov 6, 2018

Copy link
Copy Markdown
Contributor Author

/test pull-knative-serving-unit-tests

@mattmoor

mattmoor commented Nov 6, 2018

Copy link
Copy Markdown
Contributor Author

/test pull-knative-serving-unit-tests

@imikushin seeing a flare up of the global resync unit test flaking

@knative-prow-robot
knative-prow-robot merged commit 3555b66 into knative:master Nov 6, 2018
@mattmoor
mattmoor deleted the elide-build branch November 6, 2018 22:11
trisberg added a commit to trisberg/riff that referenced this pull request Dec 13, 2018
- due to changes in Knative Serving we need to add a full Build as an Unstructured object

- we can then annotated the Build instead of the Revision to trigger a build

- this is necessary after the changes in knative/serving#2402
trisberg added a commit to trisberg/riff that referenced this pull request Jan 22, 2019
- due to changes in Knative Serving we need to add a full Build as an Unstructured object

- we can then annotated the Build instead of the Revision to trigger a build

- this is necessary after the changes in knative/serving#2402
trisberg added a commit to trisberg/riff that referenced this pull request Feb 5, 2019
- due to changes in Knative Serving we need to add a full Build as an Unstructured object

- we can then annotated the Build instead of the Revision to trigger a build

- this is necessary after the changes in knative/serving#2402
trisberg added a commit to trisberg/riff that referenced this pull request Feb 6, 2019
- due to changes in Knative Serving we need to add a full Build as an Unstructured object

- we can then annotated the Build instead of the Revision to trigger a build

- this is necessary after the changes in knative/serving#2402
trisberg added a commit to trisberg/riff that referenced this pull request Mar 1, 2019
- due to changes in Knative Serving we need to add a full Build as an Unstructured object

- we can then annotated the Build instead of the Revision to trigger a build

- this is necessary after the changes in knative/serving#2402

- use GetBuild method from "reconciler/v1alpha1/configuration/resources"

- fix tests to create Build objects that pass validation
trisberg added a commit to trisberg/riff that referenced this pull request Mar 1, 2019
- due to changes in Knative Serving we need to add a full Build as an Unstructured object

- we can then annotated the Build instead of the Revision to trigger a build

- this is necessary after the changes in knative/serving#2402

- use GetBuild method from "reconciler/v1alpha1/configuration/resources"

- fix tests to create Build objects that pass validation

- bump knative/build to 0.4.0
scothis pushed a commit to projectriff/riff that referenced this pull request Mar 1, 2019
- due to changes in Knative Serving we need to add a full Build as an Unstructured object

- we can then annotated the Build instead of the Revision to trigger a build

- this is necessary after the changes in knative/serving#2402

- use GetBuild method from "reconciler/v1alpha1/configuration/resources"

- fix tests to create Build objects that pass validation

- bump knative/build to 0.4.0
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. 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.

4 participants