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

feat: search identities by dashboard alias #4569

Merged
merged 21 commits into from
Sep 4, 2024

Conversation

matthewelwell
Copy link
Contributor

@matthewelwell matthewelwell commented Sep 2, 2024

Changes

Adds functionality to search edge identities by a dashboard alias.

Note: requires the relevant index to be created on the flagsmith_identities table in dynamodb.

How did you test this code?

I have manually tested this PR by running the API pointed to staging DB and dynamo tables, running the FE and testing searching for dashboard_alias:....

I have also added some new tests to the python unit tests for specific use cases.

Copy link

vercel bot commented Sep 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Sep 4, 2024 2:22pm
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Visit Preview Sep 4, 2024 2:22pm
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Visit Preview Sep 4, 2024 2:22pm

@github-actions github-actions bot added front-end Issue related to the React Front End Dashboard api Issue related to the REST API feature New feature or request labels Sep 2, 2024
Copy link
Contributor

github-actions bot commented Sep 2, 2024

Uffizzi Preview deployment-55807 was deleted.

@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Sep 2, 2024
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Sep 2, 2024
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Sep 2, 2024
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Sep 2, 2024
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Sep 2, 2024
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Sep 2, 2024
@github-actions github-actions bot removed the feature New feature or request label Sep 2, 2024
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Sep 3, 2024
Copy link
Contributor

github-actions bot commented Sep 3, 2024

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-4569 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api-test:pr-4569 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-4569 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-4569 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-4569 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-4569 Finished ✅ Results

Copy link
Contributor

@zachaysan zachaysan left a comment

Choose a reason for hiding this comment

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

Looks great 🥇

api/pyproject.toml Outdated Show resolved Hide resolved
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Sep 4, 2024
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Sep 4, 2024
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Sep 4, 2024
@matthewelwell matthewelwell added this pull request to the merge queue Sep 4, 2024
Merged via the queue into main with commit 5c02c1e Sep 4, 2024
35 checks passed
@matthewelwell matthewelwell deleted the feat/search-identities-by-dashboard-alias branch September 4, 2024 14:45
@kyle-ssg
Copy link
Member

kyle-ssg commented Sep 17, 2024

@matthewelwell Is there a way to make this an or filter (maybe it is and I'm missing how it works)? The reason I ask is that it'd be super clunky to have to specify whether we're searching by id or alias especially in the case where I only have a few aliases and the rest of the time I search by id.

image

@matthewelwell
Copy link
Contributor Author

@matthewelwell Is there a way to make this an or filter (maybe it is and I'm missing how it works)? The reason I ask is that it'd be super clunky to have to specify whether we're searching by id or alias especially in the case where I only have a few aliases and the rest of the time I search by id.

image

We'll, yes, technically I could. But I think the UX should force the user to choose what they're searching on. The two things will always be very different fields anyway, so I'm not sure what your concern is?

@kyle-ssg
Copy link
Member

kyle-ssg commented Sep 18, 2024

I think it's just annoying/clunky to have to select what to search on vs just typing a value, I don't think they should really have to tell flagsmith they are wanting to search for an alias vs id especially given that they'd have very different values.

I.e. if I type kyle id always want to be searching for an alias, if I paste an id I'd always want to search by id. In both those cases I think I'd often see no results then realise I have to change a filter.

@kyle-ssg kyle-ssg mentioned this pull request Sep 18, 2024
4 tasks
@matthewelwell
Copy link
Contributor Author

@kyle-ssg as discussed on slack, adding search across both entities is technically challenging on the API (since it requires sending 2 separate search requests to dynamo). Let's implement the selector for now and add this as an improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API feature New feature or request front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants