JuliaRegistries / TagBot

Creates tags, releases, and changelogs for your Julia packages when they're registered
https://github.com/marketplace/actions/julia-tagbot
MIT License
94 stars 20 forks source link

TagBot experienced an unexpected internal failure, AssertionError: unsupported encoding: none #350

Closed sumiya11 closed 4 weeks ago

sumiya11 commented 1 month ago

In Groebner.jl, TagBot produces "TagBot experienced an unexpected internal failure" accompanied by the message "AssertionError: unsupported encoding: none":

https://github.com/sumiya11/Groebner.jl/actions/runs/10978120022/job/30480878080#step:3:82

Seemed to work fine previously: https://github.com/sumiya11/Groebner.jl/issues/15#issuecomment-2365452551

Not sure if this is a problem in Groebner or something went wrong in TagBot. Any help is appreciated; thanks !

JoshuaLampert commented 1 month ago

We are experiencing the same in https://github.com/mikeingold/MeshIntegrals.jl/actions/runs/10978119797/job/30480877628#step:3:64.

JoshuaLampert commented 1 month ago

I checked the latest package releases and it seems like since this PR (see https://github.com/nflverse/NFLData.jl/actions/runs/10976230101/job/30476748926#step:3:64) TagBot failed every time.

IanButterworth commented 1 month ago

What AI thinks the issue could be

1) Incorrect File Encoding on GitHub:
The file TagBot is trying to access might not be base64 encoded. This could happen if the file is empty, binary, or improperly formatted.

2) GitHub API Changes:
There might have been changes in the GitHub API that affect how content encoding is handled, causing unexpected values like "none" to appear.

3) TagBot or Dependency Issues:
The version of TagBot or its dependencies (like the GitHub library) might have bugs or incompatibilities leading to this error.

4) Network or Fetching Issues:
Temporary issues when fetching the file could result in incomplete or improperly encoded data.

I just updated our deps to latest https://github.com/JuliaRegistries/TagBot/releases/tag/v1.19.5

IanButterworth commented 1 month ago

@simeonschaub reported it's still happening on that new release https://github.com/JuliaLabs/AztecDiamonds.jl/actions/runs/10981139085/job/30488183323#step:2:1

IanButterworth commented 1 month ago

It may be informative that CI here is passing, but this is failing in the wild, if we can figure out what the difference is.

IanButterworth commented 1 month ago

hmmm.. this smells like it might be taking testing off into a different state than normal use https://github.com/JuliaRegistries/TagBot/blob/4820024f1ddccf5e4e8832f01ecf2a79f62602eb/tagbot/action/repo.py#L88-L94

simeonschaub commented 1 month ago

I believe we're running into issues because Registry.toml in General has become larger than 1MB:

In [24]: from github import Github, Auth

In [25]: auth = Auth.Token(token)

In [26]: g = Github(auth=auth)

In [27]: repo = g.get_repo("JuliaRegistries/General")

In [28]: registry_toml = repo.get_contents("Registry.toml")

In [29]: registry_toml.encoding
Out[29]: 'none'

See https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28#get-repository-content:

If the requested file's size is:

  • 1 MB or smaller: All features of this endpoint are supported.
  • Between 1-100 MB: Only the raw or object custom media types are supported. Both will work as normal, except that when using the object media type, the content field will be an empty string and the encoding field will be "none". To get the contents of these larger files, use the raw media type.
JoshuaLampert commented 1 month ago

Yes, that makes very much sense! I checked that before this commit the size of Registry.toml was below 1MB and after that it is above 1MB. This is the same commit, where TagBot started to fail.

simeonschaub commented 1 month ago

I think I found a potential fix in #356. I guess to actually test it in the wild we'll need to tag a new release with that change?

IanButterworth commented 4 weeks ago

Thanks. New patch release just cut with that fix. Please confirm it fixes it.

JoshuaLampert commented 4 weeks ago

Seems to work: https://github.com/mikeingold/MeshIntegrals.jl/actions/runs/10993022532/job/30518618465. Thanks a lot @simeonschaub and @IanButterworth!

simeonschaub commented 4 weeks ago

Can confirm as well! 🎉 https://github.com/JuliaLabs/AztecDiamonds.jl/actions/runs/10990108308/job/30518644915

jkrumbiegel commented 4 weeks ago

For me as well https://github.com/PumasAI/SummaryTables.jl/actions/runs/10992929480/job/30518753493, thanks for the quick fix!

sumiya11 commented 4 weeks ago

Thank you for fixing it so quickly !