Storing the results for git cache maintenance tasks

43 views
Skip to first unread message

Mark Waite

unread,
Aug 11, 2022, 11:49:52 PM8/11/22
to Jenkins Developers
Hrushikesh Rao has been implementing the git cache maintenance project in Google Summer of Code.  We have a working demo in pull requests to the git client plugin and git plugin.

Hrushikesh would like to show the administrator the results of the most recent maintenance tasks.  In order to do that, he needs to store those results on the Jenkins controller.  He needs keep a fixed number of those (some form of time series)? and needs to present them to the user in a comfortable user interface.

Those are all areas that are outside of my skills in plugin development.

Can others offer suggestions of existing implementations that Hrushikesh could consult to see effective and reasonable ways to store the most recent results of a task and present the most recent results of tasks to the administrator?

Mark Waite

Jesse Glick

unread,
Aug 12, 2022, 1:58:44 PM8/12/22
to jenkin...@googlegroups.com
On Thu, Aug 11, 2022 at 11:49 PM Mark Waite <mark.ea...@gmail.com> wrote:
effective and reasonable ways to store the most recent results of a task and present the most recent results of tasks to the administrator

There is no standard technique for this. Branch indexing copies a bunch of code from `Run` and implements its own log storage (no history). Would make sense to define a convenience API for build-like logs, especially as that could be a single place to implement https://jenkins.io/jep/207 and so on.

P0512 Hrushikesh

unread,
Aug 13, 2022, 3:01:10 AM8/13/22
to Jenkins Developers
Implementation of execution of maintenance task is complete on the Jenkins controller. Currently I am working on a way to store the execution data into a log file and display it in the UI.
To do this I'll need a way to write and read from the file in real time to show the status of execution.

Data to be stored in log file are -
1) Git repo name
2) Size of the repo
3) Type of maintenance task
3) Previous maintenance execution timestamp
4) Current Status
5) Execution time

We were looking at various options. We came across rrd files (Round robin database). I don't think rrd is suitable for current requirements. We can however use it for analysis of maintenance tasks over a period of time.
Is there any plugin in Jenkins which I can refer so that I can write to a file and display the results in the maintenance UI as a table?

Hrushikesh Rao

Gavin Mogan

unread,
Aug 14, 2022, 2:34:21 AM8/14/22
to Jenkins Developers
Don't rrds just store a timestamp and an integer?

My vote is keep it consistent with XML. It's not hard in Jenkins to serialize an object. A standard interface like the jep would eventually allow plugins to store using different mechanisms like a db

As for limited time and count, it seems like a list would be pretty simple and serializable unless your talking about many many per second.

Shove onto the end of the list. If it's too long, delete from the start. If first entry is too old, delete from list.

This is assuming you want to keep structured data. If it's just a long, the standard logging interfaces sound like a good bet.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/d303650d-0724-48df-9813-0bd6ed94383dn%40googlegroups.com.

P0512 Hrushikesh

unread,
Aug 15, 2022, 12:59:07 AM8/15/22
to Jenkins Developers
Yes, rrds store a timestamp and an integer. Hence I realized it is not suitable for our requirements.

By serializing do you mean to you the Java inbuilt serializable interface to create a ByteArray file or create an Xml file from the Java object?

If XML file is required, I'm planning to use XStream as suggested by the Jenkins documentation.
Reply all
Reply to author
Forward
0 new messages