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

OnlyRewriteDeprecatedURLs and AlwaysRewriteDistributionURLs #65

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

sphen13
Copy link

@sphen13 sphen13 commented Aug 24, 2018

Add in two new options:

OnlyRewriteDeprecatedURLs

This boolean preference allows for you to choose to only rewrite deprecated product URLs so they point to your LocalCatalogURLBase. Products currently available in Apple's catalogs will continue to point to Apple's CDN. This preference is intended to allow you to save bandwidth.
Note: Setting this preference requires LocalCatalogURLBase to be set and will locally cache all packages even if they will not be referenced in your catalogs.

AlwaysRewriteDistributionURLs

This boolean preference allows for rewriting of the DistributionURLs inside the catalogs so they point to the LocalCatalogURLBase. This preference is intended for the ability to modify config-data on products without replicating packages.
Note: Setting this preference to True will keep reposado from downloading packages unless you also specify OnlyRewriteDeprecatedURLs.

Credit to @weswhet for AlwaysRewriteDistributionURLs :)

weswhet and others added 5 commits January 16, 2018 16:50
…ave to replicate packages to remove config data
add OnlyRewriteDeprecatedURLs preference option
Add options for OnlyRewriteDeprecatedURLs and AlwaysRewriteDistributionURLs
@gregneagle
Copy link
Contributor

I don't think I understand the comment/statement "This preference is intended to allow you to save bandwidth." What bandwidth is saved? reposado still has to download all products -- it can't wait until a product is marked as deprecated to download it; by then it's too late.

Local bandwidth is usually cheaper/faster than bandwidth to Apple's servers and is a major reason people have used software update replicas and Caching Services.

Maybe your scenario is reposado repo in some cloud provider and you want to save bandwidth/data transfer cost payments to the cloud provider? If so, clarifying the scenarios in which this would be useful would be helpful.

@gregneagle
Copy link
Contributor

As for the patch itself -- the logic looks hard to follow (lots of complex nested if/thens), so it may take me a while to understand and review.

Assuming I agree to merge this, Walt Disney Animation Studios will need a signed Contributor License Agreement from you. I'd point you to one to start filling out, but it looks like they broke something and I need to alert the proper people to get it fixed.

@sphen13
Copy link
Author

sphen13 commented Aug 24, 2018

Yes Greg you are right in your thoughts. I can clarify my meaning in the docs. In my current use of this I am reducing the amount of client download bandwidth billed from my cloud provider. It is not aimed at reducing the bandwidth required on the client end (thats the job of a caching proxy in my case).

I am further using a script that only syncs my chosen "deprecated" items up to my cloud repo - significantly reducing the amount of storage needed on the cloud platform.

Either way I thought this would be a handy thing to share (and write a blog post explaining my use of)

@sphen13
Copy link
Author

sphen13 commented Aug 24, 2018

Thanks Greg - I will look out for that. The logic is a bit hard to follow (was for me when I was writing). It think this had to do with combining it with the AlwaysRewriteDistributionURLs option as well.

I will help as much as I can. I appreciate your time.

@gregneagle
Copy link
Contributor

Sorry it's been a while; I'll probably not have the time to properly review for a little bit longer. In the meantime, could you submit a Contributor License Agreement?
https://github.com/wdas/reposado/blob/master/CONTRIBUTING.md#contributor-license-agreement
I can't accept contributions without one on file for you.

@sphen13
Copy link
Author

sphen13 commented Sep 27, 2018

Thanks greg - stupid question but is Schedule B required? should I describe the patch or can it be blank and be a blanket for any contribution? thx

@gregneagle
Copy link
Contributor

gregneagle commented Sep 27, 2018

I am not a lawyer, but I think you could just write "enhancements to reposado".

@sphen13
Copy link
Author

sphen13 commented Sep 27, 2018

:) thx - submitted.

@gregneagle gregneagle changed the base branch from master to main July 1, 2020 21:45
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

Successfully merging this pull request may close these issues.

3 participants