Skip to content
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

Don't consider Android releases when doing Desktop bisect #4947

Merged
merged 2 commits into from
Mar 23, 2020

Conversation

bsclifton
Copy link
Member

No corresponding GitHub issue (doesn't affect browser)

Fixes bisect script problem:

clifton@Brians-MacBook-Pro-2 (master *=) $ ./src/brave/script/build-bisect.py --good=1.5.111 --bad=1.8.11 --channel=nightly --verbose
fetching releases from GitHub...
fetch complete; 1189 versions found (excluding 0 drafts)
Traceback (most recent call last):
  File "./src/brave/script/build-bisect.py", line 442, in <module>
    sys.exit(main())
  File "./src/brave/script/build-bisect.py", line 419, in main
    tag_names.sort(key=lambda s: map(int, s.split('.')))
  File "./src/brave/script/build-bisect.py", line 419, in <lambda>
    tag_names.sort(key=lambda s: map(int, s.split('.')))
ValueError: invalid literal for int() with base 10: '111-android'

@bsclifton bsclifton requested a review from mbacchi March 16, 2020 02:47
@bsclifton bsclifton self-assigned this Mar 16, 2020
@bsclifton bsclifton added this to the 1.8.x - Nightly milestone Mar 16, 2020
@bsclifton bsclifton added the CI/skip Do not run CI builds (except noplatform) label Mar 16, 2020
@bsclifton bsclifton changed the title DOn't consider Android releases when doing Desktop bisect Don't consider Android releases when doing Desktop bisect Mar 16, 2020
@bsclifton
Copy link
Member Author

Props to @mbacchi for the patch 😄👍

Copy link
Contributor

@mbacchi mbacchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also needed the second part of the diff I sent you that returns the token:

git diff build-bisect.py 
diff --git a/script/build-bisect.py b/script/build-bisect.py
index 23cb73460..8810b5256 100755
--- a/script/build-bisect.py
+++ b/script/build-bisect.py
@@ -85,6 +85,8 @@ def get_releases(repo):
             if release['draft']:
                 draft_count = draft_count + 1
                 continue
+            if 'android' in release['tag_name'] or 'b' in release['tag_name']:
+                continue
             tag_name = str(release['tag_name'].strip().replace('v', ''))
             tag_names.append(tag_name)
             releases[tag_name] = release
@@ -293,6 +295,8 @@ def get_github_token():
         if result == 'undefined':
             raise Exception('`BRAVE_GITHUB_TOKEN` value not found!')
         return result
+    else:
+        return github_token

Without it I got the error:

Exception: {
  "documentation_url": "https://developer.github.com/v3",
  "message": "Bad credentials"
}

script/build-bisect.py Outdated Show resolved Hide resolved
@bsclifton
Copy link
Member Author

@mbacchi updated! 😄

Copy link
Contributor

@mbacchi mbacchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

@bsclifton bsclifton merged commit 86a77ff into master Mar 23, 2020
@bsclifton bsclifton deleted the bsc-fix-bisect branch March 23, 2020 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip Do not run CI builds (except noplatform) development environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants