Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: support filtering users table by login type#17238

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethanndickson merged 15 commits intocoder:mainfromutsavll0:main
Apr 9, 2025

Conversation

utsavll0
Copy link
Contributor

#15896 Mentions ability to add support for filtering by login type

The issue mentions that backend API support exists but the backend did not seem to have the support for this filter. So I have added the ability to filter it.

I also added a corresponding update to readme file to make sure the docs will correctly showcase this feature

@cdr-botcdr-botbot added the communityPull Requests and issues created by the community. labelApr 3, 2025
@github-actionsGitHub Actions
Copy link

github-actionsbot commentedApr 3, 2025
edited
Loading

All contributors have signed the CLA ✍️ ✅
Posted by theCLA Assistant Lite bot.

@utsavll0utsavll0 changed the titlePR: Fixes #15896 Support filtering Users table by login typefeat(backend) support filtering Users table by login typeApr 3, 2025
@utsavll0utsavll0 changed the titlefeat(backend) support filtering Users table by login typefeat: support filtering Users table by login typeApr 3, 2025
@utsavll0
Copy link
ContributorAuthor

I have read the CLA Document and I hereby sign the CLA

cdrci2 added a commit to coder/cla that referenced this pull requestApr 3, 2025
@utsavll0utsavll0 changed the titlefeat: support filtering Users table by login typefeat: support filtering users table by login typeApr 3, 2025
@ethanndickson
Copy link
Member

ethanndickson commentedApr 3, 2025
edited
Loading

Thanks for the PR!

Looking good so far, but we'll need some tests. I believe the right place for those iscoderd/users_test.go

Also, please runmake fmt/go,make lint/go, andmake gen after each change!

utsavll0 reacted with thumbs up emoji

@utsavll0
Copy link
ContributorAuthor

utsavll0 commentedApr 3, 2025
edited
Loading

@ethanndickson I added a few tests for the PR and I also ran the commands which you mentioned

Edit: Can you please help me in running the users_test.go file? I am not able to figure out why the test is failing. Making a call from the frontend works fine but the unit test keeps on failing. I am not sure if there is some extra config required to make it run

Copy link
Member

@ethanndicksonethanndickson left a comment
edited
Loading

Choose a reason for hiding this comment

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

Your newly written tests are failing as, by default, DB queries are ran against a fake DB indbmem.go. You'll need to update theGetUsers Go function with the same logic as the Postgres query.

To rungo test against postgres, just setDB=ci:
DB=ci go test -run "TestGetUsersFilters" github.com/coder/coder/v2/coderd
(This is essentially whatmake test-postgres does)

Copy link
Member

@ethanndicksonethanndickson left a comment
edited
Loading

Choose a reason for hiding this comment

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

Nice work on these tests! Just a few comments, mostly on style.

CI is all passing except forweekly-docs / check-docs, which you can safely ignore (it should go away if you merge / rebase your branch off main)

@utsavll0
Copy link
ContributorAuthor

Thank you for your feed@ethanndickson. I am to blame for these silly errors because of my over-reliance on copilot. I have fixed the style and removed unnecessary comments from the code. Please have a look again.

ethanndickson reacted with heart emoji

@utsavll0
Copy link
ContributorAuthor

ok@ethanndickson I think this final test should do it

Copy link
Member

@ethanndicksonethanndickson left a comment

Choose a reason for hiding this comment

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

Looking good, just two comments on the copy.

ethanndickson
ethanndickson previously approved these changesApr 9, 2025
Copy link
Member

@ethanndicksonethanndickson left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the PR and your patience through these review cycles! ❤️

utsavll0 reacted with heart emoji
@ethanndicksonethanndickson dismissed theirstale reviewApril 9, 2025 03:51

Waiting for macOS runner issue to be resolved, will reapprove

@utsavll0
Copy link
ContributorAuthor

Thank you@ethanndickson for staying with me. This was my first ever PR in Go and I learned a lot. 🥳 🍾

ethanndickson reacted with hooray emoji

@ethanndicksonethanndickson merged commit0e65821 intocoder:mainApr 9, 2025
31 checks passed
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsApr 9, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@ethanndicksonethanndicksonethanndickson approved these changes

Assignees

@utsavll0utsavll0

Labels
communityPull Requests and issues created by the community.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@utsavll0@ethanndickson

[8]ページ先頭

©2009-2025 Movatter.jp