Skip to content

Rate Limit on Mentor Requests #176

Open

Description

@aaron-junot

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.

Activity

  1. ghyde commented on May 27, 2020

    @ghyde

    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.
  2. aaron-junot commented on May 27, 2020

    @aaron-junot
    MemberAuthor

    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

  3. cskinner74 commented on Oct 6, 2020

    @cskinner74
    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?

  4. aaron-junot commented on Oct 6, 2020

    @aaron-junot
    MemberAuthor

    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

  5. cskinner74 commented on Oct 6, 2020

    @cskinner74
    Contributor

    Ah that makes sense, thanks for the info :)

  6. chynh commented on Oct 18, 2020

    @chynh
    Contributor

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

  7. cskinner74 commented on Oct 19, 2020

    @cskinner74
    Contributor

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

  8. chynh commented on Oct 19, 2020

    @chynh
    Contributor

    @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.

  9. aaron-junot commented on Oct 19, 2020

    @aaron-junot
    MemberAuthor

    @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!

  10. chynh commented on Oct 20, 2020

    @chynh
    Contributor

    @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.

  11. aaron-junot commented on Oct 20, 2020

    @aaron-junot
    MemberAuthor

    @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!

  12. aaron-junot commented on Oct 21, 2020

    @aaron-junot
    MemberAuthor

    @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 😄

  13. added
    priority: highThis is an issue that should be fixed first
    and removed on Aug 18, 2021
  14. JudsonStevens commented on Jan 1, 2022

    @JudsonStevens
    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.

  15. self-assigned this
    on Jan 1, 2022
  16. added
    feedback: questionA question needs an answer - can be used with other feedback issue labels
    project: rewriteThis issue applies to the rewrite of Pybot
    status: awaiting acceptanceIssue has not been accepted - it may need documentation, discussion, or a decision - the ice box
    type: code changeIssue requires changes to the code base
    type: documentationIssue requires a change to the current documentation of the codebase or product
    type: enhancementIssue enhances a feature by adding more functionality
    on Jan 1, 2022
  17. changed the title [-]Rate limit on mentor requests[/-] [+]Rate Limit on Mentor Requests[/+] on Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feedback: questionA question needs an answer - can be used with other feedback issue labelspriority: highThis is an issue that should be fixed firstproject: rewriteThis issue applies to the rewrite of Pybotstatus: awaiting acceptanceIssue has not been accepted - it may need documentation, discussion, or a decision - the ice boxtype: code changeIssue requires changes to the code basetype: documentationIssue requires a change to the current documentation of the codebase or producttype: enhancementIssue enhances a feature by adding more functionality

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions