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

Support uploading stats to multiple endpoints. #6599

Merged
merged 1 commit into from Oct 5, 2018

Conversation

Projects
None yet
3 participants
@benjyw
Copy link
Contributor

benjyw commented Oct 5, 2018

Also:

  • Allow associating a stats upload endpoint with a corresponding
    auth provider, for better error messaging.
  • Don't follow redirects to GET when posting. These almost certainly
    indicate an auth failure (redirecting to a login page), and
    should trigger an error message.
  • Piggybacked a small change to help display for a couple of
    global options.
Support uploading stats to multiple endpoints.
Also:

- Allow associating a stats upload endpoint with a corresponding
  auth provider, for better error messaging.
- Don't follow redirects to GET when posting. These almost certainly
  indicate an auth failure (redirecting to a login page), and
  should trigger an error message.
- Piggybacked a small change to help display for a couple of
  global options.

@benjyw benjyw requested review from stuhood and illicitonion Oct 5, 2018

@stuhood

stuhood approved these changes Oct 5, 2018

Copy link
Member

stuhood left a comment

Thanks, looks good!

if handler.path.startswith('/redirect'):
code = int(handler.path[-3:])
handler.send_response(code)
handler.send_header('location', mk_url('/upload'))

This comment has been minimized.

@stuhood

stuhood Oct 5, 2018

Member

Wow... python scoping is strange.

This comment has been minimized.

@mateor

mateor Oct 6, 2018

Member
try:
    handler = html.lines()
except Exception:
    raise("x")
handler.stuff()

I try to defend python, but it is tough to justify leaked state like this...

@benjyw benjyw merged commit 15eac4b into pantsbuild:master Oct 5, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@benjyw benjyw deleted the benjyw:multiple_stats_uploads branch Oct 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment