Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GenServer :tzdata_release_updater terminating #143

Closed
tomciopp opened this issue Sep 6, 2024 · 8 comments · Fixed by #146 · May be fixed by #145
Closed

GenServer :tzdata_release_updater terminating #143

tomciopp opened this issue Sep 6, 2024 · 8 comments · Fixed by #146 · May be fixed by #145

Comments

@tomciopp
Copy link

tomciopp commented Sep 6, 2024

Recently I've seen an error with the tzdata_release_updater

2024-09-05 20:32:05.376 [error] GenServer :tzdata_release_updater terminating
** (ArgumentError) errors were found at the given arguments:

  * 2nd argument: not a tuple

    :erlang.element(1, :error)
    (tzdata 1.1.1) lib/tzdata/util.ex:223: Tzdata.Util.to_int/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:38: Tzdata.Parser.process_rule/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
Last message: :check_if_time_to_update
State: []

It looks like there was a recent release of the tzdb and there may need to be some code changes to accommodate them.
https://lists.iana.org/hyperkitty/list/[email protected]/thread/IZ7AO6WRE3W3TWBL5IR6PMQUL433BQIE/

@mathieuprog
Copy link
Contributor

With version 2024b, an error was also introduced in tz library (an alternative) due to a change in the formatting of month names.

Month names have always been written in their abbreviated form (e.g., “Apr”). However, in version 2024b, there is an occurrence where a full month name (“April”) is used, which caused the issue.

Source: https://lists.iana.org/hyperkitty/list/[email protected]/thread/Y5KABB56LLOPHQJL4MFHWHSLR7KJ2XSP/

@API2-studio
Copy link

What is the proposed resolution for this ?

@ruslandoga
Copy link

Seems like 2024b has been rolled back:

$ curl -sL https://data.iana.org/time-zones/tzdata-latest.tar.gz | tar xzO version
2024a

@DerTim1
Copy link

DerTim1 commented Sep 6, 2024

@ruslandoga Not for me:

$ date; curl -sL https://data.iana.org/time-zones/tzdata-latest.tar.gz | tar xzO version
Fr 6. Sep 09:22:46 CEST 2024
2024b

@technicalcapt
Copy link

technicalcapt commented Sep 6, 2024

Follow up #143 (comment)

For a temporary fix in deps/tzdata/lib/tzdata/util.ex:163

defp cap_month_number_for_month_name("april"), do: 4

I tested locally and the tz DB should be saved and loaded successfully for 2024b.

@ruslandoga
Copy link

ruslandoga commented Sep 6, 2024

There might be more changes required, some datetimes miss zone_abbr on 2024b: #144 (comment)

aruder-papa added a commit to joinpapa/tzdata that referenced this issue Sep 6, 2024
2024b release of time-zone information is not parseable by tzdata (or
many other libs).

More information here:

https://lists.iana.org/hyperkitty/list/[email protected]/thread/6PF5BB7342JR6PALTMQFEGU2FZ5ADW36/

lau#143

For now, just hard-code the 2024a url so that we don't try to get
2024b and fail to build.
@brandynbennett
Copy link

One workaround I found is to set a config of config :tzdata, :autoupdate, :disabled, however that sets the timezone data file back to Oct 2021 unless you manually include it in the :data_dir

@ragamuf
Copy link

ragamuf commented Sep 6, 2024

For now, you can follow the directions here to switch to the latest stable version in your cache. In my case, this is 2024a, which acts as my fallback on failure instead of using the embedded one from 2021.

https://github.com/lau/tzdata?tab=readme-ov-file#data-directory-and-releases

@lau lau closed this as completed in #146 Sep 8, 2024
stuartc added a commit to OpenFn/lightning that referenced this issue Oct 17, 2024
stuartc added a commit to OpenFn/lightning that referenced this issue Oct 18, 2024
stuartc added a commit to OpenFn/lightning that referenced this issue Oct 18, 2024
stuartc added a commit to OpenFn/lightning that referenced this issue Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants