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

Add tag filter to new project features endpoint #2306

Closed
chriswk opened this issue Oct 31, 2022 · 4 comments · Fixed by #2693
Closed

Add tag filter to new project features endpoint #2306

chriswk opened this issue Oct 31, 2022 · 4 comments · Fixed by #2693
Labels
enhancement new This issue has not been triaged yet

Comments

@chriswk
Copy link
Contributor

chriswk commented Oct 31, 2022

Describe the feature request

I would like to be able filter features by their tags. Something similar to what we already have for /api/admin/features (which is deprecated).

Background

Previously with our now deprecated /api/admin/features endpoint, we could filter by tags using ?tag[]=TAGTYPE:TAGVALUE (curious detail, this was the first feature I added when I joined in January 2021).

Solution suggestions

Stealing the logic from our previous /api/admin/features for extracting the tags parameter from query params seems like a good way to go. Our feature service/stores already supports filtering by tags as evidenced by the fact that we can still filter by tags through the deprecated endpoint.

@chriswk chriswk added enhancement new This issue has not been triaged yet labels Oct 31, 2022
@stale
Copy link

stale bot commented Dec 1, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 1, 2022
@Tymek Tymek mentioned this issue Dec 5, 2022
7 tasks
@stale stale bot closed this as completed Dec 11, 2022
@jlane-tkww
Copy link

I see that stale bot marked this as closed, is it possible to still request this feature remain open?

@chriswk chriswk removed the stale label Dec 14, 2022
@chriswk
Copy link
Contributor Author

chriswk commented Dec 14, 2022

Yes. I'll see what I can get done on this.

@chriswk chriswk reopened this Dec 14, 2022
chriswk pushed a commit that referenced this issue Dec 14, 2022
The previous /api/admin/features endpoint supported querying with tag
and namePrefix parameters. This PR adds this functionality to
/api/admin/projects/<project>/features as well, allowing to replicate
queries that used to work.

fixes: #2306
chriswk pushed a commit that referenced this issue Dec 14, 2022
The previous /api/admin/features endpoint supported querying with tag
and namePrefix parameters. This PR adds this functionality to
/api/admin/projects/<project>/features as well, allowing to replicate
queries that used to work.

fixes: #2306
@chriswk chriswk linked a pull request Dec 14, 2022 that will close this issue
@jlane-tkww
Copy link

Yes. I'll see what I can get done on this.

Thank you!

chriswk pushed a commit that referenced this issue Dec 16, 2022
The previous /api/admin/features endpoint supported querying with tag
and namePrefix parameters. This PR adds this functionality to
/api/admin/projects/<project>/features as well, allowing to replicate
queries that used to work.

fixes: #2306
chriswk pushed a commit that referenced this issue Dec 16, 2022
## About the changes
The deprecated /api/admin/features endpoint supported querying with tag
and namePrefix parameters.

This PR adds this functionality to
/api/admin/projects/<project>/features as well, allowing to replicate
queries that used to work.

Closes #2306

### Important files
src/lib/db/feature-strategy-store.ts
src/test/e2e/stores/feature-strategies-store.e2e.test.ts

## Discussion points
I'm extending our query parameters support for
/api/admin/projects/<projectId>/features endpoint. This will be
reflected in our open-api spec, so I also made an
adminFeaturesQuerySchema for this.

Also, very open for something similar to what we did for the modifyQuery
for the archived parameter, but couldn't come up with a good way to
support subselects using the query builder, it just ended up blowing the
stack. If anyone has a suggestion, I'm all ears.

Co-authored-by: Thomas Heartman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new This issue has not been triaged yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants