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

[SNC-371] Sending compiled config in policy decide and eval subcommands #964

Merged
merged 2 commits into from
Jul 17, 2023

Conversation

sagar-connect
Copy link
Contributor

@sagar-connect sagar-connect commented Jul 14, 2023

Checklist

=========

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have checked for similar issues and haven't found anything relevant.
  • This is not a security issue (which should be reported here: https://circleci.com/security/)
  • I have read Contribution Guidelines.

Internal Checklist

  • I am requesting a review from my own team as well as the owning team
  • I have a plan in place for the monitoring of the changes that I am making (this can include new monitors, logs to be aware of, etc...)

Changes

=======

  • Sending compiled config in policy decide and eval subcommands
  • Using testify framework in policy_test.go

Rationale

=========

What was the overarching product goal of this PR as well as any pertinent
history of changes

Considerations

==============

Why you made some of the technical decisions that you made, especially if the
reasoning is not immediately obvious

Screenshots

============

Before

Image or [gif](https://giphy.com/apps/giphycapture)

After

Image or gif where change can be clearly seen

Here are some helpful tips you can follow when submitting a pull request:

  1. Fork the repository and create your branch from main.
  2. Run make build in the repository root.
  3. If you've fixed a bug or added code that should be tested, add tests!
  4. Ensure the test suite passes (make test).
  5. The --debug flag is often helpful for debugging HTTP client requests and responses.
  6. Format your code with gofmt.
  7. Make sure your code lints (make lint). Note: This requires Docker to run inside a local job.

@sagar-connect sagar-connect requested a review from a team as a code owner July 14, 2023 13:09
@sagar-connect sagar-connect force-pushed the SNC-371-send-compiled-config-policy-decision branch 2 times, most recently from 49fec30 to 66e488c Compare July 14, 2023 13:24
@sagar-connect sagar-connect force-pushed the SNC-371-send-compiled-config-policy-decision branch from 66e488c to c39496b Compare July 14, 2023 13:37
cmd/policy/policy.go Outdated Show resolved Hide resolved
Copy link
Contributor

@abdelDriowya abdelDriowya left a comment

Choose a reason for hiding this comment

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

LGTM
not sure how to test pipeline-parameters though

@sagar-connect
Copy link
Contributor Author

LGTM not sure how to test pipeline-parameters though

Right.
The tests around pipeline-parameters aren't really relevant to these changes as they would be testing that they are parsed and sent to /api/v2 correctly. Since these changes are reusing cofig.ProcessConfig method for parsing the pipelines-parameters, it's relying on the existing tests around it.

@sagar-connect sagar-connect merged commit 35d39ea into main Jul 17, 2023
@sagar-connect sagar-connect deleted the SNC-371-send-compiled-config-policy-decision branch July 17, 2023 12:37
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.

3 participants