arduino / libraries-repository-engine

Arduino Library Manager index manager
GNU Affero General Public License v3.0
12 stars 3 forks source link

Library repository fetch fails with "`reference delta not found`" error #109

Open beegee-tokyo opened 2 years ago

beegee-tokyo commented 2 years ago

The libraries RAK14012-LED-Matrix/ RAK12021-TCS37725/ are not in the library manager. The logs are showing URL error, but the URL's are correct. How to re-issue the libraries and get them added?

image

image

per1234 commented 2 years ago

Hi @beegee-tokyo. Thanks so much for your report. I apologize for any inconvenience this bug has caused you.

I have investigated the problem and proposed a fix here: https://github.com/arduino/libraries-repository-engine/pull/110

This will still need to pass through the code review and release process before the service is restored for your libraries, but I wanted to provide a progress update.

beegee-tokyo commented 2 years ago

@per1234 Thanks for checking. No problem, our new modules that need that libraries will be release in April.

Anything I can do in the future to avoid this problem?

per1234 commented 2 years ago

Hopefully once the fix goes into action it will no longer be a problem.

Although not required, it would be interesting to try to understand why your repositories had this "reference delta not found" condition. We haven't ever had any reports of it before this, even though the code with this bug has been processing thousands of repositories hourly for over 6 months. So the statistical chance of two of your repositories being affected at random seems very low. This makes me think that there is something special about your libraries. Can you think of anything unusual about these repositories?

Unfortunately, I don't know much about this subject of Git "thin packs". I only learned a little about it today while investigating your report.

beegee-tokyo commented 2 years ago

@per1234 I have no idea either, I don't even understand what reference delta not found means. And 2 out of 4 libraries released in the same batch didn't show the problem.

carlrakwireless commented 2 years ago

Hi @per1234 ,

Could the issue be rooted on the different name metadata on library.properties and library.json files?

per1234 commented 2 years ago

No, it is something about the references in the "pack file" that is part of the internal structure of the Git repository itself, nothing at all about the Arduino-specific metadata aspects. This bug in our https://github.com/go-git/go-git dependency affected even other repositories that have nothing to do with the Arduino Library Manager, or Arduino at all.

per1234 commented 2 years ago

Hi @beegee-tokyo and @carlrakwireless. I have some good news for you. Thanks to assistance from @umbynos, we have deployed the fix to the production system and your libraries were successfully indexed:

It takes some time for the releases to work through the CDN and local cache in order for them to be accessible for installation via Library Manager everywhere, but they should be on their way. We give a conservative estimate of availability within a day's time.

per1234 commented 2 years ago

@hideakitai I wanted to notify you that your "Dynamixel" library is also affected by this bug.

http://downloads.arduino.cc/libraries/logs/github.com/hideakitai/Dynamixel/

2022/03/22 02:11:07 Scraping https://github.com/hideakitai/Dynamixel.git
2022/03/22 02:11:07 Error fetching repository: reference delta not found
2022/03/22 02:11:07 Removing clone and trying again
2022/03/22 02:11:07 Error fetching repository: reference delta not found
2022/03/22 02:11:07 Leaving...

Unfortunately, the fix we made for the "RAKwireless LED Matrix" and "RAKwireless-RAK12021-TCS37725" libraries did not solve the fault for the "Dynamixel" library. The current situation is that "Dynamixel@0.1.0" and "Dynamixel@0.2.0" are available via the Arduino Library Manager (they were processed during the time before the problem started), but "Dynamixel@0.2.1" is not available:

image

There is already a proposed fix and I have verified that it will solve the problem that affects your library. However, we want to wait for that proposal to pass through code review before using it in the Arduino Library Manager system.

I'll provide updates as there is any additional information or progress. Please let me know if you have any questions or concerns.

per1234 commented 2 years ago

We now have another affected library, as reported at https://github.com/arduino/library-registry/pull/1792#issuecomment-1238814814

http://downloads.arduino.cc/libraries/logs/github.com/RAKWireless/RAKwireless-Audio-library/

2022/09/07 01:23:47 Scraping https://github.com/RAKWireless/RAKwireless-Audio-library.git
2022/09/07 01:23:49 Error fetching repository: reference delta not found
2022/09/07 01:23:49 Removing clone and trying again
2022/09/07 01:23:52 Error fetching repository: reference delta not found
2022/09/07 01:23:52 Leaving...