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

Test: Don't expect 'Source' tag when source and alert are on the same same #18653

Merged
merged 5 commits into from
Feb 4, 2025

Conversation

asgerf
Copy link
Contributor

@asgerf asgerf commented Feb 3, 2025

This changes the test post-processing query so that an explicit Source tag should be omitted for alerts where the source and alert location are on the same line.

Previously, the Source tag should be omitted when the locations were exactly the same; now they only have to be on the same line.

Currently both start and end lines have to match in order to be considered on the same line.

For context, I am trying to port the JS tests to post-processed inline expectations, and I'm seeing a lot of $ Alert Source expectations that seem unnecessary.

Previously the Source tag was required if the source and alert did not
have the exact same location. This relaxes the restriction to being on
the same line.

Note that in order to be "on the same line" both start and end lines
have to match.

It's still possible for a given line to expect both Alert and Source
tags, in case the source pairs up with another alert on a different
line.
@github-actions github-actions bot added JS Rust Pull requests that update Rust code labels Feb 3, 2025
@asgerf asgerf marked this pull request as ready for review February 3, 2025 13:26
@Copilot Copilot bot review requested due to automatic review settings February 3, 2025 13:26
@asgerf asgerf requested a review from a team as a code owner February 3, 2025 13:26
@asgerf asgerf requested a review from hvitved February 3, 2025 13:27

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more

@asgerf asgerf added the no-change-note-required This PR does not need a change note label Feb 3, 2025
@asgerf asgerf merged commit 294fd0a into github:main Feb 4, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JS no-change-note-required This PR does not need a change note Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants