#405 Make concurrent build working again && enable on build sys
Closed: Invalid Opened by shaiton.

I have somehow broken the concurrent build while merging files. But it was still not used on infra :(

A shall correct that.


or still working...
just have to verify that the following error is right (repo not cleaned)
{{{
Traceback (most recent call last):
File "/home/shaiton/contribution/f/fedora-web/start.fedoraproject.org/../build.d/build.py", line 155, in
main()
File "/home/shaiton/contribution/f/fedora-web/start.fedoraproject.org/../build.d/build.py", line 152, in main
process(args)
File "/home/shaiton/contribution/f/fedora-web/start.fedoraproject.org/../build.d/build.py", line 39, in process
os.makedirs(options.output)
File "/usr/lib64/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 17] File exists: 'out/'
make: *** [static] Erreur 1
}}}

It is currently running in stg (-j4 in syncStatic.sh.stg).

But I get the same issue:

{{{
content -l ast -p po -b /
python /srv/web/fedora-web/fudcon.fedoraproject.org/../build.d/build.py -o out -i data/content -l bg -p po -b /
Traceback (most recent call last):
File "/srv/web/fedora-web/fudcon.fedoraproject.org/../build.d/build.py", line 155, in
main()
File "/srv/web/fedora-web/fudcon.fedoraproject.org/../build.d/build.py", line 152, in main
process(args)
File "/srv/web/fedora-web/fudcon.fedoraproject.org/../build.d/build.py", line 51, in process
process_dir(dirpath, filenames)
File "/srv/web/fedora-web/fudcon.fedoraproject.org/../build.d/build.py", line 89, in process_dir
os.makedirs(os.path.dirname(dest_file))
File "/usr/lib/python2.6/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 17] File exists: 'out/NA'
make: *** [bg] Erreur 1
make: *** Attente des tâches non terminées....
Website build time: 732
Website build time: 594
Website build time: 713
}}}

I had to run it twice, then it worked.

Python code:

{{{
if not os.path.exists(options.output):
os.makedirs(options.output)

    if not os.path.exists(os.path.dirname(dest_file)):
        os.makedirs(os.path.dirname(dest_file))

}}}
It should not attempt to create it.

It has to be with the concurrent build. The repo is cleaned each time (git clean && git reset).

Still have to correct this before moving in prod

This was just race conditions... I pushed a fix in alpha.
Parallel build fails for hosted, we need to improve hosted.py (old build.py) or to merge it in build.d/build.py (at least some part). Therefore, I pushed a fix in alpha to prevent parallel build on hosted.

Still failing for spins
{{{
python /srv/web/fedora-web/spins.fedoraproject.org/../build.d/build.py
-o out -i data/content -l as -p po -b /
python /srv/web/fedora-web/spins.fedoraproject.org/../build.d/build.py
-o out -i data/content -l ast -p po -b /
Traceback (most recent call last):
File "/srv/web/fedora-web/spins.fedoraproject.org/../build.d/build.py
", line 162, in
main()
File "/srv/web/fedora-web/spins.fedoraproject.org/../build.d/build.py
", line 159, in main
process(args)
File "/srv/web/fedora-web/spins.fedoraproject.org/../build.d/build.py
", line 59, in process
process_dir(dirpath, filenames)
File "/srv/web/fedora-web/spins.fedoraproject.org/../build.d/build.py
", line 107, in process_dir
).render(method='html', doctype='html')
[snip]
File "./data/templates/master.html", line 161, in
spins = {}
File "", line 34, in torrents
File "/usr/lib/python2.6/site-packages/simplejson/init.py", line 267, in load
parse_constant=parse_constant, **kw)
File "/usr/lib/python2.6/site-packages/simplejson/init.py", line 307, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.6/site-packages/simplejson/decoder.py", line 335, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.6/site-packages/simplejson/decoder.py", line 353, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
make: *** [ast] Error 1
make: *** Waiting for unfinished jobs....
}}}
Could not reproduce locally. There should be an other critical path there.
Just reverted the puppet commit. stg is not built in parallel anymore (rev#86cc23f)

Can we close this?

Working fine here, please reopen if not fixed somehow.

Metadata