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

Mark --inject-broker flag as deprecated #1661

Merged
merged 1 commit into from
Apr 28, 2022

Conversation

dsimansk
Copy link
Contributor

Description

Per Eventing change in Sugar controller config, user need to enable the behavior.

@rhuss maybe we should considere adding label flag to trigger creation instread of hardcoded name.

Changes

  • Mark --inject-broker flag as deprecated

Reference

Fixes #1629

client git:(pr/deprecate-inject-broker) kn trigger create broker-trigger --inject-broker --sink ksvc:broker-display --filter type=dev.knative.sources.ping
Flag --inject-broker has been deprecated, effective since 1.4 and will be removed in 1.6 release. 
Please refer to 'Automatic Broker Creation' section for configuration options, https://knative.dev/docs/eventing/sugar/#automatic-broker-creation.

Copy link

@knative-prow knative-prow bot left a comment

Choose a reason for hiding this comment

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

@dsimansk: 0 warnings.

In response to this:

Description

Per Eventing change in Sugar controller config, user need to enable the behavior.

@rhuss maybe we should considere adding label flag to trigger creation instread of hardcoded name.

Changes

  • Mark --inject-broker flag as deprecated

Reference

Fixes #1629

client git:(pr/deprecate-inject-broker) kn trigger create broker-trigger --inject-broker --sink ksvc:broker-display --filter type=dev.knative.sources.ping
Flag --inject-broker has been deprecated, effective since 1.4 and will be removed in 1.6 release. 
Please refer to 'Automatic Broker Creation' section for configuration options, https://knative.dev/docs/eventing/sugar/#automatic-broker-creation.

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 knative-prow bot 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 Apr 25, 2022
@codecov
Copy link

codecov bot commented Apr 25, 2022

Codecov Report

Merging #1661 (9be2d20) into main (736c7c2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1661   +/-   ##
=======================================
  Coverage   79.48%   79.49%           
=======================================
  Files         171      171           
  Lines       12963    12969    +6     
=======================================
+ Hits        10304    10310    +6     
  Misses       1941     1941           
  Partials      718      718           
Impacted Files Coverage Δ
pkg/kn/commands/trigger/update_flags.go 100.00% <100.00%> (ø)

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 736c7c2...9be2d20. Read the comment docs.

@dsimansk dsimansk force-pushed the pr/deprecate-inject-broker branch from eeb41e4 to 9be2d20 Compare April 25, 2022 16:42
@knative-prow knative-prow bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 25, 2022
cmd.Flags().BoolVar(&f.InjectBroker, "inject-broker", false, "Create new broker with name default through common annotation")
cmd.Flags().MarkDeprecated("inject-broker", "effective since 1.4 and will be removed in 1.6 release. \n"+
"Please refer to 'Automatic Broker Creation' section for configuration options, "+
"https://knative.dev/docs/eventing/sugar/#automatic-broker-creation.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add the recommendation to create a Broker directly via kn broker create, because that is what a user can do. I think we shouldn't really think about automatic broker creation on this level.

So maybe this a description:

Automatic broker creation is deprecated and might not work anymore for Knative >= 1.4 (depending on server-side configuration). Please manage brokers directly with the `kn broker` commands.

I wouldn't mention that this is deprecated since client 1.4, I think its good enough to know that it's deprecated for the currently used version ;-). Also wouldn't put in links in the help message if not absolutely needed as we can't be sure that this link will stay stable over time.

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, I was thinking about how stable those links might be.

Does it look better? (the prefix is part of cobra MarkDeprecated function)

Flag --inject-broker has been deprecated, automatic broker creation might not work anymore for Knative >= 1.4 (depending on server-side configuration). 
Please manage brokers directly with the `kn broker` commands.

Copy link
Contributor

Choose a reason for hiding this comment

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

looks good, thanks !

/approve
/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 28, 2022
@knative-prow
Copy link

knative-prow bot commented Apr 28, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dsimansk, rhuss

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 knative-prow bot merged commit 93e27f7 into knative:main Apr 28, 2022
@dsimansk
Copy link
Contributor Author

/cherry-pick release-1.4

@knative-prow-robot
Copy link
Contributor

@dsimansk: new pull request created: #1665

In response to this:

/cherry-pick release-1.4

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. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change to Sugar Controller will impact inject Broker functionality option of "Kn trigger create"
3 participants