Skip to content

Allow comma separated SUBNET_FILTER values #719

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zipiju
Copy link
Contributor

@zipiju zipiju commented Apr 10, 2025

Allow to specify multiple allowed subnets in SUBNET_FILTER by separating them with comma. This will accept single subnet, such as SUBNET_FILTER=spark but also multiple subnets, such as SUBNET_FILTER=spark,arweave,walrus.

Allow to specify multiple allowed subnets in SUBNET_FILTER by separating them with comma.
This will accept single subnet, such as SUBNET_FILTER=spark but also multiple subnets, such as SUBNET_FILTER=spark,arweave,walrus.
@@ -85,7 +85,7 @@ const maybeReportErrorToSentry = (/** @type {unknown} */ err) => {
}

const matchesSubnetFilter = (subnet) =>
SUBNET_FILTER === '' || subnet === SUBNET_FILTER
SUBNET_FILTER === '' || SUBNET_FILTER.split(',').includes(subnet);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
SUBNET_FILTER === '' || SUBNET_FILTER.split(',').includes(subnet);
SUBNET_FILTER === '' || SUBNET_FILTER.split(',').includes(subnet)

Copy link
Member

Choose a reason for hiding this comment

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

Implementation looks great! Could you please add a simple passing test for this feature?

Copy link
Member

Choose a reason for hiding this comment

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

Also the README needs to be updated

Copy link
Member

@bajtos bajtos left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution, @zipiju!

I agree with what Julian wrote above.

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