Uh oh!
There was an error while loading. Please reload this page.
Java: add support for alert location restrictions - #17190
Conversation
e087562 to
cf44894CompareUh oh!
There was an error while loading. Please reload this page.
cf44894 to
3c68245Compare3c68245 to
29ca5c3CompareGenerally looks reasonable, but I do have several stylistic and algorithmic comments. |
29ca5c3 to
3f4f18eComparecklin
commented
Aug 14, 2024
I will give that a try. The right way to apply alert restrictions on a query depends on what goes into the alert. For a dataflow query, that means whether the alert contains only the sources, the sinks, both the sources and the sinks, or with additional locations in addition to sources or sinks. That context is available only in the I was originally also concerned about alert-restricted predicates and flow configurations from
I am not sure I understand. Can you say more?
Sounds interesting! Where can I find out more? |
cklin
commented
Aug 14, 2024
This is done. Notes:
For now I am keeping it a separate commit in case we want to further refine the approach. I will fold it into the previous commit before merge. |
cklin
commented
Aug 15, 2024
I am able to reproduce the |
aschackmull
commented
Aug 16, 2024
The
Have you noticed any performance issue if you simply drop the 1000 limit? It might be completely fine without it. If not then there are tricks to apply. The one thing that I alluded to was that we can skip the materialisation of irrelevant line numbers if we replace the If we do somehow run into performance issues dealing with all |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
1b0c1d6 to
888db84Comparecklin
commented
Aug 16, 2024
The problem was due to
What I am hearing is that we should not spend too much effort on premature optimization right now. Instead, we can defer improvements until we do observe poor performance, at which point we will have concrete data on exactly what needs to be optimized. That sounds like a good approach. Also, thanks for the edit suggestions! I have incorporated them in the latest push. |
aschackmull
commented
Aug 19, 2024
That seems too brittle - and also not very nice to have all those pass-throughs. Perhaps filtering should merely be a flag on the existing configuration instead of a configuration-transforming module. I.e. something like: |
cklin
commented
Aug 19, 2024
Thanks for the suggestion! Yes, this approach would be cleaner. I will try to restructure the PR using this new approach in the next few weeks. |
888db84 to
93ba79aCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
93ba79a to
30bbd12Comparecklin
commented
Sep 11, 2024
Hi @aschackmull — the switch for dataflow source+sink filtering is now done via a flag as suggested. Please take another look. Thanks! |
30bbd12 to
2e6f34dCompareaschackmull
commented
Sep 19, 2024
I had a lot of comments about things to tweak and simplify, so I ended up just pushing a commit. |
a999980 to
2970da0Compare
aschackmull
left a comment
There was a problem hiding this comment.
LGTM now, provided that this passes the usual performance testing in dca.
Uh oh!
There was an error while loading. Please reload this page.
aschackmull
left a comment
There was a problem hiding this comment.
I think we should limit ourselves to filtering that affects data flow, as the other query result filtering cannot be expected to improve performance.
aschackmull
commented
Sep 20, 2024
Dca looks fine, although there is a slight indication that something might be up with |
2970da0 to
75ec8ceComparecklin
commented
Sep 20, 2024
I have updated the PR accordingly, with a little bit of commit cleanup in the latest force push. |
This PR modifies Java queries in the Code Scanning suite to support restricting alerts based on source location, with the restrictions configured through extensible predicates.