-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add version automation rules #4001
Comments
This part may already be implemented here. It is not exposed to end users though. |
Probably replace "branches" with "tags". |
We also have a bunch of logic around this where we implemented "supported" versions:
It turned out to be incredibly difficult to automate, and lead to lots of errors. We should likely remove all of that code from the codebase, as it's hidden in the Project forms because it was confusing users: |
This was used to mark docs as "unsupported" when people landed on them. It would turn the RTD bar red if it was unsupported and show users a message (similar to our "not the latest version" warning). It ended up being way too complicated and most people don't have standardized way of handling supported versions. I could see having a more flexible language/framework for this stuff, but at the end of the day, automating things around version numbers is hard, as we've learned with stable versions and all the mess around those too :) |
I tend to agree. Explicit is better than implicit. Maybe the best way is to just have a checkbox in the Version form where a version can be marked deprecated. Is that different than "active"? In the immediate future, I really only need version aliases. There's a model for them but it doesn't appear to do anything. |
I am quite curious when we will a solution for publishing only tags. At this moment I wasn't able to find any workaround for doing this. |
See #4505 for version aliases (to some degree) |
Yes. When you mark a version as The idea of |
Ah interesting. This might meld into our discussion on version level privacy and hiding the version. Perhaps we're really talking about a
|
If |
One other feature that might roll into these rules (at least internally, we might use the same code), is pull request automation. There might be a rule for any branch that matches Lets split this up into 2 phases: Edit: disregard. we discussed a better batching of this work |
These are the rules that DockerHub allows and I suppose could help us to design ours:
I think these things should be related, yes: #1340 |
So, our first step here is modeling. This is what we or need to agreed:
Another thoughts:
So what I can think having something like this initially: Apply the rules to only new created versions, if they match, mark them as active and with the default privacy level (public for .org and private for .com) till we figure out what to do with the privacy levels. We can manage aliases only for exact matches in the beginning till we figure out how to do it with the others (capturing groups, etc), so defaulting to the same slug for the alias. This can be a problem if we only apply this to new created versions, actually. Also, would be good to have some uses cases around this:
Note: When I said versions, I mean branches and tags |
I think maybe version aliases are better in the version model? Or match all the versions (not only new ones) with exact matches only? |
Feels like v1 here is just building the ability to expose our existing rules to users:
I feel like a regex solution is moving a bit farther down the path of building UI/UX for users, without really understanding what they could be used for. It also feels like Version aliases are mixed in here, when implementing |
This feature is more for examining the incoming tag/branches and automatically taking actions based on matches. Actions might be automatically activating a version, setting an alias, setting privacy level, or deactivating a version. We've identified several use cases, the easiest to start with is simply enabling new versions. We will use regex however, as it's the most flexible to start. It's not good UX though, but gives users a usable feature. |
I've updated the description to be more discrete amount of work. I added #5318 to address automating aliases, and #5319 to address refactoring our latest/stable logic. We'll re-evaluate next steps after that, which would be better UX rules. Also, to clarify previous comments here:
|
Another action suggested by @humitos is set default version, also maybe set default branch too? |
Actually set default branch is covered by #5319 |
The modeling and UI was already done. We have more specific issues: |
This feature will implement a series of project rules to manipulate new versions. It will focus on automation of activating versions to start, but will eventually aim to give users the ability to manage a version's state, aliases, and privacy without touching RTD on each new release.
The major use case we're targeting as a proof of concept is that users want to enable new tags automatically, by matching tag/branch names.
Concepts
Version automation rules will be constructed of matches and actions. Rule matches can act on tags and/or branches, selectable in the model. Rules will have priority and can be moved around.
Rule matches might be:
Actions might be:
We'll only focus on a few of these at a time.
Work
For our inital pass, regex matching is the most flexible, and version activation is a simple and useful action target to implement. We'll do a first pass at a UI, which might look like the docker hub UI for version automation:
#4001 (comment)
It's a bad UX however, and we'll eventually have helpers for this instead of relying on developer concepts like regex.
The text was updated successfully, but these errors were encountered: