Skip to content

Commit

Permalink
chore(enterprise)!: Remove enterprise feature (#20468)
Browse files Browse the repository at this point in the history
* chore: Remove `enterprise` feature

* Fix changelog wording
  • Loading branch information
bruceg authored Jun 10, 2024
1 parent 58114f1 commit 4f5c99d
Show file tree
Hide file tree
Showing 21 changed files with 30 additions and 1,787 deletions.
1 change: 0 additions & 1 deletion .github/semantic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ scopes:
- durability # Anything related to the durability of Vector events
- enriching # Anything related to enriching Vector's events with context data
- enrichment_tables # Anything related to the Vector's enrichment tables
- enterprise # Anything related to Vector's enterprise features (Observability Pipelines)
- exceptions # Anything related to Vector's exception events.
- external docs # Anything related to Vector's external, public documentation
- filtering # Anything related to filtering within Vector
Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 19 additions & 40 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,9 @@ num-format = { version = "0.4.4", default-features = false, features = ["with-nu
number_prefix = { version = "0.4.0", default-features = false, features = ["std"], optional = true }
ratatui = { version = "0.26.3", optional = true, default-features = false, features = ["crossterm"] }

# Datadog Pipelines
# Opentelemetry

hex = { version = "0.4.3", default-features = false, optional = true }
sha2 = { version = "0.10.8", default-features = false, optional = true }

# GreptimeDB
greptimedb-client = { git = "https://github.com/GreptimeTeam/greptimedb-ingester-rust.git", rev = "d21dbcff680139ed2065b62100bac3123da7c789", optional = true }
Expand Down Expand Up @@ -405,40 +404,40 @@ ntapi = { git = "https://github.com/MSxDOS/ntapi.git", rev = "24fc1e47677fc9f6e3

[features]
# Default features for *-unknown-linux-gnu and *-apple-darwin
default = ["api", "api-client", "enrichment-tables", "sinks", "sources", "sources-dnstap", "transforms", "unix", "rdkafka?/gssapi-vendored", "enterprise", "secrets"]
default = ["api", "api-client", "enrichment-tables", "sinks", "sources", "sources-dnstap", "transforms", "unix", "rdkafka?/gssapi-vendored", "secrets"]
# Default features for `cargo docs`. The same as `default` but without `rdkafka?/gssapi-vendored` which would require installing libsasl in our doc build environment.
docs = ["api", "api-client", "enrichment-tables", "sinks", "sources", "sources-dnstap", "transforms", "unix", "enterprise", "secrets"]
docs = ["api", "api-client", "enrichment-tables", "sinks", "sources", "sources-dnstap", "transforms", "unix", "secrets"]
# Default features for *-unknown-linux-* which make use of `cmake` for dependencies
default-cmake = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "sources-dnstap", "transforms", "unix", "rdkafka?/gssapi-vendored", "enterprise", "secrets"]
default-cmake = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "sources-dnstap", "transforms", "unix", "rdkafka?/gssapi-vendored", "secrets"]
# Default features for *-pc-windows-msvc
# TODO: Enable SASL https://github.com/vectordotdev/vector/pull/3081#issuecomment-659298042
default-msvc = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "transforms", "enterprise", "secrets"]
default-musl = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "sources-dnstap", "transforms", "unix", "rdkafka?/gssapi-vendored", "enterprise", "secrets"]
default-no-api-client = ["api", "enrichment-tables", "sinks", "sources", "sources-dnstap", "transforms", "unix", "rdkafka?/gssapi-vendored", "enterprise", "secrets"]
default-no-vrl-cli = ["api", "sinks", "sources", "sources-dnstap", "transforms", "unix", "rdkafka?/gssapi-vendored", "enterprise", "secrets"]
default-msvc = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "transforms", "secrets"]
default-musl = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "sources-dnstap", "transforms", "unix", "rdkafka?/gssapi-vendored", "secrets"]
default-no-api-client = ["api", "enrichment-tables", "sinks", "sources", "sources-dnstap", "transforms", "unix", "rdkafka?/gssapi-vendored", "secrets"]
default-no-vrl-cli = ["api", "sinks", "sources", "sources-dnstap", "transforms", "unix", "rdkafka?/gssapi-vendored", "secrets"]
tokio-console = ["dep:console-subscriber", "tokio/tracing"]

# Enables the binary secret-backend-example
secret-backend-example = ["transforms"]

all-logs = ["sinks-logs", "sources-logs", "sources-dnstap", "transforms-logs"]
all-metrics = ["sinks-metrics", "sources-metrics", "transforms-metrics", "enterprise"]
all-metrics = ["sinks-metrics", "sources-metrics", "transforms-metrics"]

# Target specific release features.
# The `make` tasks will select this according to the appropriate triple.
# Use this section to turn off or on specific features for specific triples.
target-aarch64-unknown-linux-gnu = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "sources-dnstap", "transforms", "unix", "enterprise", "secrets"]
target-aarch64-unknown-linux-musl = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "sources-dnstap", "transforms", "unix", "enterprise", "secrets"]
target-armv7-unknown-linux-gnueabihf = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "sources-dnstap", "transforms", "unix", "enterprise", "secrets"]
target-armv7-unknown-linux-musleabihf = ["api", "api-client", "rdkafka?/cmake_build", "enrichment-tables", "sinks", "sources", "sources-dnstap", "transforms", "enterprise", "secrets"]
target-arm-unknown-linux-gnueabi = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "sources-dnstap", "transforms", "unix", "enterprise", "secrets"]
target-arm-unknown-linux-musleabi = ["api", "api-client", "rdkafka?/cmake_build", "enrichment-tables", "sinks", "sources", "sources-dnstap", "transforms", "enterprise", "secrets"]
target-x86_64-unknown-linux-gnu = ["api", "api-client", "rdkafka?/cmake_build", "enrichment-tables", "sinks", "sources", "sources-dnstap", "transforms", "unix", "rdkafka?/gssapi-vendored", "enterprise", "secrets"]
target-x86_64-unknown-linux-musl = ["api", "api-client", "rdkafka?/cmake_build", "enrichment-tables", "sinks", "sources", "sources-dnstap", "transforms", "unix", "enterprise", "secrets"]
target-aarch64-unknown-linux-gnu = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "sources-dnstap", "transforms", "unix", "secrets"]
target-aarch64-unknown-linux-musl = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "sources-dnstap", "transforms", "unix", "secrets"]
target-armv7-unknown-linux-gnueabihf = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "sources-dnstap", "transforms", "unix", "secrets"]
target-armv7-unknown-linux-musleabihf = ["api", "api-client", "rdkafka?/cmake_build", "enrichment-tables", "sinks", "sources", "sources-dnstap", "transforms", "secrets"]
target-arm-unknown-linux-gnueabi = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "sources-dnstap", "transforms", "unix", "secrets"]
target-arm-unknown-linux-musleabi = ["api", "api-client", "rdkafka?/cmake_build", "enrichment-tables", "sinks", "sources", "sources-dnstap", "transforms", "secrets"]
target-x86_64-unknown-linux-gnu = ["api", "api-client", "rdkafka?/cmake_build", "enrichment-tables", "sinks", "sources", "sources-dnstap", "transforms", "unix", "rdkafka?/gssapi-vendored", "secrets"]
target-x86_64-unknown-linux-musl = ["api", "api-client", "rdkafka?/cmake_build", "enrichment-tables", "sinks", "sources", "sources-dnstap", "transforms", "unix", "secrets"]
# Does not currently build
target-powerpc64le-unknown-linux-gnu = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "sources-dnstap", "transforms", "unix", "enterprise", "secrets"]
target-powerpc64le-unknown-linux-gnu = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "sources-dnstap", "transforms", "unix", "secrets"]
# Currently doesn't build due to lack of support for 64-bit atomics
target-powerpc-unknown-linux-gnu = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "sources-dnstap", "transforms", "unix", "enterprise", "secrets"]
target-powerpc-unknown-linux-gnu = ["api", "api-client", "enrichment-tables", "rdkafka?/cmake_build", "sinks", "sources", "sources-dnstap", "transforms", "unix", "secrets"]

# Enables features that work only on systems providing `cfg(unix)`
unix = ["tikv-jemallocator", "allocation-tracing"]
Expand Down Expand Up @@ -763,19 +762,6 @@ sinks-vector = ["sinks-utils-udp", "dep:tonic", "protobuf-build"]
sinks-websocket = ["dep:tokio-tungstenite"]
sinks-webhdfs = ["dep:opendal"]

# Datadog integration
enterprise = [
"dep:hex",
"dep:sha2",
"sinks-datadog_logs",
"sinks-datadog_metrics",
"sources-host_metrics",
"sources-internal_logs",
"sources-internal_metrics",
"transforms-remap",
"transforms-filter",
]

# Identifies that the build is a nightly build
nightly = []

Expand Down Expand Up @@ -913,13 +899,6 @@ vector-unit-test-tests = [
"transforms-reduce",
"sinks-console"
]
enterprise-tests = [
"enterprise",
"sources-demo_logs",
"sinks-blackhole",
"sinks-loki",
"api",
]

component-validation-runner = ["dep:tonic", "sources-internal_logs", "sources-internal_metrics", "sources-vector", "sinks-vector"]
# For now, only include components that implement ValidatableComponent.
Expand Down
1 change: 1 addition & 0 deletions changelog.d/remove-enterprise-feature.breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The deprecated `enterprise` feature and global configuration option has been removed.
2 changes: 0 additions & 2 deletions docs/DEPRECATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ For example:
## To be migrated

## To be removed

- v0.39.0 enterprise_feature The `enterprise` feature has been deprecated and will be removed.
1 change: 0 additions & 1 deletion regression/cases/enterprise_http_to_http/data/.gitkeep

This file was deleted.

16 changes: 0 additions & 16 deletions regression/cases/enterprise_http_to_http/lading/lading.yaml

This file was deleted.

45 changes: 0 additions & 45 deletions regression/cases/enterprise_http_to_http/vector/vector.yaml

This file was deleted.

59 changes: 0 additions & 59 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,11 @@ use std::{num::NonZeroUsize, path::PathBuf, process::ExitStatus, time::Duration}

use exitcode::ExitCode;
use futures::StreamExt;
#[cfg(feature = "enterprise")]
use futures_util::future::BoxFuture;
use once_cell::race::OnceNonZeroUsize;
use tokio::runtime::{self, Runtime};
use tokio::sync::{broadcast::error::RecvError, MutexGuard};
use tokio_stream::wrappers::UnboundedReceiverStream;

#[cfg(feature = "enterprise")]
use crate::config::enterprise::{
attach_enterprise_components, report_configuration, EnterpriseError, EnterpriseMetadata,
EnterpriseReporter,
};
use crate::extra_context::ExtraContext;
#[cfg(feature = "api")]
use crate::{api, internal_events::ApiStarted};
Expand Down Expand Up @@ -46,8 +39,6 @@ pub struct ApplicationConfig {
pub internal_topologies: Vec<RunningTopology>,
#[cfg(feature = "api")]
pub api: config::api::Options,
#[cfg(feature = "enterprise")]
pub enterprise: Option<EnterpriseReporter<BoxFuture<'static, ()>>>,
pub extra_context: ExtraContext,
}

Expand Down Expand Up @@ -86,14 +77,6 @@ impl ApplicationConfig {
config: Config,
extra_context: ExtraContext,
) -> Result<Self, ExitCode> {
// This is ugly, but needed to allow `config` to be mutable for building the enterprise
// features, but also avoid a "does not need to be mutable" warning when the enterprise
// feature is not enabled.
#[cfg(feature = "enterprise")]
let mut config = config;
#[cfg(feature = "enterprise")]
let enterprise = build_enterprise(&mut config, config_paths.clone())?;

#[cfg(feature = "api")]
let api = config.api;

Expand All @@ -109,8 +92,6 @@ impl ApplicationConfig {
internal_topologies: Vec::new(),
#[cfg(feature = "api")]
api,
#[cfg(feature = "enterprise")]
enterprise,
extra_context,
})
}
Expand Down Expand Up @@ -255,8 +236,6 @@ impl Application {
topology: config.topology,
config_paths: config.config_paths.clone(),
require_healthy: root_opts.require_healthy,
#[cfg(feature = "enterprise")]
enterprise_reporter: config.enterprise,
extra_context: config.extra_context,
});

Expand Down Expand Up @@ -511,7 +490,6 @@ pub async fn load_configs(
);

// config::init_log_schema should be called before initializing sources.
#[cfg(not(feature = "enterprise-tests"))]
config::init_log_schema(&config_paths, true).map_err(handle_config_errors)?;

let mut config = config::load_from_paths_with_provider_and_secrets(
Expand All @@ -533,43 +511,6 @@ pub async fn load_configs(
Ok(config)
}

#[cfg(feature = "enterprise")]
// Enable enterprise features, if applicable.
fn build_enterprise(
config: &mut Config,
config_paths: Vec<ConfigPath>,
) -> Result<Option<EnterpriseReporter<BoxFuture<'static, ()>>>, ExitCode> {
if config.enterprise.is_some() {
warn!("DEPRECATED: The `enterprise` feature has been deprecated and will be removed in the next release.");
}

crate::ENTERPRISE_ENABLED
.set(
config
.enterprise
.as_ref()
.map(|e| e.enabled)
.unwrap_or_default(),
)
.expect("double initialization of enterprise enabled flag");

match EnterpriseMetadata::try_from(&*config) {
Ok(metadata) => {
let enterprise = EnterpriseReporter::new();

attach_enterprise_components(config, &metadata);
enterprise.send(report_configuration(config_paths, metadata));

Ok(Some(enterprise))
}
Err(EnterpriseError::MissingApiKey) => {
error!("Enterprise configuration incomplete: missing API key.");
Err(exitcode::CONFIG)
}
Err(_) => Ok(None),
}
}

pub fn init_logging(color: bool, format: LogFormat, log_level: &str, rate: u64) {
let level = get_log_levels(log_level);
let json = match format {
Expand Down
1 change: 0 additions & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ impl RootOpts {
openssl_probe::init_ssl_cert_env_vars();
}

#[cfg(not(feature = "enterprise-tests"))]
crate::metrics::init_global().expect("metrics initialization failed");
}
}
Expand Down
1 change: 0 additions & 1 deletion src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
feature = "sinks-datadog_logs",
feature = "sinks-datadog_metrics",
feature = "sinks-datadog_traces",
feature = "enterprise"
))]
pub mod datadog;

Expand Down
Loading

0 comments on commit 4f5c99d

Please sign in to comment.