Remove experimental checks

Removes experimental checks on existing experimental features.
This commit is contained in:
Chris Roberts 2023-09-08 12:57:06 -07:00
parent a7135c000b
commit 513be177d3
23 changed files with 12 additions and 235 deletions

View File

@ -230,9 +230,7 @@ module Vagrant
# @param [Hash] env Call environment
# @return [Builder] self
def apply_dynamic_updates(env)
if Vagrant::Util::Experimental.feature_enabled?("typed_triggers")
triggers = env[:triggers]
end
triggers = env[:triggers]
# Use a Hook as a convenient interface for injecting
# any applicable trigger actions within the stack
@ -299,7 +297,7 @@ module Vagrant
machine_name = env[:machine].name if env[:machine]
# Start with loading any hook triggers if applicable
if Vagrant::Util::Experimental.feature_enabled?("typed_triggers") && env[:triggers]
if env[:triggers]
if !env[:triggers].find(env[:action_name], :before, machine_name, :hook).empty?
hook.prepend(Vagrant::Action::Builtin::Trigger,
env[:action_name], env[:triggers], :before, :hook)

View File

@ -20,19 +20,6 @@ module Vagrant
attr_accessor :actions, :stack
def initialize(actions, env)
if Vagrant::Util::Experimental.feature_enabled?("typed_triggers")
if env[:trigger_env]
@env = env[:trigger_env]
else
@env = env[:env]
end
machine = env[:machine]
machine_name = machine.name if machine
ui = Vagrant::UI::Prefixed.new(@env.ui, "vagrant")
@triggers = Vagrant::Plugin::V2::Trigger.new(@env, @env.vagrantfile.config.trigger, machine, ui)
end
@stack = []
@actions = actions.map { |m| finalize_action(m, env) }.flatten
@logger = Log4r::Logger.new("vagrant::action::warden")

View File

@ -16,10 +16,8 @@ module Vagrant
@logger = Log4r::Logger.new("vagrant::cli")
@main_args, @sub_command, @sub_args = split_main_and_subcommand(argv)
if Vagrant::Util::Experimental.feature_enabled?("typed_triggers")
ui = Vagrant::UI::Prefixed.new(env.ui, "vagrant")
@triggers = Vagrant::Plugin::V2::Trigger.new(env, env.vagrantfile.config.trigger, nil, ui)
end
ui = Vagrant::UI::Prefixed.new(env.ui, "vagrant")
@triggers = Vagrant::Plugin::V2::Trigger.new(env, env.vagrantfile.config.trigger, nil, ui)
Util::CheckpointClient.instance.setup(env).check
@logger.info("CLI: #{@main_args.inspect} #{@sub_command.inspect} #{@sub_args.inspect}")
@ -65,11 +63,9 @@ module Vagrant
# Initialize and execute the command class, returning the exit status.
result = 0
begin
@triggers.fire(@sub_command, :before, nil, :command) if
Vagrant::Util::Experimental.feature_enabled?("typed_triggers")
@triggers.fire(@sub_command, :before, nil, :command)
result = command_class.new(@sub_args, @env).execute
@triggers.fire(@sub_command, :after, nil, :command) if
Vagrant::Util::Experimental.feature_enabled?("typed_triggers")
@triggers.fire(@sub_command, :after, nil, :command)
rescue Interrupt
@env.ui.info(I18n.t("vagrant.cli_interrupt"))
result = 1

View File

@ -183,10 +183,6 @@ module Vagrant
# Extra env keys are the remaining opts
extra_env = opts.dup
# An environment is required for triggers to function properly. This is
# passed in specifically for the `#Action::Warden` class triggers. We call it
# `:trigger_env` instead of `env` in case it collides with an existing environment
extra_env[:trigger_env] = @env
check_cwd # Warns the UI if the machine was last used on a different dir

View File

@ -408,12 +408,8 @@ module VagrantPlugins
after = options.delete(:after)
end
if Vagrant::Util::Experimental.feature_enabled?("dependency_provisioners")
opts = {before: before, after: after}
prov = VagrantConfigProvisioner.new(name, type.to_sym, **opts)
else
prov = VagrantConfigProvisioner.new(name, type.to_sym)
end
opts = {before: before, after: after}
prov = VagrantConfigProvisioner.new(name, type.to_sym, **opts)
@provisioners << prov
end
@ -479,11 +475,6 @@ module VagrantPlugins
# Add provider config
disk_config.add_provider_config(**provider_options, &block)
if !Vagrant::Util::Experimental.feature_enabled?("disks")
@logger.warn("Disk config defined, but experimental feature is not enabled. To use this feature, enable it with the experimental flag `disks`. Disk will not be added to internal config, and will be ignored.")
return
end
@disks << disk_config
end
@ -504,11 +495,6 @@ module VagrantPlugins
cloud_init_config.set_options(options)
end
if !Vagrant::Util::Experimental.feature_enabled?("cloud_init")
@logger.warn("cloud_init config defined, but experimental feature is not enabled. To use this feature, enable it with the experimental flag `cloud_init`. cloud_init config will not be added to internal config, and will be ignored.")
return
end
@cloud_init_configs << cloud_init_config
end

View File

@ -16,8 +16,6 @@ module VagrantPlugins
def self.cleanup_disks(machine, defined_disks, disk_meta_file)
return if disk_meta_file.values.flatten.empty?
return if !Vagrant::Util::Experimental.feature_enabled?("disks")
handle_cleanup_disk(machine, defined_disks, disk_meta_file["disk"])
# TODO: Floppy and DVD disks
end

View File

@ -18,8 +18,6 @@ module VagrantPlugins
def self.configure_disks(machine, defined_disks)
return {} if defined_disks.empty?
return {} if !Vagrant::Util::Experimental.feature_enabled?("disks")
machine.ui.info(I18n.t("vagrant.cap.configure_disks.start"))
current_disks = machine.provider.driver.list_hdds

View File

@ -16,8 +16,6 @@ module VagrantPlugins
def self.cleanup_disks(machine, defined_disks, disk_meta_file)
return if disk_meta_file.values.flatten.empty?
return if !Vagrant::Util::Experimental.feature_enabled?("disks")
handle_cleanup_disk(machine, defined_disks, disk_meta_file["disk"])
handle_cleanup_dvd(machine, defined_disks, disk_meta_file["dvd"])
# TODO: Floppy disks

View File

@ -18,8 +18,6 @@ module VagrantPlugins
def self.configure_disks(machine, defined_disks)
return {} if defined_disks.empty?
return {} if !Vagrant::Util::Experimental.feature_enabled?("disks")
machine.ui.info(I18n.t("vagrant.cap.configure_disks.start"))
storage_controllers = machine.provider.driver.read_storage_controllers

View File

@ -6,10 +6,6 @@ description: Introduction to using cloud-init with Vagrant
# Vagrant cloud-init
~> **Warning!** This feature is experimental and may break or
change in between releases. Use at your own risk. It currently is not officially
supported or functional.
For examples on how to achieve this, among other use cases, please refer to the [usage](/vagrant/docs/cloud-init/usage)
guide for more information!

View File

@ -6,21 +6,6 @@ description: Various Vagrant Cloud-Init examples
# Basic Usage
~> **Warning!** This feature is experimental and may break or
change in between releases. Use at your own risk. It currently is not officially
supported or functional.
This feature currently requires the experimental flag to be used. To explicitly enable this feature, you can set the experimental flag to:
```
VAGRANT_EXPERIMENTAL="cloud_init,disks"
```
Please note that `VAGRANT_EXPERIMENTAL` is an environment variable. For more
information about this flag visit the [Experimental docs page](/vagrant/docs/experimental)
for more info. Without this flag enabled, any cloud-init configs defined will
not be configured.
Also note that the examples below use the VirtualBox provider, which is the current
supported provider for this feature.

View File

@ -8,20 +8,6 @@ description: |-
# Hyper-V
~> **Warning!** This feature is experimental and may break or
change in between releases. Use at your own risk. It currently is not officially
supported.
This feature currently requires the experimental flag to be used. To explicitly enable this feature, you can set the experimental flag to:
```
VAGRANT_EXPERIMENTAL="disks"
```
Please note that `VAGRANT_EXPERIMENTAL` is an environment variable. For more
information about this flag visit the [Experimental docs page](/vagrant/docs/experimental/)
for more info. Without this flag enabled, any disks defined will not be configured.
Because of how Hyper-V handles disk management, a Vagrant guest _must_ be powered
off for any changes to be applied to a guest. If you make a configuration change
with a guests disk, you will need to `vagrant reload` the guest for any changes

View File

