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

cmd: add watch mode to opa test command #5812

Conversation

johanfylling
Copy link
Contributor

Refactoring file-watching functionality in run command, to be reused in test command.

This is WiP. It's currently a bit messy, but gets the job done.

Fixes: #1719

Fixes: open-policy-agent#1719

Signed-off-by: Johan Fylling <johan.dev@fylling.se>
@netlify
Copy link

netlify bot commented Apr 3, 2023

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit 0b8085c
🔍 Latest deploy log https://app.netlify.com/sites/openpolicyagent/deploys/642b20e772a9d40007d9c9a7
😎 Deploy Preview https://deploy-preview-5812--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

}
}

// It's up to onReload to update the store with loaded content
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is my biggest grievance with the current approach. We're doing some updates to the store above, but not all necessary updates. Either, we should be doing all updates, or none.
The problem with doing all updates here is that currently, some of that, such as bundle activation, is deep within the compile/run of running/testing a policy. This could be refactored, to some extent, but I'm weary of creating even more paths through the code than already exist.

@stale
Copy link

stale bot commented May 3, 2023

This pull request has been automatically marked as stale because it has not had any activity in the last 30 days.

@stale stale bot added the inactive label May 3, 2023
@ashutosh-narkar
Copy link
Member

Closing in favor of #5950.

Copy link
Contributor Author

@johanfylling johanfylling left a comment

Choose a reason for hiding this comment

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

A few comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for watch mode in opa test
2 participants