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

fix: include the custom rules warning if feature flag is not enabled [CFG-1868] #3316

Merged
merged 1 commit into from
Jun 13, 2022

Conversation

teodora-sandu
Copy link
Contributor

@teodora-sandu teodora-sandu commented Jun 13, 2022

What does this PR do?

In #3287, we removed the warning for custom rules completely, but we were meant to only remove it if the feature flag is enabled.

Where should the reviewer start?

Have a look at the previous PR and notice the added feature flag check in this PR.

How should this be manually tested?

The ticket can be verified using https://github.com/snyk/custom-rules-examples/

  • Install snyk-iac-rules: https://github.com/snyk/snyk-iac-rules
  • Build a local bundle: snyk-iac-rules build
  • Run the rules to see them in the results: snyk iac test ./rules/CUSTOM-RULE-1/fixtures --rules=bundle.tar.gz
  • Run the rules and send them to the Platform: snyk-dev iac test ./rules/CUSTOM-RULE-1/fixtures --rules=bundle.tar.gz --report
  • Check that no warning message appears now.

@teodora-sandu teodora-sandu marked this pull request as ready for review June 13, 2022 09:24
@teodora-sandu teodora-sandu requested a review from a team as a code owner June 13, 2022 09:24
Copy link
Contributor

@ofekatr ofekatr left a comment

Choose a reason for hiding this comment

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

Excellent catach, and LGTM.
I've added a couple of nit comments for increasing clarification.
Feel free to go through them with no need to reply.

test/jest/acceptance/iac/custom-rules.spec.ts Outdated Show resolved Hide resolved
);

expect(stdout).not.toContain(
"Please note that your custom rules will not be sent to the Snyk platform, and will not be available on the project's page.",
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: The message could be extracted and reused as a constant in the test suite to clarify it's the same message

@teodora-sandu teodora-sandu force-pushed the fix/include-custom-rules-warning branch 3 times, most recently from 4071997 to 17d458a Compare June 13, 2022 09:46
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