Page MenuHomeSoftware Heritage

rate limit search in origin-save table
ClosedPublic

Authored by kalpitk on Mar 28 2019, 5:45 PM.

Details

Summary

Add searchDelay of 1s to DataTable

Diff Detail

Repository
rDWAPPS Web applications
Branch
arcpatch-D1317
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 4958
Build 6632: tox-on-jenkinsJenkins
Build 6631: arc lint + arc unit

Event Timeline

@kalpitk , can you give me more details about this change ?

Also, please run this in your shell:

arc set-config history.immutable true

Without this, arcanist amend your commit messages which force me to edit them before being able to land your diffs.

@anlambert history.immutable is already set to true.

With the current implementation, we have no search delay. i.e. - every keydown triggers a request. In case of a big query, it unnecessarily sends requests. (Piles up unnecessary queries for the server)

with this Diff, request is sent when user finishes typing. (when no key is pressed for 1000 ms)

@anlambert history.immutable is already set to true.

My bad, arcanist seems to apply some commit message template when I call arc patch from my side
to integrate your changes. I am not a big fan of that behavior but anyway.

We have other DataTable uses in swh-web assets. Can you also set the searchDelay option
to the remaining ones ?

Also you will have to rebase on master before updating the diff as we like to keep a linear history.

This revision now requires changes to proceed.Mar 29 2019, 4:48 PM

@anlambert Oh the admin ones. Will update.
Anyways, how do I test as admin when I run it locally?

You need to create a superuser account through the following command:

$ python3 -m swh.web.manage createsuperuser

Then reach the /admin endpoint to log in and unlock the admin interface

  • add SearchDelay to admin DataTables

Nice! Can you squash the commits and then i land that diff.

This revision is now accepted and ready to land.Mar 29 2019, 6:35 PM

Last one thing, rebase to origin/master as the diff can not be merged otherwise.

This revision was landed with ongoing or failed builds.Mar 29 2019, 6:57 PM
This revision was automatically updated to reflect the committed changes.