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

Default the service links flag setting to false in knative #9622

Closed

Conversation

vagababov
Copy link
Contributor

See #8498 for why are we doing this.

Fixes #8563

/assign mattmoor

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Sep 29, 2020
@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. area/API API objects and controllers approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 29, 2020
@codecov
Copy link

codecov bot commented Sep 29, 2020

Codecov Report

Merging #9622 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9622   +/-   ##
=======================================
  Coverage   88.16%   88.16%           
=======================================
  Files         176      176           
  Lines        8414     8416    +2     
=======================================
+ Hits         7418     7420    +2     
  Misses        754      754           
  Partials      242      242           
Impacted Files Coverage Δ
pkg/apis/config/defaults.go 91.66% <100.00%> (+0.14%) ⬆️
pkg/apis/serving/v1/revision_defaults.go 100.00% <100.00%> (ø)
pkg/reconciler/autoscaling/kpa/scaler.go 88.40% <0.00%> (-1.45%) ⬇️
pkg/reconciler/configuration/configuration.go 89.16% <0.00%> (+1.66%) ⬆️

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 5d0ef0d...65b5533. Read the comment docs.

@mattmoor
Copy link
Member

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 29, 2020
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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-test-reporter-robot

The following jobs failed:

Test name Triggers Retries
pull-knative-serving-upgrade-tests 0/3

Failed non-flaky tests preventing automatic retry of pull-knative-serving-upgrade-tests:

test/upgrade.TestProbe
test/upgrade.TestBYORevisionPostUpgrade

@vagababov
Copy link
Contributor Author

/retest

@knative-prow-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Sep 29, 2020
@vagababov
Copy link
Contributor Author

It seems we were ignoring defaulting only in the revision itself, but completely failing to disable it when coming via config/service.

@vagababov
Copy link
Contributor Author

/retest

@@ -46,6 +41,11 @@ func (rts *RevisionTemplateSpec) SetDefaults(ctx context.Context) {

// SetDefaults implements apis.Defaultable
func (rs *RevisionSpec) SetDefaults(ctx context.Context) {
// SetDefaults may update revision spec which is immutable.
// See: https://github.com/knative/serving/issues/8128 for details.
if apis.IsInUpdate(ctx) {
Copy link
Member

Choose a reason for hiding this comment

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

We had this in Revision because Revision is immutable. RevisionSpec is not immutable in all contexts.

Putting this here means that pre-existing resources won't have defaulting applied, which seems to me like it'll be breaking.

I'd like to understand what broke a bit better, and if another change is needed, then let's try and do that separately first?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure.
BAsically here we did upgrade from nil EnableServiceLinks to a real value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you have in mind that should be defaulted that wasn't before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that also those can be defaulted in reconciler itself.

@dprotaso
Copy link
Member

dprotaso commented Oct 1, 2020

Is the intent to migrate existing revisions?

Let me know if I'm missing something but could we do either of the following:

  1. Set the property on the Deployment if it's not set by the user
  2. Only apply the new default to new revisions?

@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 1, 2020
@vagababov
Copy link
Contributor Author

So always resetting is a problem, since upgrade test is unhappy (can be fixed, but 🤷 )
Also we don't want to migrate existing revisions so the options are:

  1. apply this change (either as one or as two prs — one to push down IsInUpdate check — one to enable the change) — I think @mattmoor has some ideas why this is not kosher.
  2. make the IsInUpdate check when setting the field to ensure old revisions are untouched while keeping everything else the same.

@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 1, 2020
@vagababov
Copy link
Contributor Author

/close

@knative-prow-robot
Copy link
Contributor

@vagababov: Closed this PR.

In response to this:

/close

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.

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 cla: yes Indicates the PR's author has signed the CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change the "enable service links" default
6 participants