Skip to content

Start of policy support#645

Open
Frassle wants to merge 1 commit intomainfrom
fraser/policy
Open

Start of policy support#645
Frassle wants to merge 1 commit intomainfrom
fraser/policy

Conversation

@Frassle
Copy link
Member

@Frassle Frassle commented Jun 12, 2025

This is not complete, but it's enough to get the first two conformance tests we wrote for policy passing.

This is pretty much a copy of the Go SDK (which heavily copied from the python and nodejs SDKs), plus taking some ideas from the C# provider SDK.

A few things worth calling out.

  1. I've added a nuget cache clear to the start of the language tests. Me and Brandon both wasted loads of time when dealing with dotnet conformance tests because nuget was picking up old builds of the core SDK from caches. No more, we know nuke the cache before running the tests.
  2. I had to add WaitDelay to the run plugin code. Seemed the dotnet run of the analyzer plugin could leave stdio pipes open even though it had terminated. Without WaitDelay run plugin would block forever on cmd.Wait().
  3. Some parts of the policy SDK are partly filled in (Like config schema and properties) but not working and not currently tested. I think they're about the right shape, but we might tweak them once we have conformance tests in place to check them.

@Frassle Frassle marked this pull request as ready for review June 12, 2025 14:26
@Frassle Frassle requested a review from a team as a code owner June 12, 2025 14:26
@Frassle Frassle force-pushed the fraser/policy branch 2 times, most recently from da34917 to ec7a460 Compare June 12, 2025 14:36
public interface IPolicyManager
{
/// <summary>
/// ReportViolation reports a policy violation with the given message and optional URN (it can be left null or empty).
Copy link
Contributor

@rosieks rosieks Jun 13, 2025

Choose a reason for hiding this comment

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

ReportViolation is redundant. There's no reason to write method name in summary.

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

Comments