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

fix: dry run not working with @@query_label #80

Merged
merged 3 commits into from
Dec 26, 2024

Conversation

HampB
Copy link
Collaborator

@HampB HampB commented Dec 25, 2024

While investigating the issue with dry runs failing when @@query_labels is set, I couldn’t pinpoint the exact cause. However, I’ve implemented a quick (and perhaps somewhat dirty) solution: dropping the @@query_labels statement during dry runs.

Implementation:

The solution uses a regular expression to identify and remove the @@query_labels statement. While the regex might not be entirely foolproof, it has worked in all the scenarios I’ve tested.

Rationale:

Since query labels should not affect dry runs, I don’t foresee any issues with this approach. That said, if you have concerns or an alternative solution, Feel free to change it or let me know :-)

@ashish10alex ashish10alex changed the title bug: Dry run not working with @@query_label fix: dry run not working with @@query_label Dec 25, 2024
@ashish10alex
Copy link
Owner

Hi @HampB , thanks for the PR. Yh not pretty, but seems to be the logical approach. I have suggested slight modification to the PR here.

@ashish10alex ashish10alex changed the title fix: dry run not working with @@query_label bug: dry run not working with @@query_label Dec 25, 2024
@ashish10alex ashish10alex changed the title bug: dry run not working with @@query_label fix: dry run not working with @@query_label Dec 25, 2024
feat: reduce surface area over which regex is performed
@HampB
Copy link
Collaborator Author

HampB commented Dec 26, 2024

Ofcource, makes more sence. Your changes seems to work as intended. This looks good to me

@ashish10alex ashish10alex merged commit 35441ff into main Dec 26, 2024
@ashish10alex ashish10alex deleted the drop-query-labels-on-dry-run branch December 26, 2024 10: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