mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <benjamin.bann...@mesosphere.io>
Subject Review Request 70012: Fixed type error in verify-reviews.py.
Date Tue, 19 Feb 2019 20:45:03 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70012/
-----------------------------------------------------------

Review request for mesos, Till Toenshoff and Vinod Kone.


Bugs: MESOS-9582
    https://issues.apache.org/jira/browse/MESOS-9582


Repository: mesos


Description
-------

This patch fixes a type error introduced in `ccd1970d1be` where we
attempted to use a string API on undecoded UTF8 strings. With this
patch the string is properly decoded.


Diffs
-----

  support/verify-reviews.py 2521ffb810eeca199cfde14f465d826ab242059a 


Diff: https://reviews.apache.org/r/70012/diff/1/


Testing
-------

Testing with invalid credentials, expectation is that test execution fails due to invalid
credentials.

Without this patch:
```
$ ./support/verify-reviews.py -u foo -p bar
Checking if review: 69955 needs verification
Latest diff timestamp: 2019-02-12 05:27:22
Verifying review 69955
Dependent review: https://reviews.apache.org/api/review-requests/69954/
Dependent review: https://reviews.apache.org/api/review-requests/69905/
Dependent review: https://reviews.apache.org/api/review-requests/69904/
Dependent review: https://reviews.apache.org/api/review-requests/69898/
Dependent review: https://reviews.apache.org/api/review-requests/69897/
Dependent review: https://reviews.apache.org/api/review-requests/69896/
Dependent review: https://reviews.apache.org/api/review-requests/69895/
Dependent review: https://reviews.apache.org/api/review-requests/69894/
Dependent review: https://reviews.apache.org/api/review-requests/69893/
Dependent review: https://reviews.apache.org/api/review-requests/69892/
Dependent review: https://reviews.apache.org/api/review-requests/69866/
Dependent review: https://reviews.apache.org/api/review-requests/69858/
Applying review 69895
Applying review 69896
Applying review 69897
Applying review 69898
Applying review 69904
Applying review 69905
Applying review 69954
Traceback (most recent call last):
  File "./support/verify-reviews.py", line 185, in apply_reviews
    apply_review(review_request["id"])
  File "./support/verify-reviews.py", line 155, in apply_review
    (sys.executable, review_id), SCRIPT_PATH)
  File "./support/verify-reviews.py", line 117, in shell
    command, stderr=subprocess.STDOUT, cwd=working_dir, shell=True)
  File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py",
line 395, in check_output
    **kwargs).stdout
  File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py",
line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'cd .. && /usr/local/opt/python/bin/python3.7
support/apply-reviews.py -n -r 69954' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./support/verify-reviews.py", line 378, in <module>
    main()
  File "./support/verify-reviews.py", line 371, in main
    verify_review(review_request)
  File "./support/verify-reviews.py", line 222, in verify_review
    apply_reviews(review_request, reviews)
  File "./support/verify-reviews.py", line 177, in apply_reviews
    apply_reviews(api(review_url)["review_request"], reviews)
  File "./support/verify-reviews.py", line 187, in apply_reviews
    if "patch does not apply" in err.output:
TypeError: a bytes-like object is required, not 'str'
ccd1970d1be47306d15cffc68edadfe3926d265a
```

With this patch:
```
% ./support/verify-reviews.py -u foo -p bar
Checking if review: 69955 needs verification
Latest diff timestamp: 2019-02-12 05:27:22
Verifying review 69955
Dependent review: https://reviews.apache.org/api/review-requests/69954/
Dependent review: https://reviews.apache.org/api/review-requests/69905/
Dependent review: https://reviews.apache.org/api/review-requests/69904/
Dependent review: https://reviews.apache.org/api/review-requests/69898/
Dependent review: https://reviews.apache.org/api/review-requests/69897/
Dependent review: https://reviews.apache.org/api/review-requests/69896/
Dependent review: https://reviews.apache.org/api/review-requests/69895/
Dependent review: https://reviews.apache.org/api/review-requests/69894/
Dependent review: https://reviews.apache.org/api/review-requests/69893/
Dependent review: https://reviews.apache.org/api/review-requests/69892/
Dependent review: https://reviews.apache.org/api/review-requests/69866/
Dependent review: https://reviews.apache.org/api/review-requests/69858/
Applying review 69895
Applying review 69896
Applying review 69897
Applying review 69898
Applying review 69904
Applying review 69905
Applying review 69954
Posting review: Bad review!

Reviews applied: [69955, 69954, 69905, 69904, 69898, 69897, 69896, 69895, 69894, 69893, 69892,
69866, 69858]

Error:
2019-02-19 21:40:59 URL:https://reviews.apache.org/r/69954/diff/raw/ [7553/7553] -> "69954.patch"
[1]
error: patch failed: src/tests/storage_local_resource_provider_tests.cpp:361
error: src/tests/storage_local_resource_provider_tests.cpp: patch does not apply

Error handling URL https://reviews.apache.org/api/review-requests/69955/reviews/: UNAUTHORIZED
(b'{"stat": "fail", "err": {"msg": "The username or password was not correct", "code": 104}}')
a213091210c72ff6c2fc2d20a25d886d9c16c278
```

If `post_review` is defined as `return` additional reviews are validated after 69955.


Thanks,

Benjamin Bannier


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message