-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add alias support to version automation #5318
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
Comments
Another use case is for users that have versions not compatible with pep 440, instead of renaming all of their versions, they can just rename the slug on rtd and automate this with automation rules. We want to allow users to edit the version slug first. |
Machine created versions aren't allowed to be changed, since we use their harcoded slug to identify them as latest and stable. Ref readthedocs#5318
This seems like the right fix for my use case, let me know if this is true. I have a python library in a monorepo with components in other languages. For this library, new versions are released by pushing a new Would this feature allow extracting the semver from the tag and use that? Would it also work to set |
Yes, if implemented, this would solve your problem. Thanks for commenting your use case! |
If I’m not mistaken, what’s described here is what’s been done manually as a support task for Django over the years: #11341; #10748; #9906; #9525; #8520; etc @stsewd is this something you would be prepared to do for other projects as a support task, or should we wait for this to be officially supported? We’re in the exact same situation as Django for Wagtail. We currently publish versioned docs with tags, and we need to switch to branches so we can update docs of past versions (our Sphinx theme has compatibility issues with the new Read the Docs addons). And likely stop publishing separate docs per patch release. So we’d want |
@thibaudcolas we will likely first allow users to change the slug or create an alias manually #9684 before adding an automation rule. But these issues are still pending some decisions, you can request changing your version slug by emailing us to support, just note that any existing version with the old slug will 404, and you need to trigger a new build on the branch/tag that was renamed. |
Hi, we now allow changing the slug of versions. Some notes:
This feature is under a feature flag, if you want to try it out let me know the projects you want to test this on. |
Does this mean that this feature won't yet allow, say, to have a branch named |
Good question. Haven't tested it yet, but it should be possible, but not straightforward to do. If RTD already created a version named Since we already allow users to override stable/latest by creating a branch/tag with that name, I think it's valid to allow doing the change from the form, it would be required for user to first disable the RTD latest/stable version, or maybe do that automatically, but show a big warning. |
If it were to require disabling something first, would it be possible to add an authenticated API endpoint for doing that? My intended workflow is to, when I need to backport some documentation change, create a To be entirely fair, I'm not sure if this is the most relevant issue to mention in since I know there's also #5319 but it's at least vaguely related and continues the conversation I already started here, I can repost elsewhere if needed 😄 |
@stsewd thanks for the update! I think we’d be interested to try this out for sphinx-wagtail-theme and for wagtail. All the implementation choices you mentioned make sense. For us I think #11979 would also be needed? But we can confirm once we’ve tried this out I think. In particular, since we want the slug to be more user-friendly than the git branch name, we’d also want the version label inside the Addons picker to be user-friendly (most likely matching the custom slug 1:1). |
@thibaudcolas done! |
Finally got around to trying this – it seems to already work better than I was expecting! See for example Wagtail’s And it’s not just in the URL, it also looks like what we were expecting in the Addons: I wasn’t able to test the sort order of the versions in this list yet. In our case we would want "latest stable [version-specific branch and tags builds, mixed together, in the order of the version number]". I’ll need to try this out on sphinx-wagtail-theme. |
In #4001 we started by adding version automation rules to enable new versions.
In this next phase, we will address the use case of automation of version aliases. Prior to this, we might need to refactor how we are managing version alias, and potentially more widely support alias management in our UI.
Example use cases here are:
1.0
,1.1
, and2.0
versions active in docs. On release of2.0.5
, the2.0
alias will automatically repoint to this new tagversion-3.0
to show up as3.0
automatically.Some rule example psuedo logic are:
2.1
]{match[0]}.{match[1]}
]Work
{major}
,{minor}
,{\1}
(regex grouping), etcThe text was updated successfully, but these errors were encountered: