Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

same steps, same agent, different configuration, different results #4064

OnQuickBuild ·

Hi Quickbuild support

There has been a weird bug I encountered and I couldn't figure out why it occurs.

It's a Windows agent, a physical laptop used for this project.
The steps are two batch steps:

  1. whoami
  2. covxml (which is a bullseye coverage command line)

The thing is, if I use a standalone config to run these two steps only, the build will pass. But when I do the same in our production configuration, it reports weird outputs:
step 1 output doesn't show the same agent username, it shows "encrypted" values:

14:57:13,376 INFO  - Running step...
14:57:13,400 INFO  -
14:57:13,401 INFO  - C:\buildagent\buildagent\workspace\root\Products\Our_Products\One_Product\per_check-in\trunk>whoami
14:57:13,413 INFO  - *****
14:57:13,416 INFO  - Executing post-execute action...

Why does it output secret value?
And in step two it will report

14:57:14,286 INFO  - Running step...
14:57:14,312 INFO  -
14:57:14,312 INFO  - C:\buildagent\buildagent\workspace\root\Products\Our_Products\One_Product\per_check-in\trunk>covxml -f test.cov -o cov_result.xml -q
14:57:14,318 WARN  - 'covxml' is not recognized as an internal or external command,
14:57:14,318 WARN  - operable program or batch file.
14:57:14,322 INFO  - Executing post-execute action...

And the bullseye command line ARE in system PATH, it works with a standalone config.

About the production config setup, it starts off with a Linux agent, the step structure is about this:
-- Linux sequential starts (here it sets environment variables)
---- compile code on Linux
---- send file to a specific Windows agent
------ run the two steps

I made sure the steps ARE running on the correct Windows agent. Is it possible you could provide some insights based on my description?

I'm guessing the top level Linux environment variable setup has impacts on the child steps that are on Windows.

Thank you!

  • replies 8
  • views 1336
  • stars 0
robinshen ADMIN ·

It prints ***** for whoami command as the whoami output is the same as value of some secret variable in your production QB set up. QB scans all command output and masks appearances of all secret texts.

As to the second issue, most probably your production environment does not have the tool "covxml" in PATH. To make sure, you may print out PATH of both environments via a step by running:

OnQuickBuild ·

Hi Robin
Thanks for your reply

But I don't think this is the case.
For convenience, I do have a pair of variables for username and password, as secret values. The username is "isg-quickbuild-admin"
As I mentioned, the same steps worked in another configuration that only has the two steps. You can see I tested at about the same time

14:50:24,406 INFO  - Running step...
14:50:24,448 INFO  -
14:50:24,449 INFO  - C:\buildagent\buildagent\workspace\root\Sandbox\test>whoami
14:50:24,466 INFO  - isg-quickbuild-admin
14:50:24,470 INFO  - Executing post-execute action...
14:50:24,705 INFO  - Running step...
14:50:24,751 INFO  -
14:50:24,752 INFO  - C:\buildagent\buildagent\workspace\root\Sandbox\test>covxml -f test.cov -o cov_result.xml -q
14:50:25,252 INFO  - Executing post-execute action...

And what do you mean by "most probably your production environment does not have the tool "covxml" in PATH"? For the agent laptop, the tool is in system PATH. The clean configuration doesn't have to setup anything and it works.

What else could it be?

OnQuickBuild ·

This is truly confusing. What could be the cause?
Still the same laptop/agent.

13:52:11,593 INFO  - Running step...
13:52:11,876 INFO  -
13:52:11,877 WARN  - 'whoami' is not recognized as an internal or external command,
13:52:11,877 INFO  - C:\buildagent.test\buildagent\workspace\root\Products\Our_Products\One_Product\per_check-in\trunk>whoami
13:52:11,877 WARN  - operable program or batch file.
13:52:11,880 INFO  - Executing post-execute action...
13:58:33,583 INFO  - Running step...
13:58:33,609 INFO  -
13:58:33,609 WARN  - 'env' is not recognized as an internal or external command,
13:58:33,609 WARN  - operable program or batch file.
13:58:33,609 INFO  - C:\buildagent.test\buildagent\workspace\root\Products\Our_Products\One_Product\per_check-in\trunk>env
13:58:33,613 INFO  - Executing post-execute action...

This is from the production configuration. Yesterday it could still run "whoami" and outputs the *****. It won't even run today. How can the behavior change overnight without any changes on the laptop or on QB configs?

robinshen ADMIN ·

Make sure you are using the step type "Shell/Batch Command" instead of "Commandline Execution". Also make sure that you did not enable "Legacy Command Mode" in advanced setting of the configuration.

OnQuickBuild ·

The legacy command mode is "no"
The step is shell/batch command.

robinshen ADMIN ·

Looks like you are prefixing the command with directory. These commands should be shell commands, and are normally called directly with env or whoami.

OnQuickBuild ·

No Robin I didn't prefix anything before "env" or "whoami". The INFO output contains the execution path.

robinshen ADMIN ·

Let's check the issue together with the unexpected build cancelling problem by holding an online meeting