-
-
Notifications
You must be signed in to change notification settings - Fork 8.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
[JENKINS-69853] User experimental flags #7299
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool concept
|
||
<?jelly escape-by-default='true'?> | ||
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form"> | ||
<select class="jenkins-select__input" name="[${it.flagKey}]"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think https://weekly.ci.jenkins.io/design-library/ToggleSwitch/ would be a more appropriate control
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the default state? (i.e. does this need to be shown visually, in the description or should we simplify with just two states)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value in the dropdown is "Default". It means that the user does accept the value provided in the code of the flag (getDefaultValue
).
My idea is that we introduce a new feature, we start with disabled by default, so interested users can enable the behavior. During that period, the author can continue improving their feature (without having to wait too much). Then after some months, one can move the feature to be enabled by default. At that moment, the users could decide to rollback by using Disabled.
In parallel, a user who decide that the feature is interesting they can enabled it in advance and when the feature default behavior will be changed, there is no impact for them.
With the different behavior we can see there, we can gather telemetry to determine if the feature is something the community wants.
I want to be able to see data about adoption instead of just having the opinion from loud users (often either very happy or very unhappy).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean how does the user know what the default state is? 'Default' doesn't imply what the default actually is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the "(default)" be added as prefix or suffix of the default entry instead of adding one just for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say that putting the "help" the closer to where it is used seems better (yeah talking about some pixels :D)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After a quick discussion with Hervé (due to my misunderstanding of his argument), I think I forgot to mention the most important argument about the tristate.
As I would like to introduce telemetry on the flags to ease the data gathering, having the "default" option is a way to have a "no vote" / "blank vote" in terms of adoption of the feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make perfect sense to have a third default state in that case indeed, I missed that requirement in your previous comment.
...rc/main/resources/jenkins/model/experimentalflags/UserExperimentalFlagsProperty/config.jelly
Outdated
Show resolved
Hide resolved
...rc/main/resources/jenkins/model/experimentalflags/UserExperimentalFlagsProperty/config.jelly
Outdated
Show resolved
Hide resolved
...in/resources/jenkins/model/experimentalflags/UserExperimentalFlagsProperty/config.properties
Outdated
Show resolved
Hide resolved
...rc/main/resources/jenkins/model/experimentalflags/UserExperimentalFlagsProperty/config.jelly
Show resolved
Hide resolved
...rc/main/resources/jenkins/model/experimentalflags/UserExperimentalFlagsProperty/config.jelly
Outdated
Show resolved
Hide resolved
...rc/main/resources/jenkins/model/experimentalflags/UserExperimentalFlagsProperty/config.jelly
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good (tested locally with some flags), do we need any documentation / guidance written for this?
.../resources/jenkins/model/experimentalflags/BooleanUserExperimentalFlag/flagConfig.properties
Outdated
Show resolved
Hide resolved
.../resources/jenkins/model/experimentalflags/BooleanUserExperimentalFlag/flagConfig.properties
Outdated
Show resolved
Hide resolved
core/src/main/resources/jenkins/model/experimentalflags/Messages.properties
Outdated
Show resolved
Hide resolved
...rc/main/resources/jenkins/model/experimentalflags/UserExperimentalFlagsProperty/config.jelly
Outdated
Show resolved
Hide resolved
TBH I do not know. |
We could add a small paragraph to the design library outlining how to use this feature, could be useful I guess. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it make more sense to call it feature flag? The idea behind this concept is not only relevant to UI changes.
This PR is only about user related flags. I was not able to find a non-UI feature that could be managed by users. For example, notification preference is not a flag, but more a settings. If you have examples of non-UI stuff, please tell me :)) In my mind, the "general" feature flag is more about enabling a particular feature to spread smoothly within an audience. If you want to use equivalent that are for non-user feature, you already can use the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good for now I think, we can adjust it as needed anyway.
/label ready-for-merge This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback. Thanks! |
<select class="jenkins-select__input" name="[${it.flagKey}]"> | ||
<f:option selected="${flagValue == null}" value=""> | ||
<j:if test="${it.getDefaultValue() == true}">${%Default_True}</j:if> | ||
<j:if test="${it.getDefaultValue() == false}">${%Default_False}</j:if> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See JENKINS-69853.
This feature proposal adds the possibility to have sort of feature flag per users. The idea behind this is to accelerate the new UI / design work without having to wait for full approval from the community. Publishing something in beta, hidden behind a "user experimental flag" will let the authors to build on top of their previous steps to finalize their feature before the "actual" release.
📷 Screenshots 📷
With some dummy flags
Without any flags
Testing done
Local instance running with some dummy flag classes (like you can see in the screenshot).
Also running the test cases to check the different situations.
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
@Restricted
or have@since TODO
Javadocs, as appropriate.@Deprecated(since = "TODO")
or@Deprecated(forRemoval = true, since = "TODO")
, if applicable.eval
to ease future introduction of Content Security Policy (CSP) directives (see documentation).Desired reviewers
@daniel-beck + @basil for the feature flag topic
@timja + @janfaracik + @NotMyFault for the usage of the feature in UI PRs
Maintainer checklist
Before the changes are marked as
ready-for-merge
:upgrade-guide-needed
label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidate
to be considered (see query).