Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Remove command removal settings#7084

Merged
2 commits merged intomasterfrom
remove_command_removal_settings
Apr 4, 2019
Merged

Remove command removal settings#7084
2 commits merged intomasterfrom
remove_command_removal_settings

Conversation

@deivid-rodriguez
Copy link
Copy Markdown
Contributor

@deivid-rodriguez deivid-rodriguez commented Mar 31, 2019

What was the end-user problem that led to this PR?

The problem was that the viz_command and console_command settings are not meant to be something configured by users. These commands are going away, we don't want to support optionally keeping them.

What was your diagnosis of the problem?

My diagnosis was that we are using settings for two different things:

  • Different supported behaviors that are configurable by users.
  • Feature flags that allow us developers to easily maintain a single branch of code and making breaking changes more easily, and users to opt-in/out of certain new features/changes.

The second case is valid but it's complicated because we need to commit to provide a proper life cycle for the setting:

  • Allow opting in through the setting.
  • Toggle the setting's default value.
  • Deprecate the value for the setting enabling the old behavior.
  • Deprecate the setting altogether making it a no-op.
  • Finally removing the setting.

I plan to work on that, but I didn't start yet.

Instead, what we've been doing to workaround this is to try to not expose these settings to users by, for example, not documenting them.

However, in my opinion, in this particular case it's best to instead not provide a setting at all, and check for the bundler version directly for whether we should be providing the command. The only extra benefit of providing a feature flag, namely, allowing opting in early to the new behavior, is not necessary here because users can "opt in" anyways by simply not using the deprecated commands.

What is your fix for the problem, implemented in this PR?

My fix is to remove the settings and check for Bundler.feature_flag.bundler_3_mode? instead.

Why did you choose this fix out of the possible options?

I chose this fix because it's simple and it makes it clear that keeping these commands is not something we want to support. They are going away for good.

This setting is not meant to be used by end users. The `viz` command is
going away and we plan to fully remove the code once we only have to
maintain bundler 3 or higher versions. Adding a setting makes it look
like the presence of this command is something "configurable", but it's
not.
This setting is not meant to be used by end users. The `console` command
is going away and we plan to fully remove the code once we only have to
maintain bundler 3 or higher versions. Adding a setting makes it look
like the presence of this command is something "configurable", but it's
not.
Copy link
Copy Markdown

@indirect indirect left a comment

Choose a reason for hiding this comment

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

ghost pushed a commit that referenced this pull request Apr 4, 2019
7084: Remove command removal settings r=indirect a=deivid-rodriguez

### What was the end-user problem that led to this PR?

The problem was that the `viz_command` and `console_command` settings are not meant to be something configured by users. These commands are going away, we don't want to support optionally keeping them.

### What was your diagnosis of the problem?

My diagnosis was that we are using settings for two different things:

* Different supported behaviors that are configurable by users.
* Feature flags that allow us developers to easily maintain a single branch of code and making breaking changes more easily, and users to opt-in/out of certain new features/changes. 

The second case is valid but it's complicated because we need to commit to provide a proper life cycle for the setting:
* Allow opting in through the setting.
* Toggle the setting's default value.
* Deprecate the value for the setting enabling the old behavior.
* Deprecate the setting altogether making it a no-op.
* Finally removing the setting.

I plan to work on that, but I didn't start yet.

Instead, what we've been doing to workaround this is to try to not expose these settings to users by, for example, not documenting them.

However, in my opinion, in this particular case it's best to instead not provide a setting at all, and check for the bundler version directly for whether we should be providing the command. The only extra benefit of providing a feature flag, namely, allowing opting in early to the new behavior, is not necessary here because users can "opt in" anyways by simply not using the deprecated commands.

### What is your fix for the problem, implemented in this PR?

My fix is to remove the settings and check for `Bundler.feature_flag.bundler_3_mode?` instead.

### Why did you choose this fix out of the possible options?

I chose this fix because it's simple and it makes it clear that keeping these commands and not something we want to support. They are going away for good.


Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
@ghost
Copy link
Copy Markdown

ghost commented Apr 4, 2019

Build succeeded

@ghost ghost merged commit 714d2c7 into master Apr 4, 2019
@ghost ghost deleted the remove_command_removal_settings branch April 4, 2019 16:25
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants