Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Issue 2544043002: [Cronet] Enforce Cronet API never modified, only grown (Closed)

Created:
4 years ago by pauljensen
Modified:
3 years, 11 months ago
Reviewers:
kapishnikov
CC:
chromium-reviews, cbentzel+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Cronet] Enforce Cronet API never modified, only grown Enforce that the Cronet API classes and methods are never modified or removed, only added. Modifying or removing an API class or method breaks backwards compatibility. This is enforced by: 1. Keep an updated dump of the Cronet API in components/cronet/android/api.txt 2. When building check that the Cronet API matches that in api.txt 3. Provide a script for updating api.txt; this script also enforces that only additions are made to the API. This change also maintains a version number for the Cronet API. Cronet can use this to enforce, for example that the Cronet implementation is at least as new as the Cronet API being used. BUG=629299 R=kapishnikov CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester Committed: https://crrev.com/2a6ee085bd4c2bd39625a867561c5cc39a1377db Cr-Commit-Position: refs/heads/master@{#441455}

Patch Set 1 #

Patch Set 2 : fix #

Patch Set 3 : fix #

Total comments: 8

Patch Set 4 : rebase #

Patch Set 5 : add some tests #

Patch Set 6 : rebase #

Patch Set 7 : address comments #

Patch Set 8 : add more tests #

Total comments: 4

Patch Set 9 : address comments by rebasing #

Patch Set 10 : rebase #

Patch Set 11 : rebase #

Patch Set 12 : update api.txt #

Patch Set 13 : rebase #

Patch Set 14 : change python sources to inputs #

Patch Set 15 : change import line #

Patch Set 16 : add debug prints #

Patch Set 17 : import absolute_import #

Patch Set 18 : disambiguate tools directory #

Patch Set 19 : remove absolute_import #

Unified diffs Side-by-side diffs Delta from patch set Stats (+648 lines, -38 lines) Patch
A components/cronet/__init__.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 0 chunks +-1 lines, --1 lines 0 comments Download
M components/cronet/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +7 lines, -0 lines 0 comments Download
A components/cronet/android/api.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +304 lines, -0 lines 0 comments Download
A components/cronet/android/api_version.txt View 1 chunk +1 line, -0 lines 0 comments Download
M components/cronet/tools/api_static_checks.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +39 lines, -22 lines 0 comments Download
M components/cronet/tools/api_static_checks_unittest.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +157 lines, -17 lines 0 comments Download
A components/cronet/tools/update_api.py View 1 2 3 4 5 6 1 chunk +141 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (8 generated)
pauljensen
Andrei, PTAL, thank you!
4 years ago (2016-12-01 19:11:55 UTC) #2
kapishnikov
https://codereview.chromium.org/2544043002/diff/40001/components/cronet/tools/update_api.py File components/cronet/tools/update_api.py (right): https://codereview.chromium.org/2544043002/diff/40001/components/cronet/tools/update_api.py#newcode32 components/cronet/tools/update_api.py:32: CLASS_RE = re.compile(r'.*class ([^ ]*) .*{') Backward slash needed ...
4 years ago (2016-12-01 23:28:34 UTC) #3
pauljensen
https://codereview.chromium.org/2544043002/diff/40001/components/cronet/tools/update_api.py File components/cronet/tools/update_api.py (right): https://codereview.chromium.org/2544043002/diff/40001/components/cronet/tools/update_api.py#newcode32 components/cronet/tools/update_api.py:32: CLASS_RE = re.compile(r'.*class ([^ ]*) .*{') On 2016/12/01 23:28:34, ...
4 years ago (2016-12-16 19:17:03 UTC) #4
kapishnikov
LGTM. A couple of nits. https://codereview.chromium.org/2544043002/diff/140001/components/cronet/tools/api_static_checks.py File components/cronet/tools/api_static_checks.py (right): https://codereview.chromium.org/2544043002/diff/140001/components/cronet/tools/api_static_checks.py#newcode121 components/cronet/tools/api_static_checks.py:121: package = dirpath[len(temp_dir + ...
3 years, 11 months ago (2016-12-28 20:37:35 UTC) #5
pauljensen
https://codereview.chromium.org/2544043002/diff/140001/components/cronet/tools/api_static_checks.py File components/cronet/tools/api_static_checks.py (right): https://codereview.chromium.org/2544043002/diff/140001/components/cronet/tools/api_static_checks.py#newcode121 components/cronet/tools/api_static_checks.py:121: package = dirpath[len(temp_dir + '/'):] On 2016/12/28 20:37:35, kapishnikov ...
3 years, 11 months ago (2017-01-03 15:01:48 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2544043002/200001
3 years, 11 months ago (2017-01-03 20:11:01 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: android_cronet on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_cronet/builds/59008)
3 years, 11 months ago (2017-01-03 20:25:06 UTC) #11
kapishnikov
lgtm
3 years, 11 months ago (2017-01-04 19:50:06 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2544043002/360001
3 years, 11 months ago (2017-01-04 19:51:08 UTC) #14
commit-bot: I haz the power
Committed patchset #19 (id:360001)
3 years, 11 months ago (2017-01-04 20:42:59 UTC) #17
commit-bot: I haz the power
3 years, 11 months ago (2017-01-04 20:45:51 UTC) #19
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/2a6ee085bd4c2bd39625a867561c5cc39a1377db
Cr-Commit-Position: refs/heads/master@{#441455}

Powered by Google App Engine
This is Rietveld 408576698