Skip to content
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

Forward all query metadata to the queryserver #838

Merged
merged 3 commits into from
Apr 21, 2021
Merged

Forward all query metadata to the queryserver #838

merged 3 commits into from
Apr 21, 2021

Conversation

henrymercer
Copy link
Contributor

This PR forwards all the query metadata to the queryserver.

Currently, only @kind and @id are forwarded for most users. This results in metadata errors when running some queries, even if the queries being run had the correct metadata. For example, the @kind metric query requires either the @tags summary metadata or the @metricType metadata key to be defined. However the VS Code extension doesn't currently forward the @tags and @metricType properties, so the queryserver reports errors whenever a user tries to run these queries.

With this PR, we forward all the query metadata to the queryserver, so queries like these will no longer report metadata errors.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • @github/docs-content-codeql has been cc'd in all issues for UI or other user-facing changes made by this pull request.

@henrymercer henrymercer requested a review from aeisenberg April 21, 2021 10:37
Copy link
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine. But just want to be sure that if a user accidentally includes invalid metadata, will the interpretation fail?

@henrymercer
Copy link
Contributor Author

We currently generate metadata errors in (at least) two places: the metadata verifier, which is invoked during compilation, and the interpretation itself. For VS Code, only the metadata errors during the interpretation itself are problematic. I don't believe there are any cases where forwarding additional metadata would make the interpretation start failing.

Copy link
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification. Yes, I think this needs a changelog entry.

@henrymercer henrymercer enabled auto-merge (rebase) April 21, 2021 14:37
@henrymercer henrymercer merged commit ced34ad into github:main Apr 21, 2021
@henrymercer henrymercer deleted the henrymercer/forward-all-query-metadata branch April 21, 2021 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants