Coder Social home page Coder Social logo

Comments (6)

wenzeslaus avatar wenzeslaus commented on June 19, 2024

Older Python does not support Z while recent one does (3.8 does not, 3.11 does).

To test locally:

>>> datetime.fromisoformat('2011-11-04T00:05:23Z')

Given that it seems this changed on us, the change might be coming from configuration of the CI machine either for time zone or for version of Git. In the code, we are using something like:

git log --format="%aI"

This gives committer time with different time zones (not influenced by TZ variable). I get some +00:00 but not Z (Z is short for +00:00). %Ia is "author date, strict ISO 8601 format" according to the Git doc, but that can be Z or +00:00 as far as I understand.

$ git --version 
git version 2.25.1
$ python --version
Python 3.8.10

from grass.

wenzeslaus avatar wenzeslaus commented on June 19, 2024

The latest version of Git is 2.45.1 (source) and it contains git/git@1f49f75:

The output format for dates "iso-strict" has been tweaked to show
a time in the Zulu timezone with "Z" suffix, instead of "+00:00".

* bb/iso-strict-utc:
  date: make "iso-strict" conforming for the UTC timezone

How it actually is with Z vs +00:00 is not clear to me (whether Z is actually more strict when +00:00 refers to the local time zone rather than UTC time...), but that's not important here.

So anyway, the CI actually has latest Git which produces Z and Python is 3.10 which does not support Z in fromisoformat (3.10).

We need to either 1) upgrade Python in CI, 2) downgrade Git in CI, or 3) deal in code with non-matching "freshness" of Python and Git.

Number 1 seems best but 3 seems okay too and is doable (try endswith and replace on ValueError).

from grass.

wenzeslaus avatar wenzeslaus commented on June 19, 2024

Note: Some PRs happily run (#3719). Maybe different Git on different VMs in CI...

from grass.

echoix avatar echoix commented on June 19, 2024

https://github.com/actions/runner-images/releases

https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20240516.4

There is an image 20240516.4.1 (the one used in the linked run), that I see has git 2.45.1 instead of 2.43.2 (for the 20240510.1.0).

image

Images are changed almost weekly and can take up to a week to fully deploy, so, it's totally possible to have some running on different VMs, as it was yesterday.

You may want to see if there are other suspects in it.

At the same time, we can now use the ubuntu-24.04 tag, as beta, if we wanted to. I saw that they included a bit less of software for maintenance reasons, and less cached images. It at least has easy access to the newest gcc compiler.

from grass.

echoix avatar echoix commented on June 19, 2024

You might also want to take a look at actions/runner-images#9883

from grass.

wenzeslaus avatar wenzeslaus commented on June 19, 2024

You might also want to take a look at actions/runner-images#9883

Thanks. This helped me to decide that we just need to accommodate the different versions.

from grass.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.