Skip to content

Use a no-op timestamp for exclude-newer in lockfiles when a relative value is configured#19022

Merged
zanieb merged 3 commits intoastral-sh:mainfrom
zaniebot:claude/add-noop-timestamp-test-ZXAFH
Apr 20, 2026
Merged

Use a no-op timestamp for exclude-newer in lockfiles when a relative value is configured#19022
zanieb merged 3 commits intoastral-sh:mainfrom
zaniebot:claude/add-noop-timestamp-test-ZXAFH

Conversation

@zanieb
Copy link
Copy Markdown
Member

@zanieb zanieb commented Apr 16, 2026

Closes #18708

This is a backwards compatible approach to resolve the issue where this timestamp is causing merge conflicts.

This has no effect other than eliding the timestamp that was used for resolution. This value is write-only when using relative exclude-newer values.


[options]
exclude-newer = "2024-04-17T00:00:00Z"
exclude-newer = "2024-04-17T00:00:00Z" # This has no effect and is included for backwards compatibility when using relative exclude-newer values.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment is probably too long?

@zanieb zanieb marked this pull request as ready for review April 16, 2026 14:39
Copy link
Copy Markdown
Member

@zsol zsol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused. This PR seems to only add a comment to the timestamp field, as well as a test case that establishes that when a no-op timestamp is present, it behaves accordingly.

But it does not actually change uv to add a no-op timestamp.

@zanieb
Copy link
Copy Markdown
Member Author

zanieb commented Apr 17, 2026

Confusing... maybe it just got dropped on rebase. Thanks for pointing out that was missing here.

@zanieb zanieb marked this pull request as draft April 17, 2026 12:55
@zaniebot zaniebot force-pushed the claude/add-noop-timestamp-test-ZXAFH branch from b176f84 to 45ce9c1 Compare April 17, 2026 13:07
@zaniebot zaniebot force-pushed the claude/add-noop-timestamp-test-ZXAFH branch 2 times, most recently from 6037579 to a8e80d6 Compare April 17, 2026 16:35
When a relative exclude-newer span is present, write a fixed no-op
timestamp (`0001-01-01T00:00:00Z`) instead of the computed one.
The span is what drives resolution; the timestamp is only kept for
backwards compatibility with older uv versions. An inline TOML
comment documents this.

Also fix the exclude-newer comparison to not short-circuit on
relative timestamp drift, which would mask real package-level
span changes.

https://claude.ai/code/session_01Lo8AhpYnfK8nUeVhRkxTHQ
@zaniebot zaniebot force-pushed the claude/add-noop-timestamp-test-ZXAFH branch from a8e80d6 to e1c59c0 Compare April 17, 2026 16:41
Comment thread crates/uv-resolver/src/lock/mod.rs Outdated
Comment thread crates/uv/tests/it/lock_exclude_newer_relative.rs Outdated
@zanieb zanieb marked this pull request as ready for review April 17, 2026 16:55
@zanieb zanieb merged commit 44e1cf8 into astral-sh:main Apr 20, 2026
55 checks passed
zanieb added a commit that referenced this pull request Apr 21, 2026
…ewer-span` is present (#19024)

Following #19022 this is an incremental step towards removing
`exclude-newer` timestamps from lockfiles. We don't remove it here, but
we ensure from this version onward, uv will not behave poorly when the
value is missing. This includes substantial refactoring to better
represent the desired end state in our exclude-newer types.
zanieb added a commit that referenced this pull request Apr 21, 2026
Closes #19089 

Applies the same change as #19022 to
per-package exclude-newer spans.

---------

Co-authored-by: Claude <noreply@anthropic.com>
@zsol zsol added the enhancement New feature or improvement to existing functionality label Apr 27, 2026
kdeldycke added a commit to kdeldycke/repomatic that referenced this pull request Apr 28, 2026
potiuk added a commit to potiuk/airflow that referenced this pull request Apr 28, 2026
Pins `[tool.uv] required-version` (and the matching marker-tagged
constants in breeze) to 0.11.8 across the root and the three workspace
members that carried their own (stale) floor (`airflow-core`,
`airflow-ctl`, `dev/mypy` — all previously `>=0.6.3`). The bump picks
up the timestamp-elision fix from astral-sh/uv#19022 (closes
astral-sh/uv#18708 — relative `exclude-newer` no longer writes a
churning timestamp into uv.lock that two branches collide on).

Drops uv's per-package cooldown to "12 hours" in both
[tool.uv.exclude-newer-package] and [tool.uv.pip.exclude-newer-package];
without the override the project-wide 4-day window blocks a
freshly-released uv from being adopted as the floor. The override is
flagged "REMOVE BY 2026-05-01" — once 0.11.8 is older than the global
4-day cooldown the override is redundant.

Bumps AIRFLOW_UV_VERSION across Dockerfiles, breeze constants, and
the image-args doc to match. The `# sync-uv-min-version`-tagged test
fixtures were auto-rewritten by the prek hook of the same name.

uv.lock confirms the upstream fix is engaged: `exclude-newer` reads
as the no-op `0001-01-01T00:00:00Z` placeholder.
potiuk added a commit to apache/airflow that referenced this pull request Apr 28, 2026
Pins `[tool.uv] required-version` (and the matching marker-tagged
constants in breeze) to 0.11.8 across the root and the three workspace
members that carried their own (stale) floor (`airflow-core`,
`airflow-ctl`, `dev/mypy` — all previously `>=0.6.3`). The bump picks
up the timestamp-elision fix from astral-sh/uv#19022 (closes
astral-sh/uv#18708 — relative `exclude-newer` no longer writes a
churning timestamp into uv.lock that two branches collide on).

Drops uv's per-package cooldown to "12 hours" in both
[tool.uv.exclude-newer-package] and [tool.uv.pip.exclude-newer-package];
without the override the project-wide 4-day window blocks a
freshly-released uv from being adopted as the floor. The override is
flagged "REMOVE BY 2026-05-01" — once 0.11.8 is older than the global
4-day cooldown the override is redundant.

Bumps AIRFLOW_UV_VERSION across Dockerfiles, breeze constants, and
the image-args doc to match. The `# sync-uv-min-version`-tagged test
fixtures were auto-rewritten by the prek hook of the same name.

uv.lock confirms the upstream fix is engaged: `exclude-newer` reads
as the no-op `0001-01-01T00:00:00Z` placeholder.
potiuk added a commit to apache/airflow that referenced this pull request Apr 28, 2026
Pins `[tool.uv] required-version` (and the matching marker-tagged
constants in breeze) to 0.11.8 across the root and the three workspace
members that carried their own (stale) floor (`airflow-core`,
`airflow-ctl`, `dev/mypy` — all previously `>=0.6.3`). The bump picks
up the timestamp-elision fix from astral-sh/uv#19022 (closes
astral-sh/uv#18708 — relative `exclude-newer` no longer writes a
churning timestamp into uv.lock that two branches collide on).

Drops uv's per-package cooldown to "12 hours" in both
[tool.uv.exclude-newer-package] and [tool.uv.pip.exclude-newer-package];
without the override the project-wide 4-day window blocks a
freshly-released uv from being adopted as the floor. The override is
flagged "REMOVE BY 2026-05-01" — once 0.11.8 is older than the global
4-day cooldown the override is redundant.

Bumps AIRFLOW_UV_VERSION across Dockerfiles, breeze constants, and
the image-args doc to match. The `# sync-uv-min-version`-tagged test
fixtures were auto-rewritten by the prek hook of the same name.

uv.lock confirms the upstream fix is engaged: `exclude-newer` reads
as the no-op `0001-01-01T00:00:00Z` placeholder.
(cherry picked from commit dbfc27d)
potiuk added a commit to apache/airflow that referenced this pull request Apr 28, 2026
Pins `[tool.uv] required-version` (and the matching marker-tagged
constants in breeze) to 0.11.8 across the root and the three workspace
members that carried their own (stale) floor (`airflow-core`,
`airflow-ctl`, `dev/mypy` — all previously `>=0.6.3`). The bump picks
up the timestamp-elision fix from astral-sh/uv#19022 (closes
astral-sh/uv#18708 — relative `exclude-newer` no longer writes a
churning timestamp into uv.lock that two branches collide on).

Drops uv's per-package cooldown to "12 hours" in both
[tool.uv.exclude-newer-package] and [tool.uv.pip.exclude-newer-package];
without the override the project-wide 4-day window blocks a
freshly-released uv from being adopted as the floor. The override is
flagged "REMOVE BY 2026-05-01" — once 0.11.8 is older than the global
4-day cooldown the override is redundant.

Bumps AIRFLOW_UV_VERSION across Dockerfiles, breeze constants, and
the image-args doc to match. The `# sync-uv-min-version`-tagged test
fixtures were auto-rewritten by the prek hook of the same name.

uv.lock confirms the upstream fix is engaged: `exclude-newer` reads
as the no-op `0001-01-01T00:00:00Z` placeholder.
(cherry picked from commit dbfc27d)
potiuk added a commit to apache/airflow that referenced this pull request Apr 28, 2026
Pins `[tool.uv] required-version` (and the matching marker-tagged
constants in breeze) to 0.11.8 across the root and the three workspace
members that carried their own (stale) floor (`airflow-core`,
`airflow-ctl`, `dev/mypy` — all previously `>=0.6.3`). The bump picks
up the timestamp-elision fix from astral-sh/uv#19022 (closes
astral-sh/uv#18708 — relative `exclude-newer` no longer writes a
churning timestamp into uv.lock that two branches collide on).

Drops uv's per-package cooldown to "12 hours" in both
[tool.uv.exclude-newer-package] and [tool.uv.pip.exclude-newer-package];
without the override the project-wide 4-day window blocks a
freshly-released uv from being adopted as the floor. The override is
flagged "REMOVE BY 2026-05-01" — once 0.11.8 is older than the global
4-day cooldown the override is redundant.

Bumps AIRFLOW_UV_VERSION across Dockerfiles, breeze constants, and
the image-args doc to match. The `# sync-uv-min-version`-tagged test
fixtures were auto-rewritten by the prek hook of the same name.

uv.lock confirms the upstream fix is engaged: `exclude-newer` reads
as the no-op `0001-01-01T00:00:00Z` placeholder.
(cherry picked from commit dbfc27d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or improvement to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

uv exclude-newer for cooldown: Stop writing timestamp in uv.lock to avoid git conflicts

3 participants