Skip to content

Commit 4188951

Browse files
committed
Merge remote-tracking branch 'up/main' into work
2 parents 11369be + c49f6f4 commit 4188951

519 files changed

Lines changed: 16044 additions & 18172 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
name: merge-ruff-120
3+
description: "Reformat code on a feature branch and merge main cleanly after the Ruff line-length increase from 79 to 120 (merged August 7, 2026, commit 0110bb1d273dbe848312d429326b844da9e86d93, PR #5514). Relevant for branches created before August 2026."
4+
---
5+
6+
# Merging main and Reformatting Code (Ruff 120 Line Length)
7+
8+
## Overview
9+
10+
In PR #5514 (merged on August 7, 2026, commit `0110bb1d273dbe848312d429326b844da9e86d93`), OpenTelemetry Python updated its Ruff configuration in `pyproject.toml` to increase `line-length` from 79 to 120 characters and reformatted the entire codebase.
11+
12+
Feature branches created prior to August 7, 2026 (before this commit) will encounter extensive merge conflicts if merged directly. This skill instructs an agent on how to detect this situation and perform a clean multi-step merge without formatting conflict markers.
13+
14+
## Detection: When to Use This Skill
15+
16+
An agent can test whether a branch needs this reformatting workflow:
17+
18+
```bash
19+
# Returns non-zero (exit code 1) if the branch was created BEFORE the Ruff 120 change (August 7, 2026):
20+
git merge-base --is-ancestor 0110bb1d273dbe848312d429326b844da9e86d93 HEAD
21+
```
22+
23+
If the commit is **not** an ancestor of `HEAD`, follow the workflow below.
24+
25+
---
26+
27+
## Workflow
28+
29+
Follow these steps on the contributor's feature branch:
30+
31+
### Step 1: Identify upstream remote, ensure workspace is clean & sync dependencies
32+
33+
First, inspect configured remotes to identify which remote points to the upstream `open-telemetry/opentelemetry-python` repository (typically `upstream` or `origin`):
34+
35+
```bash
36+
git remote -v
37+
```
38+
39+
> **Note**: In a fork-based workflow, `upstream` typically points to `open-telemetry/opentelemetry-python` and `origin` points to the contributor's fork. In direct clones, `origin` points to `open-telemetry/opentelemetry-python`. In the steps below, replace `<remote>` with the name of the remote pointing to `open-telemetry/opentelemetry-python` (e.g., `upstream` or `origin`).
40+
41+
Fetch latest changes and sync dependencies:
42+
43+
```bash
44+
uv sync --frozen --all-packages
45+
git fetch <remote> main
46+
```
47+
48+
### Step 2: Merge the commit before the line-length change
49+
50+
Merge all changes up to the commit immediately *before* the Ruff 120 reformat:
51+
52+
```bash
53+
git merge 0110bb1d273dbe848312d429326b844da9e86d93^
54+
```
55+
56+
Because both sides are still 79-column code, there are zero formatting conflicts. Resolve any real semantic conflicts if present, then commit the merge.
57+
58+
### Step 3: Merge the reformatting commit with `-X ours --no-commit`
59+
60+
Merge the reformat commit, automatically choosing the branch's code on any formatting conflicts and pausing before creating the merge commit:
61+
62+
```bash
63+
git merge -X ours --no-commit 0110bb1d273dbe848312d429326b844da9e86d93
64+
```
65+
66+
### Step 4: Format and lint the branch to 120 columns
67+
68+
Ensure `pyproject.toml` has `line-length = 120` (under `[tool.ruff]`). Use file editing tools or Python to avoid macOS vs Linux `sed -i` incompatibilities:
69+
70+
```bash
71+
python3 -c "import pathlib; p = pathlib.Path('pyproject.toml'); p.write_text(p.read_text().replace('line-length = 79', 'line-length = 120'))"
72+
uv run ruff format
73+
uv run ruff check --fix
74+
```
75+
76+
### Step 5: Finalize the merge commit
77+
78+
```bash
79+
git commit -am "chore: merge Ruff 120 reformat and format branch"
80+
```
81+
82+
### Step 6: Catch up with latest `main`
83+
84+
Merge the rest of `main` from the upstream remote:
85+
86+
```bash
87+
git merge <remote>/main
88+
```

.changelog/5122.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`opentelemetry-exporter-prometheus`: add support to configure Resource attributes as metric labels

.changelog/5202.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
infra: add renovate

.changelog/5351.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`opentelemetry-sdk`: wire the top-level `log_level` field in declarative configuration — when set, maps the OTel `SeverityNumber` value to a Python logging level and applies it to the `opentelemetry` logger so SDK internal diagnostics respect the configured severity.

.changelog/5369.changed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`opentelemetry-exporter-otlp-proto-http`: add a `max_request_size` argument to the OTLP HTTP exporters (traces, logs, metrics); serialized requests larger than the limit are dropped before sending, measured before compression. Defaults to 64 MiB (enabled); set to 0 to disable. Mirrors opentelemetry-go#8157.

.changelog/5374.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`opentelemetry-exporter-otlp-json-http`: add OTLP JSON HTTP exporter package

.changelog/5389.changed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`opentelemetry-exporter-otlp-proto-http`: refactor to use shared opentelemetry-exporter-otlp-common and opentelemetry-exporter-http-transport packages and switch default HTTP backend to urllib3

.changelog/5408.fixed

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
`opentelemetry-configuration`: declarative config environment variable substitution now replaces an unset variable that has no default with an empty value instead of raising an error, per the configuration spec.
2+
Resource attributes whose value resolves to null (an unset `${VAR}` with no default) are skipped with a warning instead of being inserted as a null value.

.changelog/5412.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`opentelemetry-exporter-otlp-json-file`: add OTLP JSON file Docker tests

.changelog/5430.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`opentelemetry-sdk`: fix `View` instrument-name matching so a view configured with an instrument's real (mixed-case) name is applied; matching is now case-insensitive and platform-independent instead of relying on `fnmatch`'s OS-dependent case handling

0 commit comments

Comments
 (0)