Skip to content

Commit d22fdff

Browse files
committed
Merge branch 'master' into feat/indexed-transactions-limiting
* master: fix(gha): Skip Sentry integration tests on library release builds (#1550) ref: Use wildcard re-exports where applicable (#1526) ci(gha): Skip Sentry integration tests on library release builds (#1549) release: 0.8.15 fix(py): Respect the renormalize flag (#1548) (fix)e2e: Use report self hosted issues env variable (#1539) meta(vscode): Enable all features in Rust-Analyzer (#1542) release: 0.8.14 build(craft): Fix manylinux artifact name (#1547)
2 parents 12ce116 + 6a28933 commit d22fdff

File tree

15 files changed

+182
-167
lines changed

15 files changed

+182
-167
lines changed

.github/workflows/ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ jobs:
300300
runs-on: ubuntu-latest
301301
timeout-minutes: 25
302302

303+
# Skip redundant checks for library releases
304+
if: "!startsWith(github.ref, 'refs/heads/release-library/')"
305+
303306
steps:
304307
- name: Checkout Relay
305308
uses: actions/checkout@v3

.vscode/settings.json

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"python.formatting.provider": "black",
1616

1717
// Rust Analyzer
18+
"rust-analyzer.cargo.features": "all",
1819
"rust-analyzer.checkOnSave.command": "clippy",
1920
"rust-analyzer.imports.granularity.group": "module",
2021
"rust-analyzer.imports.prefix": "crate",

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cloudbuild.yaml

+58-63
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,24 @@ steps:
1515
1616
- name: "gcr.io/cloud-builders/docker"
1717
entrypoint: "bash"
18-
args:
19-
[
20-
"-c",
21-
"docker pull us.gcr.io/$PROJECT_ID/relay:nightly || true"
22-
]
18+
args: ["-c", "docker pull us.gcr.io/$PROJECT_ID/relay:nightly || true"]
2319

2420
# Pull the image with the first build stage
2521
- name: "gcr.io/cloud-builders/docker"
2622
entrypoint: "bash"
27-
args:
28-
[
29-
"-c",
30-
"docker pull us.gcr.io/$PROJECT_ID/relay:deps || true"
31-
]
23+
args: ["-c", "docker pull us.gcr.io/$PROJECT_ID/relay:deps || true"]
3224

3325
# Build the first stage
3426
- name: "gcr.io/cloud-builders/docker"
3527
args:
3628
[
3729
"build",
38-
"--target", "relay-deps",
39-
"-t", "us.gcr.io/$PROJECT_ID/relay:deps",
40-
"--cache-from", "us.gcr.io/$PROJECT_ID/relay:deps",
30+
"--target",
31+
"relay-deps",
32+
"-t",
33+
"us.gcr.io/$PROJECT_ID/relay:deps",
34+
"--cache-from",
35+
"us.gcr.io/$PROJECT_ID/relay:deps",
4136
".",
4237
]
4338

@@ -46,58 +41,58 @@ steps:
4641
args:
4742
[
4843
"build",
49-
"-t", "us.gcr.io/$PROJECT_ID/relay:nightly",
50-
"-t", "us.gcr.io/$PROJECT_ID/relay:$COMMIT_SHA",
51-
"--cache-from", "us.gcr.io/$PROJECT_ID/relay:deps",
52-
"--cache-from", "us.gcr.io/$PROJECT_ID/relay:nightly",
44+
"-t",
45+
"us.gcr.io/$PROJECT_ID/relay:nightly",
46+
"-t",
47+
"us.gcr.io/$PROJECT_ID/relay:$COMMIT_SHA",
48+
"--cache-from",
49+
"us.gcr.io/$PROJECT_ID/relay:deps",
50+
"--cache-from",
51+
"us.gcr.io/$PROJECT_ID/relay:nightly",
5352
".",
5453
]
5554

5655
# We push the image to GCR since the Sentry integration tests are polling
5756
- name: "gcr.io/cloud-builders/docker"
58-
args:
59-
[
60-
"push",
61-
"us.gcr.io/$PROJECT_ID/relay:$COMMIT_SHA"
62-
]
57+
args: ["push", "us.gcr.io/$PROJECT_ID/relay:$COMMIT_SHA"]
6358

64-
# On-premise Integration tests
65-
- name: 'gcr.io/$PROJECT_ID/docker-compose'
66-
entrypoint: 'bash'
59+
# Self-hosted Integration tests
60+
- name: "gcr.io/$PROJECT_ID/docker-compose"
61+
entrypoint: "bash"
6762
env:
68-
- 'RELAY_IMAGE=us.gcr.io/$PROJECT_ID/relay:$COMMIT_SHA'
69-
- 'SENTRY_TEST_HOST=http://nginx'
70-
- 'CI=1'
63+
- "RELAY_IMAGE=us.gcr.io/$PROJECT_ID/relay:$COMMIT_SHA"
64+
- "SENTRY_TEST_HOST=http://nginx"
65+
- "CI=1"
66+
- "REPORT_SELF_HOSTED_ISSUES=0"
7167
args:
72-
- '-e'
73-
- '-c'
74-
- |
75-
mkdir self-hosted && cd self-hosted
76-
echo "no" > .reporterrors
77-
curl -L "https://github.com/getsentry/self-hosted/archive/master.tar.gz" | tar xzf - --strip-components=1
78-
# The following trick is from https://stackoverflow.com/a/52400857/90297 with great gratuity
79-
echo '{"version": "3.4", "networks":{"default":{"external":{"name":"cloudbuild"}}}}' > docker-compose.override.yml
80-
./install.sh
81-
./test.sh || docker-compose logs nginx web relay
68+
- "-e"
69+
- "-c"
70+
- |
71+
mkdir self-hosted && cd self-hosted
72+
curl -L "https://github.com/getsentry/self-hosted/archive/master.tar.gz" | tar xzf - --strip-components=1
73+
# The following trick is from https://stackoverflow.com/a/52400857/90297 with great gratuity
74+
echo '{"version": "3.4", "networks":{"default":{"external":{"name":"cloudbuild"}}}}' > docker-compose.override.yml
75+
./install.sh
76+
./test.sh || docker-compose logs nginx web relay
8277
timeout: 900s
8378

84-
- name: 'gcr.io/cloud-builders/docker'
85-
secretEnv: ['DOCKER_PASSWORD']
86-
entrypoint: 'bash'
79+
- name: "gcr.io/cloud-builders/docker"
80+
secretEnv: ["DOCKER_PASSWORD"]
81+
entrypoint: "bash"
8782
args:
88-
- '-e'
89-
- '-c'
90-
- |
91-
# Only push to Docker Hub from master
92-
[ "$BRANCH_NAME" != "master" ] && exit 0
93-
docker push us.gcr.io/$PROJECT_ID/relay:nightly
94-
echo "$$DOCKER_PASSWORD" | docker login --username=sentrybuilder --password-stdin
95-
docker tag us.gcr.io/$PROJECT_ID/relay:$COMMIT_SHA getsentry/relay:$SHORT_SHA
96-
docker push getsentry/relay:$SHORT_SHA
97-
docker tag us.gcr.io/$PROJECT_ID/relay:$COMMIT_SHA getsentry/relay:$COMMIT_SHA
98-
docker push getsentry/relay:$COMMIT_SHA
99-
docker tag us.gcr.io/$PROJECT_ID/relay:$COMMIT_SHA getsentry/relay:nightly
100-
docker push getsentry/relay:nightly
83+
- "-e"
84+
- "-c"
85+
- |
86+
# Only push to Docker Hub from master
87+
[ "$BRANCH_NAME" != "master" ] && exit 0
88+
docker push us.gcr.io/$PROJECT_ID/relay:nightly
89+
echo "$$DOCKER_PASSWORD" | docker login --username=sentrybuilder --password-stdin
90+
docker tag us.gcr.io/$PROJECT_ID/relay:$COMMIT_SHA getsentry/relay:$SHORT_SHA
91+
docker push getsentry/relay:$SHORT_SHA
92+
docker tag us.gcr.io/$PROJECT_ID/relay:$COMMIT_SHA getsentry/relay:$COMMIT_SHA
93+
docker push getsentry/relay:$COMMIT_SHA
94+
docker tag us.gcr.io/$PROJECT_ID/relay:$COMMIT_SHA getsentry/relay:nightly
95+
docker push getsentry/relay:nightly
10196
10297
images:
10398
[
@@ -107,13 +102,13 @@ images:
107102
timeout: 3600s
108103
options:
109104
# Run on bigger machines
110-
machineType: 'E2_HIGHCPU_8'
105+
machineType: "E2_HIGHCPU_8"
111106
secrets:
112-
- kmsKeyName: projects/sentryio/locations/global/keyRings/service-credentials/cryptoKeys/cloudbuild
113-
secretEnv:
114-
# This is a personal access token for the sentrybuilder account, encrypted using the
115-
# short guide at http://bit.ly/2Pg6uw9
116-
DOCKER_PASSWORD: |
117-
CiQAE8gN7y3OMxn+a1kofmK4Bi8jQZtdRFj2lYYwaZHVeIIBUzMSTQA9tvn8XCv2vqj6u8CHoeSP
118-
TVW9pLvSCorKoeNtOp0eb+6V1yNJW/+JC07DNO1KLbTbodbuza6jKJHU5xeAJ4kGQI78UY5Vu1Gp
119-
QcMK
107+
- kmsKeyName: projects/sentryio/locations/global/keyRings/service-credentials/cryptoKeys/cloudbuild
108+
secretEnv:
109+
# This is a personal access token for the sentrybuilder account, encrypted using the
110+
# short guide at http://bit.ly/2Pg6uw9
111+
DOCKER_PASSWORD: |
112+
CiQAE8gN7y3OMxn+a1kofmK4Bi8jQZtdRFj2lYYwaZHVeIIBUzMSTQA9tvn8XCv2vqj6u8CHoeSP
113+
TVW9pLvSCorKoeNtOp0eb+6V1yNJW/+JC07DNO1KLbTbodbuza6jKJHU5xeAJ4kGQI78UY5Vu1Gp
114+
QcMK

py/.craft.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ targets:
1717
requireNames:
1818
- /^sentry_relay-.*-py2\.py3-none-macosx_10_15_x86_64.whl$/
1919
- /^sentry_relay-.*-py2\.py3-none-macosx_11_0_arm64.whl$/
20-
- /^sentry_relay-.*-py2\.py3-none-.*manylinux2010_i686.*\.whl$/
21-
- /^sentry_relay-.*-py2\.py3-none-.*manylinux2010_x86_64.*\.whl$/
20+
- /^sentry_relay-.*-py2\.py3-none-.*manylinux2014_i686.*\.whl$/
21+
- /^sentry_relay-.*-py2\.py3-none-.*manylinux2014_x86_64.*\.whl$/
2222
- /^sentry_relay-.*-py2\.py3-none-.*manylinux2014_aarch64.*\.whl$/
2323
- /^sentry-relay-.*\.zip$/

py/CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Changelog
22

3-
## Unreleased
3+
## 0.8.15
4+
5+
- Restore correct behavior when `is_renormalize` is specified on `normalize_event`. ([#1548](https://github.com/getsentry/relay/pull/1548))
6+
7+
## 0.8.14
8+
9+
**Warning:** This release contains a regression. Please update to a more recent version.
410

511
- Add `transaction_info` to event payloads, including the transaction's source and internal original transaction name. ([#1330](https://github.com/getsentry/relay/pull/1330))
612
- Add user-agent parsing to replays processor. ([#1420](https://github.com/getsentry/relay/pull/1420))

relay-cabi/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "relay-cabi"
3-
version = "0.8.13"
3+
version = "0.8.15"
44
authors = ["Sentry <[email protected]>"]
55
homepage = "https://getsentry.github.io/relay/"
66
repository = "https://github.com/getsentry/relay"

relay-cabi/src/processing.rs

+10-3
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,17 @@ pub unsafe extern "C" fn relay_store_normalizer_normalize_event(
109109
) -> RelayStr {
110110
let processor = normalizer as *mut StoreProcessor;
111111
let mut event = Annotated::<Event>::from_json((*event).as_str())?;
112+
let config = (*processor).config();
112113
let light_normalization_config = LightNormalizationConfig {
113-
normalize_user_agent: (*processor).config().normalize_user_agent,
114-
is_renormalize: (*processor).config().is_renormalize.unwrap_or(false),
115-
..Default::default()
114+
client_ip: config.client_ip.as_ref(),
115+
user_agent: config.user_agent.as_deref(),
116+
received_at: config.received_at,
117+
max_secs_in_past: config.max_secs_in_past,
118+
max_secs_in_future: config.max_secs_in_future,
119+
measurements_config: None, // only supported in relay
120+
breakdowns_config: None, // only supported in relay
121+
normalize_user_agent: config.normalize_user_agent,
122+
is_renormalize: config.is_renormalize.unwrap_or(false),
116123
};
117124
light_normalize_event(&mut event, &light_normalization_config)?;
118125
process_value(&mut event, &mut *processor, ProcessingState::root())?;

relay-general/src/pii/mod.rs

+7-10
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,11 @@ mod redactions;
1313
mod regexes;
1414
mod utils;
1515

16-
pub use self::attachments::{PiiAttachmentsProcessor, ScrubEncodings};
17-
pub use self::compiledconfig::CompiledPiiConfig;
18-
pub use self::config::{
19-
AliasRule, MultipleRule, Pattern, PatternRule, PiiConfig, PiiConfigError, RedactPairRule,
20-
RuleSpec, RuleType, Vars,
21-
};
16+
pub use self::attachments::*;
17+
pub use self::compiledconfig::*;
18+
pub use self::config::*;
2219
pub use self::generate_selectors::selector_suggestions_from_value;
23-
pub use self::legacy::DataScrubbingConfig;
24-
pub use self::minidumps::ScrubMinidumpError;
25-
pub use self::processor::PiiProcessor;
26-
pub use self::redactions::{Redaction, ReplaceRedaction};
20+
pub use self::legacy::*;
21+
pub use self::minidumps::*;
22+
pub use self::processor::*;
23+
pub use self::redactions::*;

relay-general/src/processor/mod.rs

+6-9
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@ mod selector;
88
mod size;
99
mod traits;
1010

11-
pub use self::attrs::{
12-
BagSize, CharacterSet, FieldAttrs, MaxChars, Path, Pii, ProcessingState, UnknownValueTypeError,
13-
ValueType,
14-
};
15-
pub use self::chunks::{join_chunks, process_chunked_value, split_chunks, Chunk};
16-
pub use self::funcs::process_value;
17-
pub use self::selector::{SelectorPathItem, SelectorSpec};
18-
pub use self::size::{estimate_size, estimate_size_flat};
19-
pub use self::traits::{ProcessValue, Processor};
11+
pub use self::attrs::*;
12+
pub use self::chunks::*;
13+
pub use self::funcs::*;
14+
pub use self::selector::*;
15+
pub use self::size::*;
16+
pub use self::traits::*;

relay-general/src/protocol/mod.rs

+27-43
Original file line numberDiff line numberDiff line change
@@ -32,48 +32,32 @@ mod user_report;
3232

3333
pub use sentry_release_parser::{validate_environment, validate_release};
3434

35-
pub use self::breadcrumb::Breadcrumb;
36-
pub use self::breakdowns::Breakdowns;
37-
pub use self::client_report::{ClientReport, DiscardedEvent};
38-
pub use self::clientsdk::{ClientSdkInfo, ClientSdkPackage};
39-
pub use self::constants::VALID_PLATFORMS;
40-
pub use self::contexts::{
41-
AppContext, BrowserContext, Context, ContextInner, Contexts, DeviceContext, GpuContext,
42-
OperationType, OsContext, ResponseContext, RuntimeContext, SpanId, SpanStatus, TraceContext,
43-
TraceId,
44-
};
45-
pub use self::debugmeta::{
46-
AppleDebugImage, CodeId, DebugId, DebugImage, DebugMeta, NativeDebugImage, NativeImagePath,
47-
SystemSdkInfo,
48-
};
49-
pub use self::event::{
50-
Event, EventId, EventProcessingError, EventType, ExtraValue, GroupingConfig,
51-
ParseEventTypeError,
52-
};
53-
pub use self::exception::Exception;
54-
pub use self::fingerprint::Fingerprint;
55-
pub use self::logentry::{LogEntry, Message};
56-
pub use self::measurements::{Measurement, Measurements};
57-
pub use self::mechanism::{CError, MachException, Mechanism, MechanismMeta, PosixSignal};
58-
pub use self::metrics::{Metrics, SampleRate};
59-
pub use self::relay_info::RelayInfo;
60-
pub use self::request::{Cookies, HeaderName, HeaderValue, Headers, Query, Request};
35+
pub use self::breadcrumb::*;
36+
pub use self::breakdowns::*;
37+
pub use self::client_report::*;
38+
pub use self::clientsdk::*;
39+
pub use self::constants::*;
40+
pub use self::contexts::*;
41+
pub use self::debugmeta::*;
42+
pub use self::event::*;
43+
pub use self::exception::*;
44+
pub use self::fingerprint::*;
45+
pub use self::logentry::*;
46+
pub use self::measurements::*;
47+
pub use self::mechanism::*;
48+
pub use self::metrics::*;
49+
pub use self::relay_info::*;
50+
pub use self::request::*;
6151
#[cfg(feature = "jsonschema")]
6252
pub use self::schema::event_json_schema;
63-
pub use self::security_report::{Csp, ExpectCt, ExpectStaple, Hpkp, SecurityReportType};
64-
pub use self::session::{
65-
ParseSessionStatusError, SessionAggregateItem, SessionAggregates, SessionAttributes,
66-
SessionErrored, SessionLike, SessionStatus, SessionUpdate,
67-
};
68-
pub use self::span::Span;
69-
pub use self::stacktrace::{Frame, FrameData, FrameVars, RawStacktrace, Stacktrace};
70-
pub use self::tags::{TagEntry, Tags};
71-
pub use self::templateinfo::TemplateInfo;
72-
pub use self::thread::{Thread, ThreadId};
73-
pub use self::transaction::{TransactionInfo, TransactionSource};
74-
pub use self::types::{
75-
datetime_to_timestamp, Addr, AsPair, InvalidRegVal, IpAddr, JsonLenientString, LenientString,
76-
Level, PairList, ParseLevelError, RegVal, Timestamp, Values,
77-
};
78-
pub use self::user::{Geo, User};
79-
pub use self::user_report::UserReport;
53+
pub use self::security_report::*;
54+
pub use self::session::*;
55+
pub use self::span::*;
56+
pub use self::stacktrace::*;
57+
pub use self::tags::*;
58+
pub use self::templateinfo::*;
59+
pub use self::thread::*;
60+
pub use self::transaction::*;
61+
pub use self::types::*;
62+
pub use self::user::*;
63+
pub use self::user_report::*;

relay-general/src/store/mod.rs

+5-13
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,11 @@ mod schema;
2020
mod transactions;
2121
mod trimming;
2222

23-
pub use self::clock_drift::ClockDriftProcessor;
24-
pub use self::geo::{GeoIpError, GeoIpLookup};
25-
pub use normalize::breakdowns::{
26-
get_breakdown_measurements, BreakdownConfig, BreakdownsConfig, SpanOperationsConfig,
27-
};
28-
pub use normalize::{
29-
compute_measurements, is_valid_platform, light_normalize_event, normalize_dist,
30-
LightNormalizationConfig, MeasurementsConfig,
31-
};
32-
pub use transactions::{
33-
get_measurement, get_transaction_op, is_high_cardinality_sdk, validate_timestamps,
34-
validate_transaction,
35-
};
23+
pub use self::clock_drift::*;
24+
pub use self::geo::*;
25+
pub use normalize::breakdowns::*;
26+
pub use normalize::*;
27+
pub use transactions::*;
3628

3729
/// The config for store.
3830
#[derive(Serialize, Deserialize, Debug, Default)]

0 commit comments

Comments
 (0)