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

Rate Limit on Mentor Requests #176

Open
aaron-junot opened this issue May 27, 2020 · 13 comments
Open

Rate Limit on Mentor Requests #176

aaron-junot opened this issue May 27, 2020 · 13 comments
Assignees
Labels
feedback: question A question needs an answer - can be used with other feedback issue labels priority: high This is an issue that should be fixed first project: rewrite This issue applies to the rewrite of Pybot status: awaiting acceptance Issue has not been accepted - it may need documentation, discussion, or a decision - the ice box type: code change Issue requires changes to the code base type: documentation Issue requires a change to the current documentation of the codebase or product type: enhancement Issue enhances a feature by adding more functionality

Comments

@aaron-junot
Copy link
Member

There exists a possibility that someone could put in a ridiculous amount of mentor requests, pinging the same mentors over and over again. Mentors would possibly then be encouraged to just mute the #mentors-internal channel, which would stop legitimate mentor requests from being answered in a timely fashion.

A rate limit should exist so that a given user can only put in a limited amount of mentor requests in a given time period. 3x per month was suggested, so let's start with that and see how it goes.

Acceptance criteria:

When attempting to put in too many mentor requests in a month, the user should see a message from slackbot informing them that they've put in as many mentor requests as allowed until the time when they'll be allowed to put it in again. For example:

Error: you have put in too many mentor requests. You will be allowed to submit another mentor request on June 15, 2020

The above message would be if the first of 3 mentor requests was put in on May 15, 2020.

@ghyde
Copy link

ghyde commented May 27, 2020

When a mentor request is made, I think there should also be a message like,

You currently have 2 requests remaining for this month.

This will provide a good user experience by letting them know:

  1. There is a limit to mentor requests.
  2. How many they have remaining.

@aaron-junot
Copy link
Member Author

I like that, that does improve the user experience. Also documenting this feedback from slack here:

Instead of limiting total mentor requests, maybe limit the number of requests per category?

Should include a message like "Please request assistance in #help or in the appropriate channels for group feedback" when you've reached the limit

@kylemh kylemh added the general: hacktoberfest Issue is a good fit for Hacktoberfest label Oct 1, 2020
@cskinner74
Copy link
Contributor

I'm still fairly new to the world of slack bot scripting, so forgive my noobish question. When it comes to features like this, is there an easy way for the bot to track exactly how many times a particular user has used a feature in a given time period? Or would a backend tracker have be built that adds a counter to the user each time the mentor request is used?

@aaron-junot
Copy link
Member Author

Since we're using Airtable to track the requests, I imagine you could just pull the data from airtable and then analyze it to see if they've hit the limit. From a UX perspective, we want to let the user know how many they have left, so you'll need to put this logic in the right place to be able to do that

@cskinner74
Copy link
Contributor

Ah that makes sense, thanks for the info :)

@chynh
Copy link
Contributor

chynh commented Oct 18, 2020

Hey @wskinner74 , are you actively working on this issue? If now, I'd like to give it a shot.

@cskinner74
Copy link
Contributor

@chynh I'm not actively working on it, feel free to run with it!

@chynh
Copy link
Contributor

chynh commented Oct 19, 2020

@aaron-suarez Would you be able to provide me with an airtable api key so I can work on this? Also, was wondering if you could add a new column to this table as that is a part of the solution that I had in mind.

@aaron-junot
Copy link
Member Author

@chynh I'd prefer not to give an airtable API key to production for development purposes. I think I can make you a copy of a staging table and you can do whatever you want with your own copy of the table. I just want to make sure all actual PII has been removed, so give me a bit to look into that.

Thanks for your efforts here!

@chynh
Copy link
Contributor

chynh commented Oct 20, 2020

@aaron-suarez Makes sense. As long as there's something I can work with. I think I would have to come up with a workaround in the end since I know submitting mentor request would query mentor table as well.

@aaron-junot
Copy link
Member Author

@sairina is helping me scrub PII out of the table so we can make a copy for you. Once we have that complete, we'll connect with you to give you access to the dev table. Thanks for your patience on this!

@aaron-junot
Copy link
Member Author

@chynh Thanks to @sairina we now have a version of the table that is PII free! 🙌

If you can connect with me on slack or over email, I can invite you to that airtable base and you can get the API key and start working on this issue 😄

@aaron-junot aaron-junot added priority: high This is an issue that should be fixed first and removed general: hacktoberfest Issue is a good fit for Hacktoberfest labels Aug 18, 2021
@JudsonStevens
Copy link
Collaborator

@aaron-suarez - after working on this a bit for the rewrite, I think 3x requests per month is probably a little low. How about 3x requests per week? In the last couple years I haven't seen this issue happen, so I'd rather make a higher limit and then lower it later if needed than a lower limit that we have to raise.

My current implementation is to have a new View on the Mentor Requests Airtable table that only shows requests in the last month (can also do last week). We search this for the mentee's name and count them that way. Any time frame should be easy to do. I've also modified the mentorship_request_received message to show whatever limit we decide on.

@JudsonStevens JudsonStevens self-assigned this Jan 1, 2022
@JudsonStevens JudsonStevens added feedback: question A question needs an answer - can be used with other feedback issue labels project: rewrite This issue applies to the rewrite of Pybot status: awaiting acceptance Issue has not been accepted - it may need documentation, discussion, or a decision - the ice box type: code change Issue requires changes to the code base type: documentation Issue requires a change to the current documentation of the codebase or product type: enhancement Issue enhances a feature by adding more functionality labels Jan 1, 2022
@JudsonStevens JudsonStevens changed the title Rate limit on mentor requests Rate Limit on Mentor Requests Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback: question A question needs an answer - can be used with other feedback issue labels priority: high This is an issue that should be fixed first project: rewrite This issue applies to the rewrite of Pybot status: awaiting acceptance Issue has not been accepted - it may need documentation, discussion, or a decision - the ice box type: code change Issue requires changes to the code base type: documentation Issue requires a change to the current documentation of the codebase or product type: enhancement Issue enhances a feature by adding more functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants