operator icon indicating copy to clipboard operation
operator copied to clipboard

Add components and deprecate deployments

Open pierDipi opened this issue 3 years ago • 8 comments

As per title.

Fixes #1155

Proposed Changes

  • Add spec.components
  • Deprecated spec.deployments

Release Note

knativeeventing.spec.deployments and knativeserving.spec.deployments is deprecated, use knativeeventing.spec.components and knativeserving.spec.components instead.

TODO: change documentation in knative/docs

pierDipi avatar Oct 12 '22 10:10 pierDipi

Codecov Report

Base: 79.21% // Head: 79.40% // Increases project coverage by +0.18% :tada:

Coverage data is based on head (914456f) compared to base (16de0cb). Patch coverage: 84.37% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1246      +/-   ##
==========================================
+ Coverage   79.21%   79.40%   +0.18%     
==========================================
  Files          35       35              
  Lines        1588     1602      +14     
==========================================
+ Hits         1258     1272      +14     
  Misses        239      239              
  Partials       91       91              
Impacted Files Coverage Δ
pkg/reconciler/common/workload_override.go 83.87% <83.87%> (ø)
pkg/reconciler/common/ha.go 63.26% <100.00%> (ø)
pkg/reconciler/common/resources.go 84.21% <100.00%> (ø)
pkg/reconciler/common/transformers.go 85.71% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Oct 12 '22 11:10 codecov[bot]

/cc @houshengbo @matzew

pierDipi avatar Oct 12 '22 11:10 pierDipi

Per my comment here: https://github.com/knative/operator/issues/1155#issuecomment-1271740272 I will say do not deprecate the spec.deployment, at least in the current v1beta1 CRDs.

Once we have a new version of CRDs, we can deprecate the spec.deployment.

houshengbo avatar Oct 12 '22 13:10 houshengbo

Per my comment here: #1155 (comment) I will say do not deprecate the spec.deployment, at least in the current v1beta1 CRDs.

Once we have a new version of CRDs, we can deprecate the spec.deployment.

Notifying of a deprecation earlier is naturally better, we're not breaking users and there is already the recommended option, why is that the approach that would be better in this case?

pierDipi avatar Oct 12 '22 13:10 pierDipi

cc @houshengbo

pierDipi avatar Oct 13 '22 09:10 pierDipi

if you feel strong about that I can just update the release notes to remove the deprecation warning

pierDipi avatar Oct 13 '22 09:10 pierDipi

I'd say we add the deprecated warning, as a vehicle to communicate that things are changing, via the code

matzew avatar Oct 13 '22 10:10 matzew

@matzew done!

pierDipi avatar Oct 18 '22 09:10 pierDipi

LGTM. As a side note not sure why fetcher needs to run with hack/update-codegen.sh, I think it should only fetch new stuff if some upgrade flag is passed.

skonto avatar Oct 18 '22 14:10 skonto

This PR needs to add more test coverage.

houshengbo avatar Oct 18 '22 14:10 houshengbo

/unhold /lgtm /approve

houshengbo avatar Oct 18 '22 18:10 houshengbo

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: houshengbo, matzew, pierDipi

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:
  • ~~OWNERS~~ [houshengbo,matzew]

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

knative-prow[bot] avatar Oct 18 '22 18:10 knative-prow[bot]

/cherry-pick release-1.7

matzew avatar Oct 19 '22 06:10 matzew

/cherry-pick release-1.6

matzew avatar Oct 19 '22 06:10 matzew

/cherry-pick release-1.5

matzew avatar Oct 19 '22 06:10 matzew

@matzew: #1246 failed to apply on top of branch "release-1.7":

Applying: Add components and deprecate deployments
Using index info to reconstruct a base tree...
M	config/crd/bases/operator.knative.dev_knativeeventings.yaml
M	config/crd/bases/operator.knative.dev_knativeservings.yaml
M	pkg/reconciler/common/ha.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/reconciler/common/ha.go
Removing pkg/reconciler/common/deployments_override.go
Auto-merging config/crd/bases/operator.knative.dev_knativeservings.yaml
Auto-merging config/crd/bases/operator.knative.dev_knativeeventings.yaml
Applying: Run update-codegen.sh
Applying: Lint error
Applying: Fix unit test
Applying: Add unit test for new field
Applying: Make common function more generic
Using index info to reconstruct a base tree...
M	config/crd/bases/operator.knative.dev_knativeeventings.yaml
M	config/crd/bases/operator.knative.dev_knativeservings.yaml
M	pkg/reconciler/common/ha.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/reconciler/common/ha.go
Auto-merging config/crd/bases/operator.knative.dev_knativeservings.yaml
Auto-merging config/crd/bases/operator.knative.dev_knativeeventings.yaml
Applying: Rename to workloads
Using index info to reconstruct a base tree...
M	config/crd/bases/operator.knative.dev_knativeeventings.yaml
M	config/crd/bases/operator.knative.dev_knativeservings.yaml
M	pkg/reconciler/common/ha.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/reconciler/common/ha.go
Auto-merging config/crd/bases/operator.knative.dev_knativeservings.yaml
Auto-merging config/crd/bases/operator.knative.dev_knativeeventings.yaml
Applying: Run update codegen
Applying: Rename ComponentsOverride -> Workloads
Applying: Test StatefulSet resource requirements
Applying: Run update-codegen.sh
Applying: Test StatefulSet transform
Applying: Update codegen again
Using index info to reconstruct a base tree...
M	go.mod
Falling back to patching base and 3-way merge...
Auto-merging go.mod
CONFLICT (content): Merge conflict in go.mod
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0013 Update codegen again
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.7

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.

