1. 18 Mar, 2019 1 commit
    • Monty Taylor's avatar
      Use remote_url instead of remote for download · 853f3bff
      Monty Taylor authored
      If usepushurl is set, then it's likely that the pushurl is pointing
      to the code review system while the normal url is pointing to a read
      only mirror. If the read-only mirror in question doesn't contain
      the gerrit refs (like opendev.org currently) then git fetch origin
      won't work properly. However, we already calculate the correct
      URL at the top of the function for use in query_reviews, and fetch
      will happily work with a full url rather than a named remote.
      
      Update the function to use the remote_url so that usepushurl works
      even if the mirror url does not contain refs/changes.
      
      Change-Id: Ib72afe97e65cb1dcaf95e28450dfe6e7d5f88965
      853f3bff
  2. 19 Feb, 2019 1 commit
  3. 12 Feb, 2019 1 commit
    • Sorin Sbarnea's avatar
      Switch from testrepository to stestr · 514958d3
      Sorin Sbarnea authored
      Adopts use of newer stestr for running the test suite.
      
      Passing TERM is needed or stestr will ignore the --color option when
      run under tox.
      
      Change-Id: Id2d4ce36cdfedd5a847e0428854753d2cf4140ee
      514958d3
  4. 29 Jan, 2019 1 commit
    • Sorin Sbarnea's avatar
      Allow user to control Java version used by tox · e535d446
      Sorin Sbarnea authored
      This allows user to define JAVA_HOME in order to control which version
      of Java will be used by Gerrit during tox testing.
      
      Avoid Gerrit startup failure due to use of wrong version of Java,
      even if `java -version` would have reported the right version.
      
      On systems with multiple versions of Java 8/9/10 it was impossible to
      run tox because the launcher would have always picked the latest
      version which is clearly not compatible with Gerrit war archive used
      for testing.
      
      In the future we will start using a gerrit container for testing and
      avoid dependency on local Java version.
      
      Change-Id: I05b6f7125393a009e1fdcf556b17df158c10eea0
      e535d446
  5. 27 Dec, 2018 1 commit
  6. 20 Dec, 2018 1 commit
    • Marc Herbert's avatar
      Fix wrong and misleading "using default: None" in --verbose mode · d5f02d61
      Marc Herbert authored
      When something is not found in git config, the --verbose option logs the
      wrong value "None", example:
      
      2018-12-12  Running: git config --get gitreview.branch
      2018-12-12  using default: None
      2018-12-12  Running: git config --get gitreview.scheme
      2018-12-12  using default: None
      2018-12-12  Running: git config --get remote.gerrit.pushurl
      2018-12-12  using default: None
      2018-12-12  Running: git config --get remote.gerrit.url
      2018-12-12  result: ssh://marc@review.openstack.org:29418/openstack-infra/git-review
      
      From a --verbose user perspective this is plain wrong for (at least) all the
      options defined in the DEFAULTS list.
      
      Change --verbose message to look like this instead:
      
      2018-12-12  Running: git config --get gitreview.branch
      2018-12-12  Config['branch'] = master
      2018-12-12  Running: git config --get gitreview.scheme
      2018-12-12  Config['scheme'] = ssh
      2018-12-12  Running: git config --get remote.gerrit.pushurl
      2018-12-12  Running: git config --get remote.gerrit.url
      2018-12-12  ... remote.gerrit.url = ssh://marc@review.openstack.org:29418/openstack-infra/git-review
      
      If git_config_get_value('new_option',... ) is ever invoked in the future
      with a not None, default="fubar" parameter then --verbose will print these
      lines:
      
      2018-12-19  Running: git config --get gitreview.new_option
      2018-12-19  ... nothing in git config, returning func parameter: fubar
      
      This logging issue is especially misleading considering the many levels of
      defaults and fallbacks: git config x3; .gitreview; DEFAULTS list,
      git_config_get_value(default=...) parameter, options parser logic, etc.
      
      Change-Id: I6cee46e88b90b8f11689be3875d64ec5e577f12f
      d5f02d61
  7. 18 Dec, 2018 1 commit
  8. 17 Dec, 2018 3 commits
  9. 14 Dec, 2018 1 commit
  10. 11 Dec, 2018 1 commit
    • Marc Herbert's avatar
      tox.ini: add passenv = http_proxy https_proxy # _JAVA_OPTIONS · 205859c7
      Marc Herbert authored
      Add: 'passenv = http_proxy https_proxy' whitelist to tox.ini because there's
      basically never any good reason to throw away proxy configuration.
      
      The addition of http_proxy allows downloading
      http://tarballs.openstack.org/ci/gerrit/gerrit-<version>.war
      behind a proxy.
      
      https_proxy is not needed right now but added for consistency and
      "future-proofing"
      
      _JAVA_OPTIONS is added but only as a clue and commented out by default
      because it could hold non-proxy configuration which would defeat tox'
      environment cleaning and introduce test variability.
      
      This is just the tox.ini source code part of the larger
      I764ed51314c8e2d0572d1f01c9792bee0a40c7e6
      includes documentation of workarounds and troubleshooting tips.
      
      Change-Id: I764ed51314c8e2d0572d1f01c9792bee0a40c7e7
      205859c7
  11. 10 Dec, 2018 3 commits
  12. 07 Dec, 2018 1 commit
  13. 05 Dec, 2018 3 commits
    • Marc Herbert's avatar
      test_uploads_with_nondefault_rebase: fix git screen scraping · 6f31931b
      Marc Herbert authored
      Newer versions of git quote branch names in their output; at least git
      2.16.3 does. This causes all test_uploads_with_nondefault_rebase tests to
      fail like this:
      
      testtools.matchers._impl.MismatchError:
       'Branch test_branch set up to track remote branch maint from origin.'
       not in
        u"Switched to a new branch 'test_branch'\n\
       Branch 'test_branch' set up to track remote branch 'maint' from 'origin'."
      
      Add a testtools.matchers.MatchesRegex() to support both styles.
      
      Change-Id: I9f1417c53de2f7d638e845f553df3bd426a4c750
      6f31931b
    • Zuul's avatar
      Merge "Avoid UnicodeEncodeError on python 2" · e9fede80
      Zuul authored
      e9fede80
    • Marc Herbert's avatar
      tests/__init__.py: ssh-keygen -m PEM for bouncycastle · d41f5d7d
      Marc Herbert authored
      From: https://www.openssh.com/txt/release-7.8 change log:
      
       * ssh-keygen(1): write OpenSSH format private keys by default
         instead of using OpenSSL's PEM format. The OpenSSH format,
         supported in OpenSSH releases since 2014 and described in the
         PROTOCOL.key file in the source distribution, offers substantially
         better protection against offline password guessing and supports
         key comments in private keys. If necessary, it is possible to write
         old PEM-style keys by adding "-m PEM" to ssh-keygen's arguments
         when generating or updating a key.
      
      This fixes all tests failing with this error:
      
      [2018-12-04 17:46:24,130] WARN  org.apache.sshd.common.keyprovider.FileKeyPairProvider :
         Unable to read key /home/mherber2/pip/src/git-review/.gerrit/site-5123/etc/ssh_host_rsa_key
      java.io.IOException: unrecognised object: OPENSSH PRIVATE KEY
      	at org.bouncycastle.openssl.PEMParser.readObject(Unknown Source)
      	at org.apache.sshd.common.keyprovider.FileKeyPairProvider.doLoadKey(FileKeyPairProvider.java:124)
      
      Change-Id: Id10f9b5be928f2ba57847fa32814e9db979375f5
      d41f5d7d
  14. 26 Nov, 2018 1 commit
  15. 09 Nov, 2018 1 commit
    • Sorin Sbarnea's avatar
      Avoid UnicodeEncodeError on python 2 · 138e9a25
      Sorin Sbarnea authored
      Python2 has default encoding as ascii which means
      that is likely that some print() commands would
      fails with UnicodeEncodeError.
      
      This hack changes default encoding in order to
      avoid such errors.
      
      Change-Id: I4e21e6e32d4bb815693b7d6ce35efb6a5cca2fc2
      138e9a25
  16. 07 Nov, 2018 1 commit
  17. 06 Nov, 2018 1 commit
    • Ilya Etingof's avatar
      Improve exit code implementation · d94e3a34
      Ilya Etingof authored
      Unnecessary dynamic GitReviewException.EXIT_CODE attribute
      lookup refactored into static to benefit static analyzers.
      
      Default process exit code changed from 127 (command not found error)
      to 1 (general error)
      
      Change-Id: I1fcb583a740bf32c4427a587e208d099712a7bc4
      d94e3a34
  18. 24 Oct, 2018 1 commit
  19. 16 Oct, 2018 2 commits
    • Stephen Finucane's avatar
      Don't set topic when submitting no-topic patches · af955c93
      Stephen Finucane authored
      
      
      Change-Id: I8f8880791ad7e46fb9e18623ab8bd295457424b2
      Signed-off-by: default avatarStephen Finucane <stephenfin@redhat.com>
      af955c93
    • Stephen Finucane's avatar
      Remove auto-branch name · 03768832
      Stephen Finucane authored
      
      
      The feature to configure branch names based on the presence of "bug",
      "lp", "blueprint" or "bp" in the commit message is overly elaborate and
      very OpenStack specific. Even with this, it hasn't been updated to keep
      up with the times as many projects have migrated to Storyboard, which
      isn't handled here.
      
      Given that it frequently does the wrong thing and likely doesn't apply
      to anyone outside of the OpenStack ecosystem, the wisest thing it to
      simply remove the feature. This is a break in behavior but it seems
      better than adding yet another flag for something that many users will
      want enabled by default.
      
      Change-Id: I82ecc1719de5c87d59bbfe73a042917e6559da1e
      Signed-off-by: default avatarStephen Finucane <stephenfin@redhat.com>
      Story: 1130330
      Task: 566
      Story: 2001247
      Task: 5777
      03768832
  20. 15 Oct, 2018 2 commits
  21. 19 Sep, 2018 3 commits
  22. 18 Sep, 2018 1 commit
    • Clark Boylan's avatar
      Fix compare_review's use of fetch_review · 3c46c33e
      Clark Boylan authored
      fetch_review was updated to take project config information so that
      projects hosted over http below some root (eg
      https://gerrit.org/gerrit/here) could be properly fetched against. But
      in adding this we broke the compare_review functionality which is the
      other user of fetch_review.
      
      Fix this by passing project config info into compare_review so that it
      can pass that along to fetch_review.
      
      Additionally we need to compare like types when looking at patchset
      numbers so coerce them to ints when comparing.
      
      Change-Id: I98fbf31821dc3a9162700725dec07bc7685ea5ca
      3c46c33e
  23. 14 Sep, 2018 1 commit
    • Steve Kowalik's avatar
      Always print failure case when testing remotes · 6587639d
      Steve Kowalik authored
      Rather than requiring verbose to be specified when testing remote URLs,
      always print the failure case to allow easier debugging, for example,
      with unsigned CLAs.
      
      Change-Id: I37e2d8b6b70a573a4a3f9091205d31100e3bf9f2
      6587639d
  24. 13 Sep, 2018 1 commit
    • Han-Wen Nienhuys's avatar
      Use new %topic=XXXX syntax for topic pushes · dcbfb32b
      Han-Wen Nienhuys authored
      The old syntax is undocumented and slated to be removed.
      
      Uniformize handling of % options. Previously, combining options could
      yield destination refs that look like
      
         refs/for/BRANCH%wip%private
      
      which tries to switch on a non-existent option "wip%private".
      
      Change-Id: Ia4e97eafbf685fcba78d95370dae08254a2c718b
      dcbfb32b
  25. 29 Aug, 2018 2 commits
  26. 28 Aug, 2018 2 commits
    • Monty Taylor's avatar
      Start using reno for releasenotes · c7436f95
      Monty Taylor authored
      It's probably a good idea to be specific about what's changing in reno
      releases.
      
      Since reno support wasn't in tree we didn't pick up notes for these two
      changes, but they're things users might want to know about.
      
      Change-Id: I249a3a4d0cf378b60bf43ce65d49416879d5517e
      c7436f95
    • Monty Taylor's avatar
      Use doc/requirements and openstackdocstheme · 8236cdbf
      Monty Taylor authored
      oslosphinx is the old hotness. openstackdocstheme is the new hotness.
      Also, we can use doc/requirements.txt for docs requirements.
      
      Change-Id: I9cbc670c8fb065d240251f061919479c87193ff5
      8236cdbf
  27. 22 Aug, 2018 1 commit
  28. 20 Aug, 2018 1 commit