-
Notifications
You must be signed in to change notification settings - Fork 127
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
[MM-44185] Add conditions for subscription validation #858
Conversation
…ses for sec level
…d have a blank sec level
Not sure why CI is failing:
|
Fixed CI with most recent commit |
@DHaussermann Gentle ping on review for this |
/update-branch |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #858 +/- ##
==========================================
+ Coverage 30.91% 31.15% +0.23%
==========================================
Files 50 50
Lines 7332 7405 +73
==========================================
+ Hits 2267 2307 +40
- Misses 4884 4907 +23
- Partials 181 191 +10
☔ View full report in Codecov by Sentry. |
@mickmister - Not sure if I'm seeing a deployment issue or if something else is happening here. I don't see a new filter as expected for I have the matching commit deployed. Any thoughts here? Maybe I've misunderstood something here? |
@DHaussermann and I have discussed offline the scope of this PR, which does not include changes to comment visibility |
@mickmister following up on our brief chat yesterday, what's missing to get this merged? Just the QA review? cc @DHaussermann |
@jupenur Yes QA review is the next step here |
/update-branch |
I have done a round of testing and this is looking good.
When I tried to repeat this testing on server (testing above was on cloud) I get an error saving the subscription @mickmister couple questions...
|
I tested this again and it is working as expected in this branch provided @mickmister here https://github.com/mattermost/mattermost-plugin-jira/tree/validate-subscription_debug. |
@m1lt0n or @asatkinson we should discuss the impact of this change and if clients need to be warned about it. Testing this has caused me to wonder how common the case is where people use projects in Jira with no issue security scheme applied. In such a case, users won't quickly be able to go edit their subscription to get it working again once they upgrade the plugin. Some effort is required in Jira as well to associate the project with a security scheme. In short... |
@asatkinson Since this is a business decision, what do you propose to be the recommended course of action with this? cc: @DHaussermann Let's bring this up in either our grooming or planning or async in our chat. |
@DHaussermann I've been looking through this and I don't think I fully understand why this is so problematic. Can we do a quick call so you can walk me through this? I don't have access to this UI. |
If the issue is that it applies this and prevents all other subscriptions from working, then yes, this is a big problem and we should find another way to do this. |
@DHaussermann Gentle ping to give this PR another look. I've resolved issues in CI |
@mickmister Heads up that there is a conflict to resolve |
/update-branch |
After discussing with @mickmister again the last concern I had is not applicable here. I have checked again and tested on both Cloud and Server. If the issue is part of a project where there is no security level to assign because no level is in use by the project, the subscription will deliver the event even though the subscription has no applicable security level to evaluate. |
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.
Tested and passed
- On upgrade, subscription with security level continues to work
- On upgrade, you can add a security level to a subscription to make it start delivering again
- On Upgrade there is valid feedback that Exclude operator can no longer be used for security level when user open edit view to see why it's not working.
- "Kill switch" works to revert to old logic
- Updating a subscription to add security level works
- Targeting a project where there is no applicable security level works as expected without the filter as none is applicable
LGTM!
Thanks @mickmister for the effort on this.
Summary
This PR adds more checks to the
validateSubscription
function, as well as adding more test cases.Ticket Link
Fixes https://mattermost.atlassian.net/browse/MM-44185