knative-prow-robot avatar Oct 19 '22 06:10 knative-prow-robot

@matzew: #1246 failed to apply on top of branch "release-1.6":

Applying: Add components and deprecate deployments
Using index info to reconstruct a base tree...
M	config/crd/bases/operator.knative.dev_knativeeventings.yaml
M	config/crd/bases/operator.knative.dev_knativeservings.yaml
M	pkg/reconciler/common/ha.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/reconciler/common/ha.go
Removing pkg/reconciler/common/deployments_override.go
Auto-merging config/crd/bases/operator.knative.dev_knativeservings.yaml
Auto-merging config/crd/bases/operator.knative.dev_knativeeventings.yaml
Applying: Run update-codegen.sh
Applying: Lint error
Applying: Fix unit test
Applying: Add unit test for new field
Applying: Make common function more generic
Using index info to reconstruct a base tree...
M	config/crd/bases/operator.knative.dev_knativeeventings.yaml
M	config/crd/bases/operator.knative.dev_knativeservings.yaml
M	pkg/reconciler/common/ha.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/reconciler/common/ha.go
Auto-merging config/crd/bases/operator.knative.dev_knativeservings.yaml
Auto-merging config/crd/bases/operator.knative.dev_knativeeventings.yaml
Applying: Rename to workloads
Using index info to reconstruct a base tree...
M	config/crd/bases/operator.knative.dev_knativeeventings.yaml
M	config/crd/bases/operator.knative.dev_knativeservings.yaml
M	pkg/reconciler/common/ha.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/reconciler/common/ha.go
Auto-merging config/crd/bases/operator.knative.dev_knativeservings.yaml
Auto-merging config/crd/bases/operator.knative.dev_knativeeventings.yaml
Applying: Run update codegen
Applying: Rename ComponentsOverride -> Workloads
Applying: Test StatefulSet resource requirements
Applying: Run update-codegen.sh
Applying: Test StatefulSet transform
Applying: Update codegen again
Using index info to reconstruct a base tree...
M	go.mod
Falling back to patching base and 3-way merge...
Auto-merging go.mod
CONFLICT (content): Merge conflict in go.mod
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0013 Update codegen again
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.6

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.

knative-prow-robot avatar Oct 19 '22 06:10 knative-prow-robot

@matzew: #1246 failed to apply on top of branch "release-1.5":

Applying: Add components and deprecate deployments
Using index info to reconstruct a base tree...
M	config/crd/bases/operator.knative.dev_knativeeventings.yaml
M	config/crd/bases/operator.knative.dev_knativeservings.yaml
M	pkg/apis/operator/base/common.go
M	pkg/reconciler/common/ha.go
M	pkg/reconciler/common/transformers.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/reconciler/common/transformers.go
Auto-merging pkg/reconciler/common/ha.go
Removing pkg/reconciler/common/deployments_override.go
Auto-merging pkg/apis/operator/base/common.go
Auto-merging config/crd/bases/operator.knative.dev_knativeservings.yaml
Auto-merging config/crd/bases/operator.knative.dev_knativeeventings.yaml
Applying: Run update-codegen.sh
Applying: Lint error
Applying: Fix unit test
Applying: Add unit test for new field
Applying: Make common function more generic
Using index info to reconstruct a base tree...
M	config/crd/bases/operator.knative.dev_knativeeventings.yaml
M	config/crd/bases/operator.knative.dev_knativeservings.yaml
M	pkg/apis/operator/base/common.go
M	pkg/apis/operator/base/zz_generated.deepcopy.go
M	pkg/reconciler/common/ha.go
M	pkg/reconciler/common/transformers.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/reconciler/common/transformers.go
Auto-merging pkg/reconciler/common/ha.go
Auto-merging pkg/apis/operator/base/zz_generated.deepcopy.go
Auto-merging pkg/apis/operator/base/common.go
Auto-merging config/crd/bases/operator.knative.dev_knativeservings.yaml
Auto-merging config/crd/bases/operator.knative.dev_knativeeventings.yaml
Applying: Rename to workloads
Using index info to reconstruct a base tree...
M	config/crd/bases/operator.knative.dev_knativeeventings.yaml
M	config/crd/bases/operator.knative.dev_knativeservings.yaml
M	pkg/apis/operator/base/common.go
M	pkg/apis/operator/base/zz_generated.deepcopy.go
M	pkg/reconciler/common/ha.go
M	pkg/reconciler/common/transformers.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/reconciler/common/transformers.go
Auto-merging pkg/reconciler/common/ha.go
Auto-merging pkg/apis/operator/base/zz_generated.deepcopy.go
Auto-merging pkg/apis/operator/base/common.go
Auto-merging config/crd/bases/operator.knative.dev_knativeservings.yaml
Auto-merging config/crd/bases/operator.knative.dev_knativeeventings.yaml
Applying: Run update codegen
Applying: Rename ComponentsOverride -> Workloads
Applying: Test StatefulSet resource requirements
Using index info to reconstruct a base tree...
M	pkg/reconciler/common/testdata/manifest.yaml
Falling back to patching base and 3-way merge...
Auto-merging pkg/reconciler/common/testdata/manifest.yaml
CONFLICT (content): Merge conflict in pkg/reconciler/common/testdata/manifest.yaml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0010 Test StatefulSet resource requirements
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.5

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.

knative-prow-robot avatar Oct 19 '22 06:10 knative-prow-robot