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

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

Closed
sumiya11 opened this issue Sep 22, 2024 · 14 comments

Comments

@sumiya11
Copy link

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: sumiya11/Groebner.jl#15 (comment)

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

JoshuaLampert referenced this issue in JuliaGeometry/MeshIntegrals.jl Sep 22, 2024
* Add new tests for Segment

* Bump patch version

* Add test verbose and showtimings

* Complete TODO action

* Add tests for alternate FP types

* Fix typo and add more alt FP test coverage

* Fix typo

* Bugfix

* Bugfix - missing N for Gauss-Legendre rules

* Bugfix - missing unit exponents

* Mark type tests broken, named f32, increase GL rule N

* Fix typo

* Reduce N for GL rules, add looser atol's for F32 results

* Tweak tolerances

* Split tests into new set [skip ci]

* Implement new tests for Rope

* Bugfix

* Math correction

* Add new tests for Ring

* Bugfixes

* Bugfix

* Remove Ring from old tests

* Bugfix

* Reorganize alt FP tests

* Fix atol value, abstract testset with a loop

* Remove unnecessary begin

* Abstract FP type, split aliases into separate set

* Update types

* Add BigFloat tests

* Conditional broken statement

* Enhance integral docstring, add sub-FP64 warning

* Improved argument explanation

Co-authored-by: Joshua Lampert <[email protected]>

* Drop an explicit showtimings

Co-authored-by: Joshua Lampert <[email protected]>

* Remove redundant showtimings

* Add a type-dependent atol

* Add note about BigFloat

---------

Co-authored-by: Joshua Lampert <[email protected]>
@JoshuaLampert
Copy link

@JoshuaLampert
Copy link

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
Copy link
Member

IanButterworth commented Sep 22, 2024

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
Copy link
Member

@IanButterworth
Copy link
Member

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
Copy link
Member

hmmm.. this smells like it might be taking testing off into a different state than normal use

except Exception:
# This is an awful hack to let me avoid properly fixing the tests...
if "pytest" in sys.modules:
self._registry = self._gh.get_repo(registry, lazy=True)
self._clone_registry = False
else:
raise

@simeonschaub
Copy link
Contributor

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
Copy link

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 added a commit to simeonschaub/TagBot that referenced this issue Sep 23, 2024
!!! This is untested!

This is according to PyGithub/PyGithub#2345 (comment)

Locally I tested that the following works correctly:

```python
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 [39]: blob = repo.get_git_blob(registry_toml.sha)

In [40]: b64 = base64.b64decode(blob.content)

In [41]: b64.decode("utf8")
```
@simeonschaub
Copy link
Contributor

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 pushed a commit that referenced this issue Sep 23, 2024
* Try fixing #350

!!! This is untested!

This is according to PyGithub/PyGithub#2345 (comment)

Locally I tested that the following works correctly:

```python
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 [39]: blob = repo.get_git_blob(registry_toml.sha)

In [40]: b64 = base64.b64decode(blob.content)

In [41]: b64.decode("utf8")
```

* Update test_repo.py

* fix formatting
@IanButterworth
Copy link
Member

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

@JoshuaLampert
Copy link

JoshuaLampert commented Sep 23, 2024

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

@simeonschaub
Copy link
Contributor

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

@jkrumbiegel
Copy link

jkrumbiegel commented Sep 23, 2024

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

@sumiya11
Copy link
Author

Thank you for fixing it so quickly !

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

No branches or pull requests

5 participants