9 Commits

Author SHA1 Message Date
Joe McDonnell
8c04113157 IMPALA-9627 (followup): Switch push_to_asf.py to python 3
push_to_asf.py asks the user for input. This recently
switched from raw_input() to input(), because Python 3
doesn't have a raw_input() function.

Python 2's input() function has weird semantics. At the
"[Y/n]:" prompt, typing y (no quotes) produces this error:
NameError: name 'y' is not defined

Instead, it wants 'y' (with quotes). This is because Python 2's
input() function wants a python expression. This switches the
script to use python3, which has the old behavior from
raw_input().

Testing:
 - Ran script with Python 3, hand tested the confirm_prompt function

Change-Id: Ida49993bfea71ade9d335ac1ceb53788d0a57f69
Reviewed-on: http://gerrit.cloudera.org:8080/19817
Reviewed-by: Michael Smith <michael.smith@cloudera.com>
Tested-by: Joe McDonnell <joemcdonnell@cloudera.com>
2023-05-01 21:50:16 +00:00
Michael Smith
0a42185d17 IMPALA-9627: Update utility scripts for Python 3 (part 2)
We're starting to see environments where the system Python ('python') is
Python 3. Updates utility and build scripts to work with Python 3, and
updates check-pylint-py3k.sh to check scripts that use system python.

Fixes other issues found during a full build and test run with Python
3.8 as the default for 'python'.

Fixes a impala-shell tip that was supposed to have been two tips (and
had no space after period when they were printed).

Removes out-of-date deploy.py and various Python 2.6 workarounds.

Testing:
- Full build with /usr/bin/python pointed to python3
- run-all-tests passed with python pointed to python3
- ran push_to_asf.py

Change-Id: Idff388aff33817b0629347f5843ec34c78f0d0cb
Reviewed-on: http://gerrit.cloudera.org:8080/19697
Reviewed-by: Michael Smith <michael.smith@cloudera.com>
Tested-by: Michael Smith <michael.smith@cloudera.com>
2023-04-26 18:52:23 +00:00
Joe McDonnell
2b550634d2 IMPALA-11952 (part 2): Fix print function syntax
Python 3 now treats print as a function and requires
the parenthesis in invocation.

print "Hello World!"
is now:
print("Hello World!")

This fixes all locations to use the function
invocation. This is more complicated when the output
is being redirected to a file or when avoiding the
usual newline.

print >> sys.stderr , "Hello World!"
is now:
print("Hello World!", file=sys.stderr)

To support this properly and guarantee equivalent behavior
between python 2 and python 3, all files that use print
now add this import:
from __future__ import print_function

This also fixes random flake8 issues that intersect with
the changes.

Testing:
 - check-python-syntax.sh shows no errors related to print

Change-Id: Ib634958369ad777a41e72d80c8053b74384ac351
Reviewed-on: http://gerrit.cloudera.org:8080/19552
Reviewed-by: Joe McDonnell <joemcdonnell@cloudera.com>
Reviewed-by: Michael Smith <michael.smith@cloudera.com>
Tested-by: Michael Smith <michael.smith@cloudera.com>
2023-02-28 17:11:50 +00:00
Joe McDonnell
e9d62bd233 Update git repository references from git-wip to gitbox
All Apache repositories are migrating from git-wip to gitbox.
With INFRA-17572, the Impala repo is now on gitbox. This change
updates the references to git-wip in the Impala codebase
to gitbox.

I found the references using "git grep git-wip"

Change-Id: I480a1062cdf0fb6efd82f8b2da2a521fdc8b875d
Reviewed-on: http://gerrit.cloudera.org:8080/12232
Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2019-01-18 00:46:24 +00:00
Tim Armstrong
72ed4fc887 Update incubator-impala -> impala URLs
This fixes push_to_asf.py and various other scripts that had the Apache
repo location hard-coded. Also fixed the location of the github mirror
and mailing list archives.

Testing:
Ran push_to_asf.py to check I got the URL right. Checked a couple of the
github and mailing list URLs to make sure the new URL is valid.

Change-Id: Ie49221300340ef34bdd7c01670c35bdbbce3e84f
Reviewed-on: http://gerrit.cloudera.org:8080/8685
Reviewed-by: Sailesh Mukil <sailesh@cloudera.com>
Reviewed-by: Jim Apple <jbapple-impala@apache.org>
Reviewed-by: Michael Brown <mikeb@cloudera.com>
Tested-by: Impala Public Jenkins
2017-11-29 20:58:50 +00:00
Henry Robinson
5a91964893 IMPALA-4310: Make push_to_asf.py respect --apache_remote
Change-Id: I03e15753e685b1b8cf953e8009fb473c9c12aa93
Reviewed-on: http://gerrit.cloudera.org:8080/4747
Reviewed-by: Sailesh Mukil <sailesh@cloudera.com>
Tested-by: Henry Robinson <henry@cloudera.com>
2016-10-18 06:34:22 +00:00
Sailesh Mukil
fbed1c9789 IMPALA-3225: Fix and update push_to_asf.py to match the new Impala-ASF project
The script now points to the updated 'Impala-ASF' repo on Gerrit.
Some fixes were also made to the error messages and how we handle
remotes.

Now we have the following options:
'--gerrit_remote' to set any gerrit remote name of the committers
choice.
'--apache_remote' also lets any remote name to point to the Apache
git repo.

The Gerrit URL is now hardcoded and no longer an option because the
Gerrit project name has been decided and is unlikely to change.

This is a follow up commit to other commits with the same JIRA ID.

Change-Id: Ieac2c2715ced99fd0ff3e3c1422187d5d1eef3d9
Reviewed-on: http://gerrit.cloudera.org:8080/3759
Reviewed-by: Jim Apple <jbapple@cloudera.com>
Reviewed-by: Sailesh Mukil <sailesh@cloudera.com>
Tested-by: Sailesh Mukil <sailesh@cloudera.com>
2016-07-25 22:15:53 +00:00
Jim Apple
e2a70388f5 Adjust ASF push script names to match our repo setup.
Our gerrit repo is not Impala, but ImpalaASF:

https://gerrit.cloudera.org/#/q/status:open+project:ImpalaASF

Some Impala devlopers already use "gerrit" as a remote name for the
Impala gerrit repo, so use asf-impala as the git remote name.

Change-Id: Icea354314c37b2047c2e7f7c4ff2e0d036dff58b
Reviewed-on: http://gerrit.cloudera.org:8080/3702
Reviewed-by: Matthew Jacobs <mj@cloudera.com>
Tested-by: Internal Jenkins
2016-07-21 16:31:09 -07:00
Matthew Jacobs
761c39c545 IMPALA-3225: Add script to push from gerrit to ASF
Adds a script (copied and modified from Kudu) that attempts
to push any changes to ASF branches from gerrit branches
that have new changes.

Change-Id: I15de939acc4b08a8f01511fffcb6ab1743d09c01
Reviewed-on: http://gerrit.cloudera.org:8080/3468
Reviewed-by: Matthew Jacobs <mj@cloudera.com>
Tested-by: Internal Jenkins
2016-07-14 19:04:44 +00:00