After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 579877 - add support for setting buildbot paths in config
add support for setting buildbot paths in config
Status: RESOLVED OBSOLETE
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Alacarte Maintainer(s)
Alacarte Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-04-22 19:46 UTC by Sascha Silbe
Modified: 2021-05-17 15:49 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Changes to hardcoded paths (1.78 KB, patch)
2009-04-22 19:50 UTC, Sascha Silbe
none Details | Review

Description Sascha Silbe 2009-04-22 19:46:45 UTC
At SugarLabs, we're using jhbuild for providing the developer setup with the latest versions of all components (i.e. like you're doing for GNOME) and the BuildBot integration for automated build testing as well.
We're using the (almost) unmodified jhbuild git tree with a slim wrapper module (providing e.g. support for handling Sugar "bundles" as module type) in order to get upstream changes without needing to merge them every time (as we would if we'd maintain a custom branch).

Until now, we patched jhbuild to change some hardcoded locations in order for the buildbot support of jhbuild to use our paths (configs etc.). It would be great if we could just set these in the jhbuildrc instead.

There are two things we need to customise:

a) command name (to call the wrapper instead of upstream jhbuild)
b) buildbot directory location

I'll attach the patch we used so you can see the locations of the hardcoded strings.
Comment 1 Sascha Silbe 2009-04-22 19:49:25 UTC
Fixing product again. 
Comment 2 Sascha Silbe 2009-04-22 19:50:42 UTC
Created attachment 133142 [details] [review]
Changes to hardcoded paths

Not against current git, but applies cleanly.
Comment 3 Frederic Peters 2009-04-22 19:56:46 UTC
Perhaps current command could be known via sys.argv[0] so it would work without any configuration, I'll have to check.

Before adding an option to set the buildbot directory, what kind of changes do you have in that one ? (i.e. would it make sense to have options to set those instead)
Comment 4 Sascha Silbe 2009-04-22 20:07:44 UTC
Mainly the config files (for which command line options exist, but not configuration options) and the HTML files for the web interface. Having the working dirs below our directory is nice (though a fully configurable directory would be even better), but entirely optional.
Using sys.argv[0] is a nice idea and should work (haven't tested it, though).
Comment 5 Frederic Peters 2009-05-06 22:07:04 UTC
Sorry I took so much time to get back on this bug report.

I experienced a little bit with sys.argv[0] and the problem is it is evaluated on the build master, for a shell command to be launched on the slaves. They could have different paths but this can be worked around using os.basename(sys.argv[0]), but is your build master also started with sugar-jhbuild ?

Anyway I pushed the part about the configurable buildbot directory:

commit 03c9fba115eba086fe693a2adaad7923f238b981
Author: Frederic Peters <fpeters@0d.be>
Date:   Thu May 7 00:01:56 2009 +0200

    [bot] new --buildbot-dir option for build masters
    
    Add a new option for specifying which work directory the build master
    should use. (part of GNOME #579877)
Comment 6 Sascha Silbe 2009-06-02 16:23:11 UTC
Works fine, thanks!
I would have expected --slaves-dir to default to --buildbot-dir and --pidfile to default to buildbot-dir/twist.pid, but we all of them given it works without custom patches now which is a huge step forward.

Is there any way to specify these in the config file (jhbuildrc)?

Comment 7 Sascha Silbe 2009-06-02 16:54:43 UTC
OK, almost. :)
Still had to change jhbuild -> sugar-jhbuild in jhbuild/buildbot/steps.py (on the master).
We're always starting via sugar-jhbuild, but currently stop using kill (with the pid file) because --stop doesn't work ("sugar-jhbuild bot: failed to get buildbot PID").

Comment 8 Frederic Peters 2009-06-02 17:00:18 UTC
There is no way to specify the pidfile from the configuration file.

slaves_dir is config.jhbuildbot_slaves_dir.
mastercfgfile is config.jhbuildbot_mastercfg.
buildbot_dir is config.jhbuildbot_dir.

For the sugar-jhbuild script name issue, I asked in comment #5:

> I experienced a little bit with sys.argv[0] and the problem is it is evaluated
> on the build master, for a shell command to be launched on the slaves. They
> could have different paths but this can be worked around using
> os.basename(sys.argv[0]), but is your build master also started with
> sugar-jhbuild ?
Comment 9 Sascha Silbe 2009-07-22 09:45:17 UTC
I was sure I'd answered this, but the comment doesn't show up on this bug, so here we go again:

> I experienced a little bit with sys.argv[0] and the problem is it is evaluated
> on the build master, for a shell command to be launched on the slaves. They
> could have different paths but this can be worked around using
> os.basename(sys.argv[0]), but is your build master also started with
> sugar-jhbuild ?

From comment #7:
We're always starting via sugar-jhbuild, [...]

The paths on master and slaves are different, BTW.

Comment 10 GNOME Infrastructure Team 2021-05-17 15:49:39 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/jhbuild/-/issues/97.