Reduce the number of API requests when posting review requests.

Review Request #6844 — Created Jan. 31, 2015 and submitted

Information

RBTools
release-0.7.x
1a9616a...

Reviewers

When posting review requests, we have two unnecessary API requests: One
to the top-level validation resource (used solely as a link to the diff
validation resource), and one for the user source coming off of a
session resource.

We now use the URI templates to get the diff validation resource
directly, and we expand the user resource in the session resource to
prevent the need to fetch that request.

Posted this change. No problems.

Saw the debug output and verified we weren't making those two requests.

Unit tests pass.

reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbtools/commands/post.py
        rbtools/utils/users.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbtools/commands/post.py
        rbtools/utils/users.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.7.x (728ff62)
Loading...