-
Notifications
You must be signed in to change notification settings - Fork 340
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
Exception when using partial / third party CDN sources #768
Comments
@amorde We use JFrog as a CDN repo and we are running into the same. Any clue if they incompletely implemented the protocol, or is it a bug in the client? |
@santam85 @esteluk It's entirely possible that JFrog's Artifactory has done something wrong - they've had limited contact with CocoaPods when they developed their products. It could also be a misconfiguration of some sort. Try contacting their support for assistance. |
@igor-makarov do you have any other CDN source different from the trunk we can use to test a configuration similar to the above example? To pinpoint if the issue is with JFrog or not. |
@santam85 sadly, I do not. There was one I personally had for experiments, but I've shut it down due to lack of use. You could build your own CDN if you follow the format as specified at https://github.com/CocoaPods/cdn.cocoapods.org |
@igor-makarov how would you explain the error we are getting then? From what i gather, the Cocoapods client tries to download the sharded podspec (4/0/1) from our private repo for |
@santam85 It's okay if you don't have the pod in the shard, but you need to have an empty shard that corresponds to 4/0/1. |
@igor-makarov the code at https://github.com/CocoaPods/cdn.cocoapods.org/blob/main/Scripts/create_pods_and_versions_index.rb does not seem to behave that way. There might be gaps in the hashes if there is no pod matching a particular prefix, so this needs to be addressed either in the client (my preference, more economical solution) or in the pod version index generation. |
The CDN support was intended to deal with the size the trunk repo, and its unique performance needs. Trunk does not have missing shards, due to the sheer number of pods. There's very limited badwidth to address changes to either the client or server components - my realistic recommendation is to switch to using git for your non-trunk spec repo. Also, I would like to reiterate that JFrog's implementation of "CDN-like" spec repos is not affiliated with CocoaPods and I do not know how it works. |
Unfortunately that recommendation does not work for our enterprise, so we are stuck with what JFrog offers us. We'll work with them trying to address potential bugs in their implementation, but would you be open to us to keep working on #771 to allow the client to keep looking for pods on other sources if it can't find the required shard? |
CocoaPods is a project that's entirely dependent on the mainteneace work of volunteers. Personally, I cannot justify devoting my time to a PR trying to fix a problem whose root cause is a non-compliant implementation by a third party (JFrog) of a feature that's being used in an unintended manner. @eyalbe4 @yahavi - there's a long-standing compatibility problem in Artifactory that I think you need to address. |
I fail to see how their implementation is non-compliant: if they were running the code you posted in this issue to generate the json shards, they would end up with exactly the problem at hand, and gaps in the generated shards. I couldn't find any reference documentation on the CocoaPods docs that also spells out this requirement for empty shards in private CDN repos, can you point me to it? We are willing to contribute any needed effort to get it fixed, as we are heavy users of CocoaPods and can provide insights on requirements for Enterprise users. |
@santam85 there was never an intention for the CDN format to be used for third party repos. The documentation in https://github.com/CocoaPods/cdn.cocoapods.org is not instructions on how to set up your own CDN repo. This is out of scope for CocoaPods. It's a description of how the code works. Please understand that there's absolutely no bandwidth in CocoaPods to deal with any of this. Talk to your vendor. |
You said yourself earlier:
but now you seem to have backtracked on that:
We are definitely talking to our vendor about it, but they will also likely require some form of support from Cocoapods to comply with these undocumented standards and expectations. I don't understand why this much resistance to improve Cocoapods, in the spirit of open-source we're happy to contribute with the resources needed to address this, and also sponsor and help maintain the project. |
Great to see this ticket (and PR), as I have raised similar one with comparing patch here: CocoaPods/CocoaPods#12338! I was awaiting some feedback on the issue which unfortunately didn't reached any further attention yet! |
Report
What did you do?
If you configure a
Podfile
to use two CDN sources – one of which is the trunk, and the second is a private spec CDN that does not contain a complete mirror of the trunk,pod install
fails to complete when I try to use dependencies from both.What did you expect to happen?
Installs all pod dependencies successfully.
What happened instead?
Swiftlint
uses CDN shard4_0_1
and Cocoapods queries each CDN repo for the contents of this shard.If this CDN shard doesn't exist on a repo (which is very likely for any private CDN that doesn't copy the trunk, but very unlikely for the real trunk), this file returns a 404 and isn't downloaded successfully. This leads to the above exception ☝🏽
If I remove any trunk dependencies from my Podfile,
pod install
completes as expected.CocoaPods Environment
Stack
Installation Source
Plugins
Project that demonstrates the issue
Will try to identify this later.
The text was updated successfully, but these errors were encountered: