Why does one build plan not actually do anything?
Asked by Peter Drexel:

We have a number of build plans that are working (i.e., calling the scripts and commands that we configured). However, we have one plan that does nothing when you run it manually or when it detects a repository change and runs automatically. When you run it manually, it appears from the web interface to execute, but quickly ends with no indication of failure but there are no artifacts and no log. This plan used to perform as expected so I guess something in the configuration has changed, but I'm not sure what.

I did recently (Jul 3) change the branch name regex for a different plan, but I'm not sure how that could have affected the non-working plan. I did revert the change and the non-working plan is still not working.

Any ideas would be appreciated


Answers:
author: Shashank Kumar
body: Hello Peter,

Welcome to Atlassian community.

I am not sure at this point what is the error, probably can you once try to resave the repository and run the plan and see if it works.

You have mentioned that there are no build logs and no errors, can you check the below files in the remote agent logs using the build key and check if you get any errors.

\<bamboo-agent-home\>logs\>atlassian-bamboo.log file

Regards,

Shashank Kumar

**\*\*please don't forget to Accept the answer if your query was answered\*\***

comments: author: Peter Drexel
body: When I attempt a manual build from the Bamboo web interface for our develop branch, no commands are executed and the the status goes green within seconds. I do see these entries in the log. The referenced commit corresponds to develop.

2024-07-08 09:12:56,935 INFO \[AtlassianEvent::0-BAM::EVENTS:pool-2-thread-20\] \[BitbucketBuildStatusUpdater\] Unable to sent build status update to Bitbucket: POST <https://api.bitbucket.org/2.0/repositories/delta-q/smp_auth/commit/c958454f78c2e6c89b7346586ff0f01a68a8e834/statuses/build> returned a response status of 400 Bad Request

<br />

2024-07-08 09:12:56,982 INFO \[AtlassianEvent::0-BAM::EVENTS:pool-2-thread-4\] \[BitbucketBuildStatusUpdater\] Unable to sent build status update to Bitbucket: POST <https://api.bitbucket.org/2.0/repositories/delta-q/smp_auth/commit/c958454f78c2e6c89b7346586ff0f01a68a8e834/statuses/build> returned a response status of 400 Bad Request


author: Shashank Kumar
body: Hello David,

The error means Bamboo was not able to send the request back to Bitbucket after the build was triggered, but that's not the problem which you are trying to solve here.

I think we'll need to see the build logs to see what the Bamboo plan is doing and also your plan structure to see what is suppose to be executed but it's not.

I am not sure if you share this information publicly here, if not you can open a support request with Atlassian support.

Regards,

Shashank Kumar


author: Peter Drexel
body: I'm Peter BTW.

If the log you're referring to is the one accessible via the logs tab in the web interface, there is none. It's as if the build doesn't think there is anything to do.

Initially, I tried to get support from Atlassian, but we no longer have a support contract.

Thx,

Pete


author: Shashank Kumar
body: Hello Peter,

Apologies for calling you as David, let's do the below to investigate.

1. Can you tell me at high level what are tasks which are in the particular Job.

2. Is your build running on remote agent or local agent.

3. You will see a build key for the plan which you are running on the Bamboo GUI, example SCRIP-TIC-56 which is {plan-key-buildnumber}

4. Inside the agent which is running this build when the build starts you'll see below

2024-07-08 17:06:17,703 INFO \[2-BAM::agent1::Agent:Thread-16\] \[BuildAgentControllerImpl\] SCRIP - TIC - Default Job #57 (SCRIP-TIC-JOB1-57) taken from queue.

5. The below message is printed when the build completes

2024-07-08 17:06:19,680 INFO \[2-BAM::agent1::Agent:Thread-16\] \[RemoteResultProcessor\] Build SCRIP - TIC - Default Job #57 (SCRIP-TIC-JOB1-57) completed on Bamboo agent. Sending results to server.

Can you get all the logs in between 2 the two events for your plan and then we can check what is happening. These logs would be found on the agent which is running the build at \<bamboo-agent-home\>logs\>atlassian-bamboo.log file.

Regards,

Shashank Kumar


author: Peter Drexel
body: 1) The high level tasks are

a) Source Code Checkout

b) Git clean

c) Call batch file to set some environment variables

d) Compile/link

e) Call batch file to publish files

2) We use remote agents

3) TEST-TBP-3151

4) I don't think the build ever gets to the agent (it's too quick) and if it did get to the agent, I'm not sure which agent as there is no build log

5) There is no such message for this build plan

![Capture.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/334100iB0F6AF97377C7395/image-size/large?v=v2&px=999 "Capture.JPG")


author: Peter Drexel
body: Something I just realized is that when a new branch is created and pushed in Git, the build plan in question is not running automatically like it used to. Other expected build plans run, but not this one.


author: Shashank Kumar
body: Hello Peter,

