Activity log for bug #1298166

Date Who What changed Old value New value Message
2014-03-27 02:49:40 Daniel Manrique bug added bug
2014-03-27 13:10:32 Daniel Manrique description I was looking at why when using canonical-certification-server, the environment variables aren't read from the /etc/xdg/*.conf files (in the environ section). I created a very simple job that just prints "env", to ensure that the environment is set in the simplest of cases. Variables I set in the config file didn't show up in env output. Interestingly this happened both with canonical-certification-server and with plainbox run. So I went looking at the difference between canonical-certification-server and checkbox sru, since I know this mechanism is working fine for SRU (and mini-ci). I found that sru has a _run_single_job method that uses the applogic.run_job_if_possible method, to which it passes the config object: job_state, job_result = run_job_if_possible( self.session, self.runner, self.config, job) Then, run_job_if_possible does pass the config object to the runner's run_job: if job_state.can_start(): job_result = runner.run_job(job, config) However, CliInvocation (from cli.py) has a _run_single_job_with_session method which encapsulates all the job running logic, and has this: if job_state.can_start(): job_result = runner.run_job(job) SO it's not passing the config object (which at this point is similarly available in self.config) and thus the settings, particularly the environment, are ignored. Just to verify, I modified the call to this: job_result = runner.run_job(job) In this case my dummy job did print the variables correctly (although they're not uppercased as they should be). This appears to also be the case with "plainbox run", as plainbox/impl/commands/run.py has this: job_result = runner.run_job(job) The code section where this is is nearly identical to the one from checkbox_ng cli.py. Finally I found another instance of run_job() with no config passed in plainbox's analyze.py file. I was looking at why when using canonical-certification-server, the environment variables aren't read from the /etc/xdg/*.conf files (in the environ section). I created a very simple job that just prints "env", to ensure that the environment is set in the simplest of cases. Variables I set in the config file didn't show up in env output. Interestingly this happened both with canonical-certification-server and with plainbox run. So I went looking at the difference between canonical-certification-server and checkbox sru, since I know this mechanism is working fine for SRU (and mini-ci). I found that sru has a _run_single_job method that uses the applogic.run_job_if_possible method, to which it passes the config object:         job_state, job_result = run_job_if_possible(             self.session, self.runner, self.config, job) Then, run_job_if_possible does pass the config object to the runner's run_job:     if job_state.can_start():         job_result = runner.run_job(job, config) However, CliInvocation (from cli.py) has a _run_single_job_with_session method which encapsulates all the job running logic, and has this:     if job_state.can_start():         job_result = runner.run_job(job) SO it's not passing the config object (which at this point is similarly available in self.config) and thus the settings, particularly the environment, are ignored. Just to verify, I modified the call to this:         job_result = runner.run_job(job, self.config) In this case my dummy job did print the variables correctly (although they're not uppercased as they should be). This appears to also be the case with "plainbox run", as plainbox/impl/commands/run.py has this:             job_result = runner.run_job(job) The code section where this is is nearly identical to the one from checkbox_ng cli.py. Finally I found another instance of run_job() with no config passed in plainbox's analyze.py file.
2014-03-27 13:26:31 Zygmunt Krynicki checkbox: status New Triaged
2014-03-27 13:26:34 Zygmunt Krynicki checkbox: importance Undecided Critical
2014-03-27 13:26:38 Zygmunt Krynicki checkbox: milestone checkbox-ng-0.3
2014-03-27 16:10:19 Zygmunt Krynicki checkbox: assignee Zygmunt Krynicki (zkrynicki)
2014-03-27 21:58:14 Zygmunt Krynicki branch linked lp:~zkrynicki/checkbox/fix-1298166
2014-03-27 21:58:18 Zygmunt Krynicki checkbox: status Triaged In Progress
2014-03-28 13:46:13 Zygmunt Krynicki checkbox: status In Progress Fix Committed
2014-04-03 15:44:10 Zygmunt Krynicki bug task added checkbox-ng
2014-04-03 15:44:45 Zygmunt Krynicki bug task added plainbox
2014-04-03 15:44:50 Zygmunt Krynicki plainbox: milestone 0.5.3
2014-04-03 15:47:56 Zygmunt Krynicki checkbox-ng: milestone 0.3
2014-04-03 15:48:01 Zygmunt Krynicki checkbox-ng: status New Fix Committed
2014-04-03 15:48:03 Zygmunt Krynicki plainbox: status New Fix Committed
2014-04-03 15:48:06 Zygmunt Krynicki plainbox: importance Undecided Critical
2014-04-03 15:48:07 Zygmunt Krynicki checkbox-ng: importance Undecided Critical
2014-04-03 15:48:10 Zygmunt Krynicki checkbox-ng: assignee Zygmunt Krynicki (zkrynicki)
2014-04-03 15:48:12 Zygmunt Krynicki plainbox: assignee Zygmunt Krynicki (zkrynicki)
2014-04-03 15:48:17 Zygmunt Krynicki checkbox: milestone checkbox-ng-0.3
2014-04-07 08:45:47 Zygmunt Krynicki checkbox-ng: status Fix Committed Fix Released
2014-04-07 08:45:52 Zygmunt Krynicki checkbox-ng: status Fix Released Fix Committed
2014-04-07 08:45:57 Zygmunt Krynicki plainbox: status Fix Committed Fix Released
2014-04-07 21:00:20 Zygmunt Krynicki checkbox-ng: status Fix Committed Fix Released
2014-04-23 16:45:32 Zygmunt Krynicki bug task deleted checkbox