Opened 2 years ago

Closed 17 months ago

#6140 closed defect (fixed)

Documentation generation script on the server is failing

Reported by: kzar Assignee: tlucas
Priority: P3 Milestone:
Module: Sitescripts Keywords:
Cc: tlucas, ferris, kvas, sebastian Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29630555/

Description (last modified by kzar)

Environment

adblockpluschrome since 8f361c32c9c6.

How to reproduce

  1. Look at the server logs.

Observed behaviour

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/opt/sitescripts/sitescripts/docs/bin/generate_docs.py", line 92,
in <module>
    generate_docs(projects, config)
  File "/opt/sitescripts/sitescripts/docs/bin/generate_docs.py", line 85,
in generate_docs
    run_generation_command(data['command'], sources_dir, output_dir)
  File "/opt/sitescripts/sitescripts/docs/bin/generate_docs.py", line 71,
in run_generation_command
    subprocess.check_call(command, shell=True, cwd=sources_dir)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command './build.py -t chrome docs
/tmp/sitescripts-generate-docs/adblockpluschrome.docs >/dev/null 2>&1'
returned non-zero exit status 2

Expected behaviour

No error.

Notes

This is probably a regression from #6139, we updated the buildtools dependency there and one of the changes included was that the processArgs function got renamed process_args (see #6021).

Change History (12)

comment:1 Changed 2 years ago by kzar

  • Description modified (diff)

comment:2 follow-up: Changed 2 years ago by kzar

  • Cc kvas sebastian added
  • Component changed from Core to Unknown
  • Description modified (diff)
  • Owner kzar deleted
  • Priority changed from P1 to Unknown
  • Ready unset
  • Summary changed from Documentation generation script is calling the old processArgs function to Documentation generation script on the server is failing

I thought I understood this, but I'm no longer sure that I do.

  • The log claims the command invoked was ./build.py -t chrome docs /some/path, but when I try to call the script like that I'm told the -t argument is unrecognised for the docs command.
  • There's a genreate_docs.py script in both sitescripts and adblockpluscore. The error mentions sitescripts, but that script does not contain a processArgs call, where as the one in adblockpluscore does.
  • I'm not clear how to reproduce the problem locally.

Any ideas?

comment:3 Changed 2 years ago by tlucas

  • Owner set to tlucas

comment:4 in reply to: ↑ 2 ; follow-up: Changed 2 years ago by tlucas

Replying to kzar:

I thought I understood this, but I'm no longer sure that I do.

  • The log claims the command invoked was ./build.py -t chrome docs /some/path, but when I try to call the script like that I'm told the -t argument is unrecognised for the docs command.
  • There's a genreate_docs.py script in both sitescripts and adblockpluscore. The error mentions sitescripts, but that script does not contain a processArgs call, where as the one in adblockpluscore does.
  • I'm not clear how to reproduce the problem locally.

Any ideas?

There is a section in the sitescripts.ini which specifies the actual command to generate docs.

Can anybody with access please verify that a line like adblockpluschrome_command=./build.py docs -t chrome {output_dir} ... exists in the sitescripts.ini on the server(s) in question?

If i'm not mistaken, we would need to do the following:

Change the adblockplus<platform>_command to adblockplus<platform>_command=./build.py docs {output_dir} ... for every platform (without -t ...)

@Dave, adblockpluscore was not yet updated to newest buildtools revision, making it yet unnecessary to adapt for #6021 (and it looks like adblockpluscore is not involved with this issue at all)

comment:5 Changed 2 years ago by ferris

@tlucas: There is no adblockpluschrome_command value in /etc/sitescripts.ini.

comment:6 in reply to: ↑ 4 Changed 2 years ago by trev

Replying to tlucas:

Can anybody with access please verify that a line like adblockpluschrome_command=./build.py docs -t chrome {output_dir} ... exists in the sitescripts.ini on the server(s) in question?

The current command can be seen here: https://hg.adblockplus.org/infrastructure/file/tip/hiera/roles/web/adblockplus.yaml#l32

You should create an ops ticket in the hub to update it and reprovision the server in question.

@ferris: This is about the server generating documentation (meaning adblockplus.org web server), not the build server.

comment:7 Changed 2 years ago by ferris

@trev: Ah, yes right. Sorry for the mix-up, @tlucas!

comment:8 Changed 2 years ago by tlucas

  • Component changed from Unknown to Sitescripts
  • Priority changed from Unknown to P3
  • Ready set

@ferris, @trev -> we figured it in the end.

Note that the issue itself will be handled in http://hub.eyeo.com/issues/5906,

this ticket will simply update the .sitescripts.example file.

comment:9 Changed 2 years ago by tlucas

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

comment:10 Changed 2 years ago by tlucas

Last edited 2 years ago by tlucas (previous) (diff)

comment:11 Changed 2 years ago by fhd

  • Cc trev removed

comment:12 Changed 17 months ago by tlucas

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.