Hello all,
I use a private PyPi hosting service (Azure Artifacts) which generates very long URLs to connect with.
Right now when I go to set an environmental variable through the readthedocs.com UI, I cannot enter the number of characters I need.
The limit appears to be 256. My URL is almost 1000 characters.
This is currently blocking my company's ability to generate documentation, as we need this link available to pip in order to install all of our library's dependencies.
Now that's a URL!
We're not familiar with Azure Artifacts, and so don't directly support it yet. I don't think there is any strong reason to keep our env vars limited to 256 characters however. Is it possible to provide a (scrubbed!) URL for an example? I guess I'm mostly curious if these URLs are always going to be <1000 chars, or if there is a better value we can use here. Scanning docs very quickly, I'm not seeing a good example.
Hi!
Here's a dummy example URL:
There's no special handling needed to use Azure Artifacts on your end, since PIP can interact with it natively, I just need to be able to set an environmental variable PIP_INDEX_URL to a url like the one above, then PIP_EXTRA_INDEX_URL to:
And I'll be off to the races, with PIP able to pull from my private packages during a RTD build.
Thanks for looking into this!
Hey! Just checking back to see what the timetable for something like this usually is.
Not trying to add pressure, just want to be able to plan ahead. Thanks so much for looking into it!
@agjohnson which would be the max length here?
can I work on This?
What Should be the max_length for this Field?
https://github.com/rtfd/readthedocs.org/blob/cca41b7b023f44267f7d5214eafcda33bf3ef7e4/readthedocs/projects/models.py#L1381-L1384
@stsewd Can we convert it to TextField?
I have no opinion on field length. Feel free to refer to other examples of CI services, or Heroku, and support for URLs from Azure Artifacts.
@agjohnson
Heroku: Config var data (the combination of all keys and values) cannot exceed 32kb for each app.
ref: https://devcenter.heroku.com/articles/config-vars#config-var-policies
Azure: Request URL size: The maximum size for a request URL is 2,048 chars.
ref: https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits#application-gateway-limits
Hello -- just wanted to check back since I am still unable to build our docks. Thanks again to you all for looking into this.
My own two cents: for my particular use case 2048 is more than long enough since I am concerned with Azure Artifact URL's
I'd say it depends on what kind of data users want to put as an env variable, it could be a path file, a URL, private keys, etc. For the first two cases we are safe with 2048.
@stsewd should I open a PR for this with 2048 max_length?
Just checking back in. This is still blocking using RTD for our documentation.
Would it be possible to update to 2048, then leave this ticket open for any further discussion the devs would like to have long-term?
2048 seems fine
Awesome! Thank you! What is your release schedule for the website? I just tried to set an environmental variable and got the same result.
@bpeake-illuscio The PR hasn't been deployed yet. it will be Deployed soon. Thanks!
Yep, you can watch our changelog to see when it's released: https://docs.readthedocs.io/en/latest/changelog.html
Saw the new change log. Just wanted to confirm this fixed my issue and now my docs are building. Thanks so much!
Most helpful comment
Saw the new change log. Just wanted to confirm this fixed my issue and now my docs are building. Thanks so much!