algora-io / tv

Open source Twitch for developers
https://algora.tv
Other
1.07k stars 67 forks source link

chore: Update tz lib #86

Closed pdgonzalez872 closed 2 months ago

pdgonzalez872 commented 2 months ago

Hi!

Thanks for making this open source, AMAZING work.

On Ubuntu (and others I bet as well), the following happened:

$ export $(cat .env | xargs)
$ mix ecto.setup

Seems to succeed, but has this error in the logs:

|====================================================================================================| 100% (69.55 KB)
|==============================================================================================      |  94% (96.65/102.56 MB)[debug] Tzdata polling for update.
|====================================================================================================| 100% (102.56 MB)
[info] tzdata release in place is from a file last modified Fri, 22 Oct 2021 02:20:47 GMT. Release file on server was last modified Thu, 05 Sep 2024 18:47:42 GMT.
[debug] Tzdata downloading new data from https://data.iana.org/time-zones/tzdata-latest.tar.gz
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1725992515.806887  821240 tfrt_cpu_pjrt_client.cc:349] TfrtCpuClient created.
[debug] Tzdata data downloaded. Release version 2024b.
[error] GenServer :tzdata_release_updater terminating
** (ArgumentError) errors were found at the given arguments:

  * 2nd argument: not a tuple

    (erts 14.1.1) :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: []
warning: using map.field notation (without parentheses) to invoke function FileSystem.Backends.FSInotify.bootstrap() is deprecated, you must add parentheses instead: remote.function()
  (file_system 0.2.10) lib/file_system/backend.ex:23: FileSystem.Backend.backend/1
  (file_system 0.2.10) lib/file_system/worker.ex:18: FileSystem.Worker.init/1
  (stdlib 5.1.1) gen_server.erl:962: :gen_server.init_it/2
  (stdlib 5.1.1) gen_server.erl:917: :gen_server.init_it/6
  (stdlib 5.1.1) proc_lib.erl:241: :proc_lib.init_p_do_apply/3

[info] Detected running on primary. No local replication to track.
[debug] %Postgrex.Query{ref: nil, name: "ecto_219938", statement: "SELECT u0.\"id\", u0.\"email\", u0.\"name\", u0.\"handle\", u0.\"channel_tagline\", u0.\"avatar_url\", u0.\"external_homepage_url\", u0.\"twitter_url\", u0.\"videos_count\", u0.\"is_live\", u0.\"stream_key\", u0.\"visibility\", u0.\"bounties_count\", u0.\"solving_challenge\", u0.\"tech\", u0.\"orgs_contributed\", u0.\"inserted_at\", u0.\"updated_at\" FROM \"users\" AS u0 WHERE (u0.\"handle\" = $1)", param_oids: nil, param_formats: nil, param_types: nil, columns: nil, result_oids: nil, result_formats: nil, result_types: nil, types: nil, cache: :reference} uses unknown oid(s) 1426593forcing us to reload type information from the database. This is expected behaviour whenever you migrate your database.

As seen in:

Potential fixes:

I verified that the explicit dep solution (1) solves the problem.

zcesur commented 2 months ago

Hi Paulo, appreciate the kind words and thanks for fixing this!