Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ permissions:
id-token: write
contents: read

env:
DO_NOT_TRACK: "1"

jobs:
setup:
strategy:
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
## 0.25.3-dev0
## 0.26.0

### Fixes

- **Restore default-on library-load telemetry**: The lightweight library-load ping once again runs by default when `unstructured` is imported. Set either `DO_NOT_TRACK` or `SCARF_NO_ANALYTICS` to any non-empty value (after trimming whitespace) before import to disable it; empty and whitespace-only values retain the default behavior. This removes the `UNSTRUCTURED_TELEMETRY_ENABLED` explicit opt-in gate introduced by #4281 while preserving the existing endpoint and payload. The best-effort `nvidia-smi` GPU probe now has a one-second timeout, and GPU-probe and request failures remain non-fatal.
Comment thread
cragwolfe marked this conversation as resolved.

- **Stop the `GLOBAL_WORKING_DIR` tests from disturbing other pytest-xdist workers**: test-only change, no library behavior changes. The two tests exercising `GLOBAL_WORKING_DIR_ENABLED` now redirect the working dir to a private `tmp_path` and restore `tempfile.tempdir` unconditionally, rather than moving the shared pgid-keyed directory aside mid-run and leaving the worker's `tempfile.tempdir` pointed at it. That shared path made `test_dockerfile` fail intermittently, with an unrelated test dying inside `tempfile`.

## 0.25.2
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ docker-test:
-v ${CURRENT_DIR}/test_unstructured:/home/notebook-user/test_unstructured \
-v ${CURRENT_DIR}/test_unstructured_ingest:/home/notebook-user/test_unstructured_ingest \
$(if $(wildcard uns_test_env_file),--env-file uns_test_env_file,) \
--env DO_NOT_TRACK=1 \
$(DOCKER_IMAGE) \
bash -c "uv sync --locked --all-extras --group test --no-install-project && \
CI=$(CI) \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,4 +290,4 @@ Encountered a bug? Please create a new [GitHub issue](https://github.com/Unstruc

## :chart_with_upwards_trend: Analytics

Telemetry is **off by default**. To opt in, set `UNSTRUCTURED_TELEMETRY_ENABLED=true` (or `=1`) before importing `unstructured`. To opt out, set `DO_NOT_TRACK` or `SCARF_NO_ANALYTICS` to any non-empty value (e.g. `true`, `1`, `yes`, `false`, `0`—any non-empty string opts out); opt-out takes precedence. Unset the variable or leave it empty if you do not want to opt out. See our [Privacy Policy](https://unstructured.io/privacy-policy).
Unstructured sends a lightweight library-load analytics ping by default when it is imported. To opt out before importing `unstructured`, set either `DO_NOT_TRACK` or `SCARF_NO_ANALYTICS` to any non-empty value after trimming whitespace (for example, `true`, `1`, `yes`, `false`, or `0`); either variable disables the ping. Unset the variables or leave them empty or whitespace-only to retain the default behavior. See our [Privacy Policy](https://unstructured.io/privacy-policy).
6 changes: 6 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""Global test configuration."""

import os

# Package import telemetry is default-on; force ordinary test collection to opt out.
os.environ["DO_NOT_TRACK"] = "1"
5 changes: 1 addition & 4 deletions scripts/image/test-outbound-connectivity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,12 @@ fi

# ---------- scenario‑specific settings --------------------------------
DO_NOT_TRACK=""
UNSTRUCTURED_TELEMETRY_ENABLED=""
HF_HUB_OFFLINE=""
REMOVE_CACHE=0
case "$SCENARIO" in
baseline) ;;
missing-models) REMOVE_CACHE=1 ;;
analytics-online-only)
UNSTRUCTURED_TELEMETRY_ENABLED=1
HF_HUB_OFFLINE=1
;;
offline)
Expand All @@ -93,7 +91,6 @@ CID=$(docker run -d --rm --name "sut_${SCENARIO}" \
--network "$NET" \
--cap-add NET_RAW --cap-add NET_ADMIN \
-e DO_NOT_TRACK="$DO_NOT_TRACK" \
-e UNSTRUCTURED_TELEMETRY_ENABLED="$UNSTRUCTURED_TELEMETRY_ENABLED" \
-e HF_HUB_OFFLINE="$HF_HUB_OFFLINE" \
--entrypoint /bin/sh "$IMAGE" -c "sleep infinity")
echo "Container: $CID (scenario $SCENARIO)"
Expand Down Expand Up @@ -132,7 +129,7 @@ fi

docker exec -i -e PYTHONUNBUFFERED=1 "$CID" python - <<PY |& tee "${PY_LOG_DIR}/${SCENARIO}.log"
import logging
# Telemetry runs at package init when UNSTRUCTURED_TELEMETRY_ENABLED is set (see analytics-online-only scenario).
# Telemetry runs at package init unless the scenario sets DO_NOT_TRACK.
from unstructured.partition.auto import partition
import urllib.request, time, os, sys

Expand Down
Loading
Loading