Skip to content

[Merged by Bors] - fix: allow build steps to access timezone - #28510

Closed
kim-em wants to merge 4 commits into
leanprover-community:masterfrom
kim-em:fix/timezone-setup-for-deprecated-linter
Closed

[Merged by Bors] - fix: allow build steps to access timezone#28510
kim-em wants to merge 4 commits into
leanprover-community:masterfrom
kim-em:fix/timezone-setup-for-deprecated-linter

Conversation

@kim-em

@kim-em kim-em commented Aug 16, 2025

Copy link
Copy Markdown
Contributor

Problem

The deprecated attribute linter was failing with timezone database errors:

unable to locate share/zoneinfo in the local timezone database at /etc/localtime

This was happening because the linter uses Std.Time.PlainDate.now to compare dates, which requires timezone information.

Solution

Add -ro /etc/timezone to landrun shell options.

Changes

  • Add timezone permissions to shell in .github/build.in.yml
  • Regenerated all build workflow files (build.yml, bors.yml, build_fork.yml)

This should fix the deprecated attribute linter failures in CI.

…te linter

The deprecated attribute linter was failing with timezone database errors:
'unable to locate share/zoneinfo in the local timezone database at /etc/localtime'

This adds the szenius/set-timezone@v2.0 action to all build workflows
to ensure proper timezone configuration in CI environments.
@kim-em
kim-em force-pushed the fix/timezone-setup-for-deprecated-linter branch from 8fc33bb to edfb409 Compare August 16, 2025 09:00
@github-actions github-actions Bot added the CI Modifies the continuous integration setup or other automation label Aug 16, 2025
@github-actions

github-actions Bot commented Aug 16, 2025

Copy link
Copy Markdown

PR summary 90c0e186fd

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

No declarations were harmed in the making of this PR! 🐙

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@kim-em

kim-em commented Aug 16, 2025

Copy link
Copy Markdown
Contributor Author

I'll add a test in a follow-up PR, but because this is a CI change it needs to go in first.

@bryangingechen bryangingechen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!
bors d+

Comment thread .github/build.in.yml Outdated
Comment thread .github/workflows/bors.yml Outdated
Comment thread .github/workflows/build.yml Outdated
Comment thread .github/workflows/build_fork.yml Outdated
@mathlib-bors

mathlib-bors Bot commented Aug 16, 2025

Copy link
Copy Markdown
Contributor

✌️ kim-em can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Aug 16, 2025
kim-em and others added 2 commits August 16, 2025 21:12
Co-authored-by: Bryan Gin-ge Chen <bryangingechen@gmail.com>
Co-authored-by: Bryan Gin-ge Chen <bryangingechen@gmail.com>
@kim-em

kim-em commented Aug 16, 2025

Copy link
Copy Markdown
Contributor Author

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Aug 16, 2025
mathlib-bors Bot pushed a commit that referenced this pull request Aug 16, 2025
…e linter (#28510)

## Problem

The deprecated attribute linter was failing with timezone database errors:
```
unable to locate share/zoneinfo in the local timezone database at /etc/localtime
```

This was happening because the linter uses `Std.Time.PlainDate.now` to compare dates, which requires timezone information.

## Solution

Add the `szenius/set-timezone@v2.0` action to all build workflows to ensure proper timezone configuration in CI environments.

## Changes

- Added timezone setup step to `.github/build.in.yml`
- Regenerated all build workflow files (`build.yml`, `bors.yml`, `build_fork.yml`)
- The timezone setup runs after cleanup and before jq setup

This should fix the deprecated attribute linter failures in CI.

Co-authored-by: Kim Morrison <477956+kim-em@users.noreply.github.com>
@mathlib-bors

mathlib-bors Bot commented Aug 16, 2025

Copy link
Copy Markdown
Contributor

Build failed:

@bryangingechen

bryangingechen commented Aug 16, 2025

Copy link
Copy Markdown
Contributor

It seems we are setting etc/timezone on our runners (see the Dockerfile in the private repo for such things), so I wonder if there's some landrun setting tweak we should be making instead?

edit: I went ahead and changed this PR to that approach instead.

@bryangingechen bryangingechen changed the title fix: add timezone setup to build workflows to fix deprecated attribute linter fix: allow build steps to access timezone Aug 16, 2025
@bryangingechen bryangingechen removed the ready-to-merge This PR has been sent to bors. label Aug 16, 2025
@kim-em

kim-em commented Aug 16, 2025

Copy link
Copy Markdown
Contributor Author

Thank you! I had missed that this was a landrun issue.

@kim-em

kim-em commented Aug 16, 2025

Copy link
Copy Markdown
Contributor Author

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Aug 16, 2025
mathlib-bors Bot pushed a commit that referenced this pull request Aug 16, 2025
## Problem

The deprecated attribute linter was failing with timezone database errors:
```
unable to locate share/zoneinfo in the local timezone database at /etc/localtime
```

This was happening because the linter uses `Std.Time.PlainDate.now` to compare dates, which requires timezone information.

## Solution

Add `-ro /etc/timezone` to `landrun` shell options.

## Changes

- Add timezone permissions to `shell` in `.github/build.in.yml`
- Regenerated all build workflow files (`build.yml`, `bors.yml`, `build_fork.yml`)

This should fix the deprecated attribute linter failures in CI.

Co-authored-by: Kim Morrison <477956+kim-em@users.noreply.github.com>
Co-authored-by: Bryan Gin-ge Chen <bryangingechen@gmail.com>
@mathlib-bors

mathlib-bors Bot commented Aug 16, 2025

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title fix: allow build steps to access timezone [Merged by Bors] - fix: allow build steps to access timezone Aug 16, 2025
@mathlib-bors mathlib-bors Bot closed this Aug 16, 2025
Paul-Lez pushed a commit to Paul-Lez/mathlib4 that referenced this pull request Aug 23, 2025
## Problem

The deprecated attribute linter was failing with timezone database errors:
```
unable to locate share/zoneinfo in the local timezone database at /etc/localtime
```

This was happening because the linter uses `Std.Time.PlainDate.now` to compare dates, which requires timezone information.

## Solution

Add `-ro /etc/timezone` to `landrun` shell options.

## Changes

- Add timezone permissions to `shell` in `.github/build.in.yml`
- Regenerated all build workflow files (`build.yml`, `bors.yml`, `build_fork.yml`)

This should fix the deprecated attribute linter failures in CI.

Co-authored-by: Kim Morrison <477956+kim-em@users.noreply.github.com>
Co-authored-by: Bryan Gin-ge Chen <bryangingechen@gmail.com>
pechersky pushed a commit to pechersky/mathlib4 that referenced this pull request Aug 25, 2025
## Problem

The deprecated attribute linter was failing with timezone database errors:
```
unable to locate share/zoneinfo in the local timezone database at /etc/localtime
```

This was happening because the linter uses `Std.Time.PlainDate.now` to compare dates, which requires timezone information.

## Solution

Add `-ro /etc/timezone` to `landrun` shell options.

## Changes

- Add timezone permissions to `shell` in `.github/build.in.yml`
- Regenerated all build workflow files (`build.yml`, `bors.yml`, `build_fork.yml`)

This should fix the deprecated attribute linter failures in CI.

Co-authored-by: Kim Morrison <477956+kim-em@users.noreply.github.com>
Co-authored-by: Bryan Gin-ge Chen <bryangingechen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Modifies the continuous integration setup or other automation delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). ready-to-merge This PR has been sent to bors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants