I want to move our bamboo server to a new server. In the new instance everything seems fine but the status reason will be 'Unknown'.
For example this was in the old server:
#6255 was successful Custom build by 'xy' with revision 'xy'
And this is after:
#6255 was successful Unknown
The bamboo and bitbucket communication works perfectly. If I rerun the build it will work. Maybe the old server caching this names to a different folder?
Hello Udvari,
Welcome to Atlassian community.
Can you paste the screenshot of the page which you are referencing in the above example ?
Regards,
Shashank Kumar
Hello,
Of course.
This is a screenshot from our working prod bamboo
This is the new migrated bamboo:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Udvari,
This seems little off, I don't think so there is any particular file on the Bamboo server where this Info would be fetched.
Either this data is Indexed or a call is made to DB to get the data, can you try to Reindex Bamboo and see if it helps, refer Reindexing data
Regards,
Shashank Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello David,
I was able to replicate this behaviour by manually editing some data in
buildresultsummary and buildresultsummary_customdata table.
Can you run the below 2 queries and share the results if possible, hide any confidential data if any.
1. select * from buildresultsummary where build_number=6255 and build_type='chain' and build_key='plan-key'
Replace plan-key with the affected plan key
2.
select * from buildresultsummary_customdata where buildresultsummary_id=
Put buildresultsummary_id from query 1
Regards,
Shashank Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
This is the query result:
select * from buildresultsummary where build_number=6255 and build_type='CHAIN' and build_key=‘DOC-AD';
buildresultsummary_id | build_type | created_date | build_key | plan_name | build_number | build_state | life_cycle_state | build_date | build_cancelled_date | build_completed_date | duration | processing_duration | time_to_fix | trigger_reason | delta_state | build_agent_id | stageresult_id | restart_count | queue_time | marked_for_deletion | once_off | custom_build | rebuild | log_size | variable_context_baseline_id | format_version | failure_test_count | success_test_count | total_test_count | broken_test_count | existing_test_count | fixed_test_count | total_test_duration | quarantined_test_count | skipped_test_count | vcs_update_time | chain_result | continuable | fixed_in_result | mergeresult_id
-----------------------+------------+-------------------------+-----------+--------------+--------------+-------------+------------------+-----------------------+----------------------+------------------------+----------+---------------------+-------------+----------------+-------------+----------------+----------------+---------------+-------------------------+---------------------+----------+--------------+---------+----------+------------------------------+----------------+--------------------+--------------------+------------------+-------------------+---------------------+------------------+---------------------+------------------------+--------------------+-----------------+--------------+-------------+-----------------+----------------
81437808 | CHAIN | 2023-12-12 14:45:05.483 | DOC-AD | Docker | 6255 | Successful | Finished | 2023-12-12 14:45:12.8 | | 2023-12-12 14:47:51.51 | 158710 | 155292 | | | PASSING | | | 0 | 2023-12-12 14:45:05.483 | f | t | f | f | | 79134747 | 70018 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | | f | |
(1 row)
select * from buildresultsummary_customdata where buildresultsummary_id=81437808;
buildresultsummary_id | custom_info_key | custom_info_value
-----------------------+-----------------------------------------+-------------------
81437808 | ManualBuildTriggerReason.customRevision | 9b5d76412a5
81437808 | customRevision | 9b5d76412a5
81437808 | ManualBuildTriggerReason.userName | david.udvari
81437808 | dependenciesDisabled | true
81437808 | plan.storageTag | plan-7471130
(5 rows)
I compared it with the original bamboo and it matches.
Br,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey David,
If you look at the result of the 1st query, the column trigger_reason is Blank, when I was replicating this issue I manually made it empty and had the same result as yours.
When you re trigger the build what is the value of this column can you please confirm and also what version of Bamboo are you using?
Regards,
Shashank Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shashank,
You are right. If I change the trigger_reason to the original data, it's fine. This is a bamboo version 7.0.4. I don't know, if I restore this configuration to a newer version, will it work? Or do I need to update the original bamboo.
Br,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey David,
Bamboo 7.0.4 is end of life version since a long period of time, I don't know if this is a bug or something difficult to say.
if I understand you correctly in your old bamboo server and the DB this column ( trigger_reason ) is having value for all the builds.
When you move to new server this column is not having data, please correct me If I am wrong.
Also are you using the same DB or you copied the data from old db to new DB, probably some problem while copying the data from old to new new DB.
Regards,
Shashank Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I updated the original bamboo instance in a cloned environment to 8.0.11 and exported. If I load the exported zip into the new system this error appears on the log:
2024-10-08 17:03:53,312 INFO [10-BAM::PlanExec:pool-16-thread-3] [NonBlockingPlanExecutionServiceImpl] Object CHAIN:AUT-ADS1 has been deleted.
2024-10-08 17:03:53,312 WARN [10-BAM::PlanExec:pool-16-thread-3] [ImmutablePlanCacheServiceImpl] Attempt to load plan AARCH-IATH2 while cache is disabled
2024-10-08 17:03:53,312 ERROR [10-BAM::PlanExec:pool-16-thread-3] [ImmutablePlanCacheServiceImpl]
com.atlassian.bamboo.plan.cache.ImmutablePlanCacheServiceImpl$PlanCacheDisabledException: Plan cache is disabled
And the result is the same. All trigger_reason column are blank.
I will try to unzip the exported file and see if it exists or not.
Do you have any other ideas?
Br,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello David,
Looks like the export zip is corrupted possibly it was created when this plan was doing some actions.
Let's do the below.
1. Your original Bamboo Instance is 7.0.4 which is on a old host.
2. From the same Bamboo Instance create a new export zip ( make sure when you are creating the export zip the server is paused )
3. On the new host Install the same version of Bamboo which is 7.0.4 and import the zip, at this point you'll have two Bamboo running in one on old host and one on new host.
4. Compare if the trigger reason column is populated on the Bamboo on the new host.
5. If yes then go ahead and upgrade Bamboo on the new host
6. If no, then something is wrong when the export zip is being created, we'll discuss that further.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I paused the original bamboo instane and created an export. After I imported to the new server and it is the same trigger_reason in db are empty.
I exported the new server and unzipped the backup and the trigger_reason is here:
root@bamboo:/var/atlassian/application-data/bamboo/shared/exports# grep -r "buildReason" ./ | head -n 10
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:RerunBuildTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:CodeChangedTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason</buildReason>
But when I imported into the new server the postgres db said this:
cat /var/log/postgresql/postgresql-14-main.log | grep buildresultsummary
2024-10-08 19:43:11.027 CEST [504533] bamboouser@bamboo ERROR: relation "buildresultsummary" does not exist at character 22
2024-10-08 19:43:11.027 CEST [504533] bamboouser@bamboo STATEMENT: select count(*) from buildresultsummary
2024-10-08 19:43:11.029 CEST [504533] bamboouser@bamboo ERROR: relation "buildresultsummary_customdata" does not exist at character 22
2024-10-08 19:43:11.029 CEST [504533] bamboouser@bamboo STATEMENT: select count(*) from buildresultsummary_customdata
2024-10-08 19:43:11.030 CEST [504533] bamboouser@bamboo ERROR: relation "buildresultsummary_label" does not exist at character 22
2024-10-08 19:43:11.030 CEST [504533] bamboouser@bamboo STATEMENT: select count(*) from buildresultsummary_label
2024-10-08 19:43:48.667 CEST [504534] bamboouser@bamboo ERROR: relation "buildresultsummary" does not exist
2024-10-08 19:43:48.668 CEST [504534] bamboouser@bamboo ERROR: relation "buildresultsummary" does not exist
2024-10-08 19:43:48.669 CEST [504534] bamboouser@bamboo ERROR: relation "buildresultsummary" does not exist
2024-10-08 19:43:48.669 CEST [504534] bamboouser@bamboo ERROR: relation "buildresultsummary" does not exist
2024-10-08 19:43:48.671 CEST [504534] bamboouser@bamboo ERROR: relation "buildresultsummary_customdata" does not exist
2024-10-08 19:43:48.671 CEST [504534] bamboouser@bamboo ERROR: relation "buildresultsummary_label" does not exist
2024-10-08 19:43:48.672 CEST [504534] bamboouser@bamboo ERROR: relation "buildresultsummary_label" does not exist
2024-10-08 19:43:48.672 CEST [504534] bamboouser@bamboo ERROR: relation "buildresultsummary_label" does not exist
2024-10-08 19:43:48.673 CEST [504534] bamboouser@bamboo ERROR: relation "buildresultsummary_label" does not exist
2024-10-08 19:44:40.994 CEST [504537] bamboouser@bamboo ERROR: relation "buildresultsummary" does not exist
2024-10-08 19:44:40.995 CEST [504537] bamboouser@bamboo ERROR: relation "buildresultsummary" does not exist
2024-10-08 19:44:40.996 CEST [504537] bamboouser@bamboo ERROR: relation "buildresultsummary" does not exist
2024-10-08 19:44:40.996 CEST [504537] bamboouser@bamboo ERROR: relation "buildresultsummary" does not exist
2024-10-08 19:44:40.997 CEST [504537] bamboouser@bamboo ERROR: relation "buildresultsummary_customdata" does not exist
2024-10-08 19:44:40.998 CEST [504537] bamboouser@bamboo ERROR: relation "buildresultsummary_label" does not exist
2024-10-08 19:44:40.998 CEST [504537] bamboouser@bamboo ERROR: relation "buildresultsummary_label" does not exist
2024-10-08 19:44:40.999 CEST [504537] bamboouser@bamboo ERROR: relation "buildresultsummary_label" does not exist
2024-10-08 19:44:41.000 CEST [504537] bamboouser@bamboo ERROR: relation "buildresultsummary_label" does not exist
2024-10-08 20:46:29.084 CEST [507095] postgres@postgres ERROR: relation "buildresultsummary" does not exist at character 15
So I tried with the H2 embedded db and it's the same Unknown status. (reindexed manually).
I ran this query as two systems. (select BUILDRESULTSUMMARY_ID,TRIGGER_REASON from BUILDRESULTSUMMARY). And I found that only the 'com.atlassian.bamboo.plugin.system.triggerReason:CustomRevisionBuildTriggerReason' rows are missing from the new server database
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello David,
if the export file does not contains that value, then probably a bug for that specific version. I'll have to test this in my system and confirm.
You can try to manual clone the DB and home directory instead of Export and Import and this problem will not come.
Regards,
Shashank kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.