Skip to content

impl(workspace): migrate from chrono to jiff - #6516

Merged
dbolduc merged 2 commits into
googleapis:mainfrom
avsaase:chrono-jiff
Aug 24, 2026
Merged

impl(workspace): migrate from chrono to jiff#6516
dbolduc merged 2 commits into
googleapis:mainfrom
avsaase:chrono-jiff

Conversation

@avsaase

@avsaase avsaase commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

As discussed in #1153 (comment) and onward, this replaces the internal usages of chrono in this workspace with jiff. The TryFrom impls in wkt for Timestamp that convert to and from chrono::DateTime<chrono::Utc> are left in place.

@avsaase
avsaase requested review from a team as code owners August 23, 2026 18:22
@google-cla

google-cla Bot commented Aug 23, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request replaces the chrono dependency with jiff across multiple crates for date and time handling. The reviewer pointed out several instances where jiff::Timestamp::strftime is used incorrectly; since it returns a Result, calling .to_string() or formatting it directly will fail to compile. The feedback suggests using .expect("valid format") to safely unwrap the infallible result before formatting.

Comment thread src/auth/src/credentials/external_account_sources/aws_sourced.rs
Comment thread src/storage/src/storage/post_policy.rs
Comment thread src/storage/src/storage/post_policy.rs
Comment thread src/storage/src/storage/post_policy.rs
Comment thread src/storage/src/storage/signed_url.rs
@coryan

coryan commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Please let us know when you have signed the CLA, we cannot proceed without that.

/gcbrun

@coryan

coryan commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

/gdbrun

@coryan coryan changed the title Migrate from chrono to jiff feat: migrate from chrono to jiff Aug 23, 2026
@coryan

coryan commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

/gcbrun

@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.39%. Comparing base (102298f) to head (bec1652).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6516   +/-   ##
=======================================
  Coverage   96.39%   96.39%           
=======================================
  Files         301      301           
  Lines       84762    84764    +2     
=======================================
+ Hits        81706    81711    +5     
+ Misses       3056     3053    -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@avsaase avsaase changed the title feat: migrate from chrono to jiff chore(workspace): migrate from chrono to jiff Aug 23, 2026
@avsaase

avsaase commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

Sorry, I didn't notice you updated the PR title. I updated the commit message and the PR title to match. Let me know if you want any changes.

I signed the CLA.

@coryan

coryan commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

/gcbrun

@coryan

coryan commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Don't worry about the mismatch between title and commit message, that is just reminder (or an annoyance, depending on how I feel that day).

@coryan

coryan commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

The CI error is:

cargo minimal-versions --direct test --all-features --package google-cloud-storage
Check key libraries against minimum versions of external packages (direct).
info: running `cargo update -Z direct-minimal-versions`
    Updating crates.io index
error: failed to select a version for `quote`.
    ... required by package `jiff-static v0.2.32`
    ... which satisfies dependency `jiff-static = "=0.2.32"` of package `jiff v0.2.32`
    ... which satisfies dependency `jiff = "^0.2.32"` of package `integration-tests-dns-v1 v0.0.0 (/workspace/tests/dns)`
versions that meet the requirements `^1.0.38` are: 1.0.47, 1.0.46, 1.0.45, 1.0.44, 1.0.43, 1.0.42, 1.0.41, 1.0.40, 1.0.39, 1.0.38
all possible versions conflict with previously selected packages
  previously selected package `quote v1.0.35`
    ... which satisfies dependency `quote = "^1.0.35"` of package `google-cloud-bigquery-derive v0.1.0 (/workspace/src/bigquery-derive)`
    ... which satisfies path dependency `google-cloud-bigquery-derive` of package `google-cloud-bigquery v0.16.0-preview (/workspace/src/bigquery)`
    ... which satisfies path dependency `google-cloud-bigquery` of package `integration-tests-bigquery v0.0.0 (/workspace/tests/bigquery)`
failed to select a version for `quote` which could resolve this conflict

I suspect it is a problem in the build or how we use quote. I cannot look at this today. Somebody in the team will look at it on Monday.

Thanks for the PR and your patience.

@dbolduc

dbolduc commented Aug 24, 2026

Copy link
Copy Markdown
Member

/gcbrun

@coryan coryan changed the title chore(workspace): migrate from chrono to jiff impl(workspace): migrate from chrono to jiff Aug 24, 2026
Comment thread src/storage/src/storage/signed_url.rs
Comment thread src/storage/src/storage/signed_url.rs

@dbolduc dbolduc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@dbolduc
dbolduc merged commit 6340fb3 into googleapis:main Aug 24, 2026
42 of 43 checks passed
@avsaase
avsaase deleted the chrono-jiff branch August 24, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants