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

Initialize terrascan at runtime #5246

Merged
merged 1 commit into from
Feb 9, 2024
Merged

Initialize terrascan at runtime #5246

merged 1 commit into from
Feb 9, 2024

Conversation

ferrarimarco
Copy link
Collaborator

Proposed changes

Terrascan runs initialization anyway when scanning files, so there's no point in running it at build time. Also, this works around a Terrascan bug that caused it to fail its initialization if $HOME/.terrascan directory is not present. This happens on GitHub Actions because it configures a $HOME directory that is different from ours.

Readiness checklist

In order to have this pull request merged, complete the following tasks.

Pull request author tasks

  • I included all the needed documentation for this change.
  • I provided the necessary tests.
  • I squashed all the commits into a single commit.
  • I followed the Conventional Commit v1.0.0 spec.
  • I wrote the necessary upgrade instructions in the upgrade guide.
  • If this pull request is about and existing issue,
    I added the Fix #ISSUE_NUMBER label to the description of the pull request.

Super-linter maintainer tasks

  • Label as breaking if this change breaks compatibility with the previous released version.
  • Label as either: automation, bug, documentation, enhancement, infrastructure.

@ferrarimarco ferrarimarco added bug Something isn't working O: backlog 🤖 Backlog, stale ignores this label labels Feb 7, 2024
@ferrarimarco ferrarimarco self-assigned this Feb 7, 2024
@ferrarimarco
Copy link
Collaborator Author

(pushing a test only first, I want to confirm that this fails without the proposed fix that I'll push later)

@ferrarimarco ferrarimarco force-pushed the fix-terrascan-init branch 2 times, most recently from 35cb85c to 091d019 Compare February 8, 2024 16:19
@ferrarimarco ferrarimarco marked this pull request as ready for review February 8, 2024 18:18
Hanse00
Hanse00 previously approved these changes Feb 9, 2024
Copy link
Collaborator

@Hanse00 Hanse00 left a comment

Choose a reason for hiding this comment

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

Looks good. I left a comment for a clarifying question, but it's not one I think should hold up this work. Just looking to make sure I understand context.

Terrascan runs initialization anyway when scanning files, so there's no
point in running it at build time. Also, this works around a Terrascan
bug that caused it to fail its initialization if $HOME/.terrascan
directory is not present. This happens on GitHub Actions because it
configures a $HOME directory that is different from ours.
@ferrarimarco ferrarimarco added this pull request to the merge queue Feb 9, 2024
Merged via the queue into main with commit 5b5e54a Feb 9, 2024
10 checks passed
@ferrarimarco ferrarimarco deleted the fix-terrascan-init branch February 9, 2024 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working O: backlog 🤖 Backlog, stale ignores this label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants