Remove codeQL.openVariantAnalysisQueryFile command#2179
Conversation
elenatanasoiu
left a comment
There was a problem hiding this comment.
I don't what the perfect future looks like, but if we're only calling this from code, I think you're right to nix it.
koesie10
left a comment
There was a problem hiding this comment.
Do we have separate telemetry that lets us know how many times a user has opened a variant analysis query file? It seems like in the query history manager, we don't have a good way of distinguishing between a local query and a variant analysis in the telemetry. It also doesn't seem like separate telemetry is being send when "View query" is clicked in the view.
I'm not sure if we need any telemetry for this command, but I think we do need to think about that.
charisk
left a comment
There was a problem hiding this comment.
Agree, I don't see a huge benefit in keeping the command, just decouples things a bit.
Thanks for raising this point! The state of telemetry right now is:
So you're right if we remove Being able to differentiate the query type when opened from the query history is a bit more complex. I'd argue we already can't tell, because we can't correlate two telemetry events together to know that one |
|
I've updated the PR to emit a UI interaction telemetry event when opening the variant analysis query file from the view. But I'm still open to discuss options. This has raised concerns that it's easy to accidentally remove telemetry, because sometimes it's not clear whether an action is covered by the command telemetry or other more dedicated telemetry. I suppose we mainly only have to think about this when removing a command, but still I wonder if we need a more principled approach if we want to be more sure we're not making a mistake. |
I'm not sure if this PR is the right way to go, but I want to open it to ask the question. What's wrong with doing this?
To make clear what's going on here, the
codeQL.openVariantAnalysisQueryFileis only used internally from code and is not available to the user in the command palette. In the two places we use this command, we could instead just call theopenQueryFilemethod on the variant analysis manager directly. We have access to the variant analysis manager object already.The reasons I can see for using a command are:
So does this PR actually make things any worse? It seems unclear to me. But it might still be working against our view of the perfect future.
Checklist
ready-for-doc-reviewlabel there.