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

Replace Whitelist with Safelist #494

Merged
merged 2 commits into from
Jun 23, 2021
Merged

Replace Whitelist with Safelist #494

merged 2 commits into from
Jun 23, 2021

Conversation

mrunalk
Copy link
Contributor

@mrunalk mrunalk commented Jun 29, 2020

This is a BREAKING CHANGE. Consumers currently relying upon scrub_whitelist or setWhitelist will need to update their code or configuration to scrub_safelist and setSafelist respectively.

@@ -50,7 +50,7 @@ class Config
'capture_email',
'root',
'scrub_fields',
'scrub_whitelist',
'scrub_safelist',
Copy link
Contributor

Choose a reason for hiding this comment

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

I know the assignment here says $options is private, but according to the docs the user has access to set this. Will this change affect existing users?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@waltjones, you bring up a good point. I am not totally sure how options are exposed. Let me look into it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Two points:

  1. We can add a new key, but we shouldn't remove scrub_whitelist at the same time: there should be at least a minor version increment between them.

  2. I prefer allowlist instead of safelist, because the opposite is (IMO) clearer: denylist vs unsafelist. Is the "safelist" nomenclature a standard in Rollbar?

Copy link
Contributor

Choose a reason for hiding this comment

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

allowlist was considered, but the consensus was to standardize on safelist (and blocklist.)

The CH story for each of the SDKs is to only deprecate, not remove, public facing names until the next major version release.

Copy link
Contributor

@icsahn-rollbar icsahn-rollbar 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 except what @waltjones pointed.
We are exposing scrub_whitelist and it will break backward compatibility, which should be fine if document it properly and give notice for depreciation.
Ref: https://docs.rollbar.com/docs/php-configuration-reference

@bishopb bishopb self-assigned this Dec 2, 2020
@bishopb bishopb added Rank: 4 - Low Tackle when there are no Critical, Major, or Minor requests. Status: 2 - Accepted The scope and characteristics of the request are defined and ready to be worked. Type: Enhancement Changes that add to, improve upon, enhance, or extend the existing component. labels Dec 2, 2020
@bishopb
Copy link
Contributor

bishopb commented Dec 2, 2020

I have marked this as "Status: 2 - Accepted" because the concept and need is understood; there are still some questions on the implementation, though: see above.

phpunit.xml Outdated
<directory suffix=".php">./src</directory>
</whitelist>
</safelist>
Copy link
Contributor

Choose a reason for hiding this comment

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

This change is not relevant to the implementation. Needs reversion.

Copy link

@akornich akornich left a comment

Choose a reason for hiding this comment

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

lgtm

@bishopb bishopb merged commit 70c4cb9 into master Jun 23, 2021
@bishopb bishopb deleted the safelist_blocklist branch August 28, 2021 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rank: 4 - Low Tackle when there are no Critical, Major, or Minor requests. Status: 2 - Accepted The scope and characteristics of the request are defined and ready to be worked. Type: Enhancement Changes that add to, improve upon, enhance, or extend the existing component.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants