-
Notifications
You must be signed in to change notification settings - Fork 11
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
[BD-21] Simplify feature toggle annotation configuration #49
[BD-21] Simplify feature toggle annotation configuration #49
Conversation
Thanks for the pull request, @regisb! I've created BLENDED-573 to keep track of it in Jira. (The original issue OSPR-4936 has been deleted.) More details are on the BD-21 project page. When this pull request is ready, tag your edX technical lead. |
EDIT 2020/09/07: version number has been updated |
b8b0a41
to
a792279
Compare
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.
Thanks @regisb. I added questions/comments for you and @nasthagiri.
code_annotations/config_and_tools/config/feature_toggle_annotations.yaml
Outdated
Show resolved
Hide resolved
code_annotations/config_and_tools/config/feature_toggle_annotations.yaml
Outdated
Show resolved
Hide resolved
code_annotations/config_and_tools/config/feature_toggle_annotations.yaml
Outdated
Show resolved
Hide resolved
- ".. toggle_use_cases:": | ||
choices: [incremental_release, launch_date, monitored_rollout, graceful_degradation, beta_testing, vip, opt_out, opt_in, open_edx] | ||
choices: [temporary, circuit_breaker, vip, opt_out, opt_in, open_edx] | ||
- ".. toggle_creation_date:": | ||
- ".. toggle_expiration_date:": | ||
- ".. toggle_warnings:": | ||
- ".. toggle_tickets:": |
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.
@nasthagiri: Do we want this to be about removal (e.g. toggle_removal_tickets), or do we want this to any related tickets, which might be about removal, but may also be about the background of the ticket?
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 if we just eliminate this field altogether?
Given that we'll soon have this report and can hold people accountable via the report, we don't need them to additionally manage the removal via tickets as well. It's up to them if they still choose to use tickets as an additional mechanism. But we no longer need to prescribe it.
If there's any additional context they want to provide about a toggle, they can still provide a link to a ticket/etc in the free-form description.
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 there is a misunderstanding: until now, I have used this field to document the ticket or Github PR that justifies the creation of the feature toggle, not its removal. This is useful information that helps put the feature toggle back in context (IMHO).
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.
It could be used either way. The question is whether it is important enough to have its own annotation, rather than being a part of the description like is done for commit comments.
A separate, but related topic, when we write up the how_to, is there any of this metadata that we think would be useful as part of a convention for naming the actual toggles, or do we think these annotations remove the need 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.
If we keep this field, based on how @regisb is describing his current usage, it would be good to rename it. As of now, its name is not self-describing. Also, I am concerned about encouraging JIRA tickets since not all JIRA projects are public - and almost all require JIRA login.
Rename ideas:
toggle_description_reference
toggle_creation_reference
toggle_creation_pr
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 Description Reference and Creation Reference are a bit too vague, and people might as well include whatever relevant links they want in the description.
Creation PR is more specific, but couldn’t git blame answer this in the rare case it is needed and difficult to get from the git link?
I know the JIRA tickets aren’t always public, but I am fine with people including them in the description as they do on PRs whether or not they are public, as added context.
I personally would drop this (with 75%) confidence, but if either of you feel it is important to keep/rename, I think that would be fine.
This brought up a related question for me. If someone does want to include links in the description, what format do they use? If we want people to use rst format, does our code-annotation parsing support it? Our how_to should mention what Rst is supported that won’t interfere with our parsing.
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 see what you mean: any relevant information present in a JIRA ticket should actually be included in the feature toggle description. And many JIRA tickets are unavailable to non-edX contributors. On the other hand, this field can refer to a Github PR, as I have done in edx-platform; but there is a small chicken-and-egg problem here, as the PR does not exist at the time when we create the annotation.
Ideally, if the annotation author feels like they should include reference links, then they could add them to the description. The problem is that, as it stands, annotations are assumed to be raw text. For instance, the following formatting elements will not work as expected in an annotation field: clickable links ( `... <...>`__
), reference to other elements (:ref:`... <...>`_
), verbatim code (``def func():...``
), bold/italic formatting (**text**/*text*
). All these elements would be useful in annotation fields, of course, but at the moment they are not available to us.
We could add such formatting to the annotation format -- but it would require some additional work.
I suggest we keep this toggle_ticket
field until we figure out a way to properly format annotation fields. Then we'll be able to move the links to the toggle description field.
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 say we merge and come back to this if we want to remove or rename.
code_annotations/config_and_tools/config/feature_toggle_annotations.yaml
Show resolved
Hide resolved
As far as we understand, this implementation is used nowhere.
2f785e3
to
8d2df85
Compare
@robrap I have updated this PR following @nasthagiri's and your own recommendations. |
- ".. toggle_use_cases:": | ||
choices: [incremental_release, launch_date, monitored_rollout, graceful_degradation, beta_testing, vip, opt_out, opt_in, open_edx] | ||
choices: [temporary, circuit_breaker, vip, opt_out, opt_in, open_edx] | ||
- ".. toggle_creation_date:": | ||
- ".. toggle_expiration_date:": | ||
- ".. toggle_warnings:": | ||
- ".. toggle_tickets:": |
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.
It could be used either way. The question is whether it is important enough to have its own annotation, rather than being a part of the description like is done for commit comments.
A separate, but related topic, when we write up the how_to, is there any of this metadata that we think would be useful as part of a convention for naming the actual toggles, or do we think these annotations remove the need for that?
code_annotations/config_and_tools/config/feature_toggle_annotations.yaml
Show resolved
Hide resolved
code_annotations/config_and_tools/config/feature_toggle_annotations.yaml
Outdated
Show resolved
Hide resolved
@regisb: We have a holiday today. I’ll get back to this tomorrow. None of my more recent comments are blockers to the changes already made, so we could merge and iterate. However, could you rename the expiration date as Nimisha proposed to match the DEPR field. |
The following changes are made to the feature toggle annotation config: 1. the `toggle_category` annotation is deprecated 2. the list of `toggle_use_cases` is simplified 3. the `toggle_status` field is deprecated 4. `toggle_expiration_date` was renamed to `toggle_target_removal_date` 5. Add SettingToggle, SettingDictToggle toggle implementations OEP-17 will be updated correspondingly.
8d2df85
to
fa1f5b0
Compare
Thanks for your review on a holiday @robrap!
I believe I have already made this change: |
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.
Let me know when this is squashed and ready to merge.
- ".. toggle_use_cases:": | ||
choices: [incremental_release, launch_date, monitored_rollout, graceful_degradation, beta_testing, vip, opt_out, opt_in, open_edx] | ||
choices: [temporary, circuit_breaker, vip, opt_out, opt_in, open_edx] | ||
- ".. toggle_creation_date:": | ||
- ".. toggle_expiration_date:": | ||
- ".. toggle_warnings:": | ||
- ".. toggle_tickets:": |
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 say we merge and come back to this if we want to remove or rename.
Description: Simplify the feature toggle configuration following the conversation with @robrap and @nasthagiri https://github.com/edx/edx-platform/pull/24815#issuecomment-681174018
JIRA: https://openedx.atlassian.net/wiki/spaces/COMM/pages/1596358943
Dependencies: A corresponding PR on OEP-17 will have to be made.
Merge deadline: None.
Reviewers:
Merge checklist:
Documentation updated (not only docstrings)Post merge:
finished.
Author concerns: What should we do with
toggle_status
? I took the liberty of switching it to a choice field, but should we keep this field at all?