Delete pipelines

32 views
Skip to first unread message

Anouar Prima

unread,
Oct 6, 2020, 2:55:09 PM10/6/20
to go...@googlegroups.com
Hi,

When I delete a pipeline using the UI of GoCD I notice that the pipeline is not deleted from the H2 database. The content of the following columns are not deleted from the PIPELINES table: ID  | NAME | BUILDCAUSETYPE | BUILDCAUSEBY | LABEL| BUILDCAUSEMESSAGE| COUNTER | LOCKED | NATURALORDER | COMMENT

My question is :
If I delete the records from The table PIPELINES , I'm talking about records related to a specific pipeline that I deleted using the user interface of GoCD, are there any other tables to cleanup? Are there any constraints ? 

Thank you

Anouar



Aravind SV

unread,
Oct 7, 2020, 3:28:03 AM10/7/20
to Anouar Prima, go...@googlegroups.com

Hello Anouar,

It’s not recommended to change the DB manually. All bets are off if you do. I’m sure there are dependencies etc. which will cause problems at a later time.

Cheers,
Aravind

Aravind SV

unread,
Oct 8, 2020, 5:27:07 AM10/8/20
to Anouar Prima, go...@googlegroups.com

Hello Anouar,

[Adding the group since it might be useful to others]

Do you have any suggestions to reduce the size of the database, we have more than 600 popelines to delete because they are inactive and we dont want to delete them and keep their data in our database. The database is H2, the .db file is loaded in memory when starting GoCD and it’s causing a lot of slowness because the file became voluminous.

What is the best practice to perform this clean up?

Migrating to 20.7 to take advantage of postgres is not an option for us because the validation of the tool after the migration will be costly and will take too much time and resources, and this validation is mondatory because we work in -redacted-by-aravind- field.

Unfortunately there isn’t a known way to delete pipeline history from the database. This was brought up in an early GoCD issue, issue #13. There can be side effects on VSM, fan-in and other parts of GoCD by having “holes” in history.

I’d usually recommend moving to Postgres, but you say that’s not possible. Given that validation is important, I don’t see how deleting random content from the internal database can keep your existing validation … valid. That seems way more dangerous than using a documented database option (Postgres) which offers much better overall performance for the system.

The other option when slowness comes up in any system, I guess, is to see if increasing memory and CPU provided, or improving the speed of disk etc. will help. But, that’s something that depends on your environment and setup.

Regards,
Aravind

Sriram Narayanan

unread,
Oct 8, 2020, 5:40:43 AM10/8/20
to go...@googlegroups.com, Anouar Prima
In the domains that I work in - primarily Government - deleting history would be seen as a no-no.

Would it be possible to elaborate on the validation, or to redefine what is to be validated?

E.g., when discussing with auditors (I am one too), I would draw attention to:
- The VSM, what it enforces, and the controls on it
- The source of truth of the configuration (including the VSM) being a version-controlled file.
- The engineering behind the product (GoCD) accessible via https://build.gocd.org/
- The ability to review the differences between the version that has been blessed and the version that you wish to move to (by using the pipeline-comparison at build.gocd.org, e.g. https://build.gocd.org/go/compare/PublishStableRelease/76/with/77) - with the differences including the test suite and the detailed changelog.
- The ability to recreate the setup using configuration management.

I would ensure that the version is what is blessed vs the installed instance.

Do let me know if you'd like a call to discuss the above. 

-- Ram

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/m2ft6pxe3f.fsf%40arvindsv.com.
Reply all
Reply to author
Forward
0 new messages