@ -8,20 +8,6 @@ description: |-
# Usage
~> **Warning!** This feature is experimental and may break or
change in between releases. Use at your own risk. It currently is not officially
supported.
This feature currently requires the experimental flag to be used. To explicitly enable this feature, you can set the experimental flag to:
```
VAGRANT_EXPERIMENTAL="disks"
```
Please note that `VAGRANT_EXPERIMENTAL` is an environment variable. For more
information about this flag visit the [Experimental docs page](/vagrant/docs/experimental/)
for more info. Without this flag enabled, any disks defined will not be configured.
For examples of how to use the disk feature with Hyper-V, please refer to the
[general disk usage guide](/vagrant/docs/disks/usage) for more examples.

View File

@ -6,11 +6,6 @@ description: Introduction to Vagrant Disks
# Vagrant Disks
~> **Warning!** This feature is experimental and may break or
change in between releases. Use at your own risk. It currently is not officially
supported. Please refer to the provider specific disk documentation
for more information on how to use and enable this feature.
Vagrant Disks is a feature that allows users to define what mediums should be attached
to their guests, as well as allowing users to resize their primary disk.

View File

@ -6,20 +6,6 @@ description: Various Vagrant Disk examples
# Basic Usage
~> **Warning!** This feature is experimental and may break or
change in between releases. Use at your own risk. It currently is not officially
supported.
This feature currently requires the experimental flag to be used. To explicitly enable this feature, you can set the experimental flag to:
```
VAGRANT_EXPERIMENTAL="disks"
```
Please note that `VAGRANT_EXPERIMENTAL` is an environment variable. For more
information about this flag visit the [Experimental docs page](/vagrant/docs/experimental/)
for more info. Without this flag enabled, any disks defined will not be configured.
Below are some very simple examples of how to use Vagrant Disks with the VirtualBox provider.
## Basic Examples

View File

@ -8,20 +8,6 @@ description: |-
# VirtualBox
~> **Warning!** This feature is experimental and may break or
change in between releases. Use at your own risk. It currently is not officially
supported.
This feature currently requires the experimental flag to be used. To explicitly enable this feature, you can set the experimental flag to:
```
VAGRANT_EXPERIMENTAL="disks"
```
Please note that `VAGRANT_EXPERIMENTAL` is an environment variable. For more
information about this flag visit the [Experimental docs page](/vagrant/docs/experimental/)
for more info. Without this flag enabled, any disks defined will not be configured.
**Vagrant currently only supports VirtualBox version 5.x and newer for configuring and
attaching disks.**

View File

@ -8,20 +8,6 @@ description: |-
# Usage
~> **Warning!** This feature is experimental and may break or
change in between releases. Use at your own risk. It currently is not officially
supported.
This feature currently requires the experimental flag to be used. To explicitly enable this feature, you can set the experimental flag to:
```
VAGRANT_EXPERIMENTAL="disks"
```
Please note that `VAGRANT_EXPERIMENTAL` is an environment variable. For more
information about this flag visit the [Experimental docs page](/vagrant/docs/experimental/)
for more info. Without this flag enabled, any disks defined will not be configured.
For examples of how to use the disk feature with VirtualBox, please refer to the
[general disk usage guide](/vagrant/docs/disks/usage) for more examples.

View File

@ -10,20 +10,6 @@ description: |-
# VMware
~> **Warning!** This feature is experimental and may break or
change in between releases. Use at your own risk. It currently is not officially
supported.
This feature currently requires the experimental flag to be used. To explicitly enable this feature, you can set the experimental flag to:
```
VAGRANT_EXPERIMENTAL="disks"
```
Please note that `VAGRANT_EXPERIMENTAL` is an environment variable. For more
information about this flag visit the [Experimental docs page](/vagrant/docs/experimental/)
for more info. Without this flag enabled, any disks defined will not be configured.
Because of how VMware handles disk management, a Vagrant guest _must_ be powered
off for any changes to be applied to a guest. If you make a configuration change
with a guests disk, you will need to `vagrant reload` the guest for any changes

View File

@ -10,20 +10,6 @@ description: |-
# Usage
~> **Warning!** This feature is experimental and may break or
change in between releases. Use at your own risk. It currently is not officially
supported.
This feature currently requires the experimental flag to be used. To explicitly enable this feature, you can set the experimental flag to:
```
VAGRANT_EXPERIMENTAL="disks"
```
Please note that `VAGRANT_EXPERIMENTAL` is an environment variable. For more
information about this flag visit the [Experimental docs page](/vagrant/docs/experimental/)
for more info. Without this flag enabled, any disks defined will not be configured.
For examples of how to use the disk feature with VMWware, please refer to the
[general disk usage guide](/vagrant/docs/disks/usage) for more examples.

View File

@ -39,25 +39,4 @@ started with Vagrant, you may safely skip this section.
This is a list of all the valid experimental features that Vagrant recognizes:
### `cloud_init`
Enabling this feature allows Vagrant to use the `cloud-init` feature. More
information about these options can be found on the [cloud-init documentation page](/vagrant/docs/cloud-init/usage)
### `dependency_provisioners`
Enabling this feature allows all provisioners to specify `before` and `after`
options. These options allow provisioners to be configured to run before or after
any given "root" provisioner. More information about these options can be found
on the [base provisioner documentation page](/vagrant/docs/provisioning/basic_usage)
### `disks`
Enabling this feature will allow Vagrant to manage and configure virtual hard disks
for certain providers. More information about supported providers and how to
configure disks can be found on the [disk documentation page](/vagrant/docs/disks)
### `typed_triggers`
Enabling this feature allows triggers to recognize and execute `:type` triggers.
More information about how these should be used can be found on the [trigger documentation page](/vagrant/docs/triggers/configuration#trigger-types)
There are currently no experimental features

View File

@ -26,16 +26,11 @@ option is what type a provisioner is:
that _this_ provisioner should run before. If defined as a symbol, its only valid
values are `:each` or `:all`, which makes the provisioner run before each and
every root provisioner, or before all provisioners respectively.
**Note**: This option is currently experimental, so it needs to be explicitly
enabled to work. More info can be found [here](/vagrant/docs/experimental).
- `after` (string or symbol) - The exact name of an already defined provisioner
that _this_ provisioner should run after. If defined as a symbol, its only valid
values are `:each` or `:all`, which makes the provisioner run after each and
every root provisioner, or before all provisioners respectively.
**Note**: This option is currently experimental, so it needs to be explicitly
enabled to work. More info can be found [here](/vagrant/docs/experimental).
* `communicator_required` (boolean) - Specifies the machine must be accessible by
- `communicator_required` (boolean) - Specifies the machine must be accessible by
Vagrant in order to run the provisioner. If set to true, the provisioner will
only run if Vagrant can establish communication with the guest. If set to false
the provisioner will run regardless of Vagrant's ability to communicate with the
@ -259,20 +254,6 @@ end
an advanced topic. If you are just getting started with Vagrant, you can
safely skip this.
~> **Warning!** This feature is still experimental and may break or
change in between releases. Use at your own risk.
This feature currently requires the experimental flag to be used. To explicitly enable this feature, you can set the experimental flag to:
```
VAGRANT_EXPERIMENTAL="dependency_provisioners"
```
Please note that `VAGRANT_EXPERIMENTAL` is an environment variable. For more
information about this flag visit the [Experimental docs page](/vagrant/docs/experimental/)
for more info. Without this flag enabled, provisioners with the `before` and
`after` option will be ignored.
If a provisioner has been configured using the `before` or `after` options, it
is considered a _Dependency Provisioner_. This means it has been configured to
run before or after a _Root Provisioner_, which does not have the `before` or

View File

@ -96,20 +96,6 @@ The trigger class takes various options.
Optionally, it is possible to define a trigger that executes around Vagrant commands,
hooks, and actions.
~> **Warning!** This feature is still experimental and may break or
change in between releases. Use at your own risk.
This feature currently requires the experimental flag to be used. To explicitly enable this feature, you can set the experimental flag to:
```
VAGRANT_EXPERIMENTAL="typed_triggers"
```
Please note that `VAGRANT_EXPERIMENTAL` is an environment variable. For more
information about this flag visit the [Experimental docs page](/vagrant/docs/experimental/)
for more info. Without this flag enabled, triggers with the `:type` option
will be ignored.
A trigger can be one of three types:
- `type` (symbol) - Optional

View File

@ -112,16 +112,14 @@ the name of the synced folder plugin.
constraints.
- `config.vm.cloud_init` - Stores various [cloud_init](/vagrant/docs/cloud-init) configurations
on the machine. **Currently experimental!** Read the documentation for more
information on how to enable this feature.
on the machine.
- `config.vm.communicator` (string) - The communicator type to use to connect to the
guest box. By default this is `"ssh"`, but should be changed to `"winrm"` for
Windows guests.
- `config.vm.disk` - Stores various virtual [disk](/vagrant/docs/disks) configurations
on the machine. **Currently experimental!** Read the documentation for more
information on how to enable this feature.
on the machine.
- `config.vm.graceful_halt_timeout` (integer) - The time in seconds that Vagrant will
wait for the machine to gracefully halt when `vagrant halt` is called.