Opened on 11/06/2017 at 12:26:27 PM

Closed on 11/06/2017 at 02:02:18 PM

Last modified on 12/06/2017 at 03:04:40 PM

#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

Attachments (0)

Change History (8)

comment:1 Changed on 11/06/2017 at 12:31:05 PM by tlucas

  • Priority changed from Unknown to P2
  • Ready set

comment:2 Changed on 11/06/2017 at 12:31:29 PM by tlucas

  • Owner set to tlucas

comment:3 Changed on 11/06/2017 at 12:39:58 PM by tlucas

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

comment:4 Changed on 11/06/2017 at 02:01:48 PM by abpbot

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

comment:5 Changed on 11/06/2017 at 02:02:18 PM by tlucas

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

comment:6 Changed on 12/05/2017 at 03:10:03 PM 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 on 12/05/2017 at 03:17:47 PM 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 on 12/06/2017 at 03:04:40 PM 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

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from tlucas.
 
Note: See TracTickets for help on using tickets.