If the build is showing as Green, it should have been sent to an agent, we need to identify which agent. Can you check the Bamboo server application logs for the below message

Can you check all the below message when the Build was trigerred and the Build completed on the Bamboo server.

```
2024-07-09 08:55:58,041 INFO [12-DelayedChangeDetectionThread:pool-13-thread-1] [ChainExecutionManagerImpl] Build SCRIP-TIC-JOB1-58 has been dispatched
2024-07-09 08:55:58,131 INFO [ActiveMQ Session Task-5] [BuildQueueManagerImpl] Sending SCRIP-TIC-JOB1-58 to agent agent1 (id: 688129, REMOTE, online, enabled)
2024-07-09 08:56:00,358 INFO [AtlassianEvent::1-BAM::EVENTS:pool-2-thread-12] [ChainExecutionManagerImpl] Plan SCRIP-TIC-58: SCRIP - TIC has finished executing
```

Once you are able to identify the agent, then you can check the agent logs as mentioned in the previous steps to investigate the problem.

Regards,

Shashank Kumar


author: Peter Drexel
body: When I manually run the branch, here's what's added to atlassian-bamboo.log. I don't see the line you're referring to.

2024-07-09 08:34:09,651 WARN \[http-nio-8085-exec-25\] \[CacheAwareness$1\] Inheriting disabledCaches:\[com.atlassian.bamboo.CHANGE_DETECTION\]

<br />

2024-07-09 08:34:10,666 INFO \[7-DelayedChangeDetectionThread:pool-10-thread-20\] \[ChainExecutionManagerImpl\] Plan TEST-TBP-3155: SSP - SSP Build has finished executing

<br />

2024-07-09 08:34:10,666 INFO \[7-DelayedChangeDetectionThread:pool-10-thread-20\] \[PlanStatePersisterImpl\] Updating delta states of build following TEST-TBP-3155  
2024-07-09 08:34:10,666 INFO \[AtlassianEvent::0-BAM::EVENTS:pool-2-thread-41\] \[DependencyChainListener\] Checking children plans of \[TEST-TBP\] for plan TEST-TBP-3155

<br />

2024-07-09 08:34:10,682 INFO \[AtlassianEvent::0-BAM::EVENTS:pool-2-thread-41\] \[DependencyChainListener\] Finished checking children plans of 'SSP - SSP Build' for plan TEST-TBP-3155

<br />

2024-07-09 08:34:10,870 INFO \[AtlassianEvent::0-BAM::EVENTS:pool-2-thread-29\] \[BitbucketBuildStatusUpdater\] Unable to sent build status update to Bitbucket: POST <https://api.bitbucket.org/2.0/repositories/delta-q/smp_auth/commit/c958454f78c2e6c89b7346586ff0f01a68a8e834/statuses/build> returned a response status of 400 Bad Request

<br />

2024-07-09 08:34:10,916 INFO \[AtlassianEvent::0-BAM::EVENTS:pool-2-thread-40\] \[BitbucketBuildStatusUpdater\] Unable to sent build status update to Bitbucket: POST <https://api.bitbucket.org/2.0/repositories/delta-q/smp_auth/commit/c958454f78c2e6c89b7346586ff0f01a68a8e834/statuses/build> returned a response status of 400 Bad Request


author: Shashank Kumar
body: Hello Peter,

It's really strange to not have the Job startup logs and difficult to tell what's happening without the support zip.

Let's do couple of quick things.

1. Shutdown Bamboo and Restart it, this will recreate the plan cache and let's see if you get the same issue.

2. Clone the plan and disable the original plan and run the clone plan and see if you see the same behaviour.

3. You can also try to change the linked repository for the plan and see if you see the same issue.


author: Peter Drexel
body: 1) I have tried this several times already with no effect

2) I just did this and the new plan behaves the same way

3) I'm not exactly sure what to do here. Do you want me to delete the plan's repository and then re-add it? Or, do you want me to create a new linked repository and then replace the plan's repository with the newly linked one?


author: Peter Drexel
body: Should I ask our admin to create a support zip? Is there a link on how to do that?


author: Shashank Kumar
body: Hello Peter,

You can create a new linked repository and then replace the plan's repository with the newly linked one and then run and see what happens.


author: Shashank Kumar
body: This is a public forum and we should not upload any support zip for your own safety.


author: Peter Drexel
body: OK, I figured it out. Apologies to all for not realizing it sooner. It turns out the job within the plan was disabled. I only discovered this because I went to recreate the plan instead of cloning it and I noticed under the Job Details tab that it had been disabled. I'm not sure when/how/who disabled it, but once it was re-enabled, the plan executed as expected. Thanks for all the help.


author: Shashank Kumar
body: Thanks Peter for letting us know the real issue.

You can check the Audit logs for the plan to check when was the Job disabled and by whom.

Regards,

Shashank kumar