Opened 22 months ago

Closed 22 months ago

Last modified 21 months ago

#5994 closed defect (fixed)

Release automation produces wrong commit Message

Reported by: tlucas Assignee: tlucas
Priority: P2 Milestone:
Module: Automation Keywords:
Cc: trev, Sebastian Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29599576/

Description

Environment

Debian 9
Python 2.7

How to reproduce

  1. Setup fake remote repositories for adblockpluschrome and downloads(see below)
  2. Run releaseAutomation for chrome:
    $ python build.py -t chrome release -k <CHROME RSA KEY> -d <DOWNLOADS REPOSITORY> 3.0
    

Observed behaviour

A commit message Releasing {u'message': u'Adblock Plus'} 3.0 is created

Expected behaviour

A commit message Releasing Adblock Plus 3.0 should be created

Hints for testers

To setup fake remotes for the repositories, you can follow these steps:

  • Clone the adblockpluschrome repository to a location of your choice hg clone https://hg.adblockplus.org/adblockpluschrome
  • Clone the downloads repository to a location of your choice (i suggest the same location as abp-chrome - otherwise you would have to specify the downloads location in the build process) hg clone https://hg.adblockplus.org/downloads
  • Create the fake remotes for adblockpluschrome and downloads:
    • cp -ar adblockpluschrome abpc_remote
    • cp -ar downloads downloads_remote
    • Configure your main repositories to have the fake remotes as remotes: change .hg/hgrc in both main repositories to contain default = <path_to_fake_remote> e.g.: default = /home/tlucas/abp/tmphg/abpc_remote
    • you can verify this by running hg incoming in the main repositories, it should say "comparing with <your_fake_remote>"
  • Create your own .pem (this requires openssl to be installed) in a location of your choice: openssl req -newkey rsa:2048 -nodes -x509 -days 365 -out certificate.pem - additionally to the certificate.pem, this creates a key.pem, which is the file that we need.
  • run the release in your adblockpluschrome main repository: ./build.py -t chrome release -k <path_to_new_key.pem> 3.0

Change History (8)

comment:1 Changed 22 months ago by tlucas

  • Priority changed from Unknown to P2
  • Ready set

comment:2 Changed 22 months ago by tlucas

  • Owner set to tlucas

comment:3 Changed 22 months ago by tlucas

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:4 Changed 22 months ago by abpbot

A commit referencing this issue has landed:
Issue 5994 - Use correct value for extensionName

comment:5 Changed 22 months ago by tlucas

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:6 Changed 21 months ago by Ross

The build script errors out for me with:

Traceback (most recent call last):
  File "D:\dev\scratch5994\adblockpluschrome\build.py", line 17, in <module>
        import buildtools.build
  File "D:\dev\scratch5994\adblockpluschrome\buildtools\build.py", line 139, in <module>
    make_argument('output_file', nargs='?')
  File "D:\dev\scratch5994\adblockpluschrome\buildtools\build.py", line 42, in wrapper
    short_desc, long_desc = func.__doc__.split(os.linesep + os.linesep, 1)
ValueError: need more than 1 value to unpack

Although I'm trying on Windows which might be causing an issue? I will try again in Linux/Ubuntu when I have a minute to boot into it.

comment:7 Changed 21 months ago by trev

Yes, I think the issue is you being on Windows - but it's a bug regardless. os.linesep is different on Windows, so splitting the doc string doesn't work. We should split by a regular expression, something like r'[\r\n]+'. Could you file a new bug on that?

comment:8 Changed 21 months ago by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

The linesep issue is filed as #6167.

My attempt at the build fails at the last step, but I can see the commit message has been corrected:

subprocess.CalledProcessError: Command '['hg', 'commit', '-R', '/home/ross/dev/scratch5994/adblockpluschrome', '-m', 'Noissue - Releasing Adblock Plus 3.0 for Chrome']' returned non-zero exit status 255
Note: See TracTickets for help on using tickets.