Giter VIP home page Giter VIP logo

boomerang's People

Contributors

dependabot[bot] avatar vsemionov avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

ahmadabdulnasir

boomerang's Issues

Prevent slashes (/) in usernames

Usernames may come from the local parts of the email addresses in a social network. Slashes are a valid character in them. This will confuse the parsing of arguments in URLs, which are separated by slashes. Ensure that they are replaced with other characters (dots or dashes).

Unexpose secret key

Obtain secret key from a heroku config var.
Use the current one as a default for local installs.
Update deployment in readme.

Front-end logout behavior

problem: logout clicked, requested on backend, but jwt persists OR jwt cleared but logged-in session persists
solution: remove jwt on click logout and on init when jwt cookie not present

Add the until query parameter to page links

For consistency of the returned data between requests, if the until parameter is not specified, but generated and returned, it should also be added to the returned next and previous page links.

show messages

Show Django messages in API browser.
If possible, vary style depending on severity.

Conditionally list child objects

Add an option that allows the listing of child objects in a parent (e.g. notes in a notebook).

Read the option from the environment and turn it off by default.

This will:

  • improve performance by eliminating a database query per child relation
  • simplify the output

Upgrade dependencies

django-allauth 0.33.0
django-rest-framework 3.6.4
Check for updates to the account templates.
Test customizations.

ISE 500 after signup with redirect

Signup redirect is necessary for returning to the front-end after creating an account. However, this flow causes an internal server error (http 500) response.

Check X-Forwarded-For header

This header is used to determine the source of the requests. After an intermediate second proxy was introduced, this header should contain two addresses. This is required for the restframework to correctly throttle requests.

Refactoring the core mixins

Declare mixin dependencies.

Move deletion support out of sync to a new mixin?

Rafactor and move deleted endpoint as it does the work of two mixins.

If possible also move the search endpoint.

Limit deleted objects

Enforce the limit when deleting an object.
Also, when listing deleted objects, return 206 if the limit is reached.

Search and sort cleanup

Configurable sort field translation map.
Configurable search and sort parameter names.
Clean up module and class constants.
Refactor away filter<->mixin dependencies like the reference to view.full_text_search in SearchFilter.
Refactor the fuzzy search logic into the filter.

Hide links to grandchildren listings

Currently, user objects in the API contain links to aggregate note lists. Those lists shall be used for syncing objects with fewer requests. The output will be cleaner if the links are hidden.

Rename URL arguments

Rename user_username to username
Rename all other arguments to <model_name>_id
(but after tests are available, because breakage will occur)

Tests

Integrate TravisCI
Generate reports with coverage
Test permissions for all endpoints
Test functioning of endpoints
Test mixins for all endpoints
Report (number of) queries per endpoint operation (with a populated db, so duplicated queries will be shown)
Test configured features: pagination
Basic acceptance test of dependencies not used in own endpoints: cors headers, redis cache, allauth, raven
Test dependency customizations: facebook email verified, usename generated from email, confirmation emails sent

Multiple possible problems

Check locking order from parent to child.

All write operations that follow reads should be atomic with the read objects locked?

Test consistency of rank order. If possible, enable sort after search.

For writable sync, checking 'until' is not reachable because it filters the queryset and non-matching results will not be returned.

Write condition 'at' may cause race conditions.

Lock parent objects before create/update/delete of their children

It may be possible for a write operation to a parent object's children to fail if the parent is removed by cleardeleted.py just before the child operation is performed. In this case, the client would receive an 500 internal server error status, instead of 404 not found.

This may be prevented (if necessary) by locking the child object for (for update and delete requests), which will block a delete of the parent because it would cascade to the child. As for creates, they would require explicit locking of the parent (unless the rest framework selects the parent for update during validation of the parent field against the parent queryset).

User list pagination warning

C:\Users\vsemi_000\venv\boomerang\lib\site-packages\rest_framework\pagination.py:208: UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class 'django.contrib.auth.models.User'> QuerySet.
paginator = self.django_paginator_class(queryset, page_size)

Code cleanup

  • separate limits into their own mixin
  • separate dynamic serializers into a separate file
  • separate parent lookups and/or locking into their own mixin?
  • refactor disabled mixins with common code
  • remove view-mixin relationships
  • redundancy of perform_search and disabled search mixin?
  • independence of mixin order (e.g. perform_*() calls parent and is transactional)
  • move mixins into a package
  • other cleanup?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.