Skip to content

Commit

Permalink
Revert "fix: Also build rdkafka with ssl if ssl feature is enabled" (#…
Browse files Browse the repository at this point in the history
…889)

Co-authored-by: Jan Michael Auer <[email protected]>

This PR reverts #881 as the feature-flagging setup broke our development workflow

Reverts #888
Reverts #881

We should find a different solution that does not prevent us from using --all-features.

#skip-changelog
  • Loading branch information
untitaker authored Dec 21, 2020
1 parent 7268c2c commit 69399c8
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 28 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
**Bug Fixes**:

- Make all fields but event-id optional to fix regressions in user feedback ingestion. ([#886](https://github.com/getsentry/relay/pull/886))
- Remove `kafka-ssl` feature because it breaks development workflow on macOS. ([#889](https://github.com/getsentry/relay/pull/889))

## 20.12.1

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.

7 changes: 1 addition & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ ENV BUILD_ARCH=${BUILD_ARCH}
ENV OPENSSL_ARCH=${OPENSSL_ARCH}

ENV BUILD_TARGET=${BUILD_ARCH}-unknown-linux-gnu
# For native-tls
ENV OPENSSL_DIR=/usr/local/build/$BUILD_TARGET
# For rdkafka
ENV OPENSSL_ROOT_DIR=/usr/local/build/$BUILD_TARGET
ENV OPENSSL_STATIC=1

RUN apt-get update \
Expand Down Expand Up @@ -66,9 +63,7 @@ RUN echo "Building OpenSSL" \
FROM getsentry/sentry-cli:1 AS sentry-cli
FROM relay-deps AS relay-builder

# ssl and processing are required for basic functionality in onprem
# kafka-ssl is for free since we already have OpenSSL because we are on Linux
ARG RELAY_FEATURES=ssl,kafka-ssl,processing
ARG RELAY_FEATURES=ssl,processing
ENV RELAY_FEATURES=${RELAY_FEATURES}

COPY --from=sentry-cli /bin/sentry-cli /bin/sentry-cli
Expand Down
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ SHELL=/bin/bash
export RELAY_PYTHON_VERSION := python3
export RELAY_FEATURES := ssl

# This is the subset of --all-features that actually works on OS X. Notably it
# is missing kafka-ssl which would require openssl to be installed on OS X.
export RELAY_DEV_FEATURES := ssl,processing

all: check test
.PHONY: all

Expand All @@ -20,7 +16,7 @@ clean:
# Builds

build: setup-git
cd relay && cargo +stable build --features ${RELAY_DEV_FEATURES}
cargo +stable build --all-features
.PHONY: build

release: setup-git
Expand Down Expand Up @@ -56,7 +52,7 @@ test-rust: setup-git
.PHONY: test-rust

test-rust-all: setup-git
cargo test --workspace --features ${RELAY_DEV_FEATURES}
cargo test --workspace --all-features
.PHONY: test-rust-all

test-python: setup-git setup-venv
Expand Down
1 change: 0 additions & 1 deletion relay-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ publish = false
[features]
default = []
ssl = ["native-tls", "actix-web/tls"]
kafka-ssl = ["rdkafka/ssl"]
processing = [
"minidump",
"rdkafka",
Expand Down
2 changes: 0 additions & 2 deletions relay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ license-file = "../LICENSE"
publish = false

[features]
# See https://getsentry.github.io/relay/relay/#feature-flags for explanation of feature flags
default = ["ssl"]
ssl = ["relay-server/ssl"]
kafka-ssl = ["relay-server/kafka-ssl"]
processing = ["relay-server/processing"]

# Direct dependencies of the main application in `src/`
Expand Down
14 changes: 2 additions & 12 deletions relay/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,9 @@
//!
//! # Feature Flags
//!
//! - `ssl` _(default)_: Enables SSL support for incoming and outgoing HTTP using the [`native-tls`
//! crate](https://crates.io/crates/native-tls). On Windows/Mac this will use the native SSL
//! capabilities while for other platforms OpenSSL is required.
//!
//! Disable this feature to remove the dependency on OpenSSL under Linux.
//!
//! - `ssl` _(default)_: Enables SSL support using `native-tls`.
//! - `processing`: Includes event ingestion and processing functionality. This should only be
//! specified when compiling Relay as Sentry service. Standalone Relays do not need this feature.
//!
//! - `kafka-ssl`: This feature is only relevant in combination with `processing`.
//! The Kafka client `librdkafka` requires OpenSSL on *all* platforms to speak SSL.
//! As this is an extra requirement on Windows and Mac, this is disabled by default.
//! specified when compiling Relay as Sentry service. Standalone Relays do not need this feature.
//!
//! # Workspace Crates
//!
Expand Down

0 comments on commit 69399c8

Please sign in to comment.