Skip to content

Actions: avoid N^2 parsing in common cases #18686

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

Merged
merged 3 commits into from
Feb 6, 2025

Conversation

asgerf
Copy link
Contributor

@asgerf asgerf commented Feb 5, 2025

The Bash parser has an inherent N^2 cost and we'll likely want to rewrite it eventually. But for now, this PR just makes it less likely to blow up in practice.

The parser has an inherent N^2 blowup and will need a rewrite eventually. For now I'm just trying to make it not blow up as often.
@github-actions github-actions bot added the Actions Analysis of GitHub Actions label Feb 5, 2025
@asgerf asgerf marked this pull request as ready for review February 6, 2025 08:12
@Copilot Copilot AI review requested due to automatic review settings February 6, 2025 08:12
@asgerf asgerf requested a review from a team as a code owner February 6, 2025 08:12
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

PR Overview

This pull request creates a new workflow file intended to test handling of large string data, including balanced and unbalanced quotes.

  • Adds many_strings.yml with extensive echo statements for testing.
  • Checks for potential N^2 behavior in the bash parser by using large datasets.

Changes

File Description
actions/ql/test/library-tests/.github/workflows/many_strings.yml New workflow to exercise large string parsing logic

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

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

@asgerf asgerf added the no-change-note-required This PR does not need a change note label Feb 6, 2025
Copy link
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

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

Looks plausible to me.

@asgerf asgerf merged commit 83ccdb7 into github:main Feb 6, 2025
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Analysis of GitHub Actions no-change-note-required This PR does not need a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants