tinderd's auto-delete queue entry
Ion-Mihai Tetcu
itetcu at FreeBSD.org
Mon Jul 21 16:57:02 EDT 2008
On Mon, 21 Jul 2008 16:47:08 -0400
Joe Marcus Clarke <marcus at freebsd.org> wrote:
> Ion-Mihai Tetcu wrote:
> > Hi,
> >
> > From the README:
> > Now use:
> >
> > # cd ${pb}/scripts && ./tc addBuildPortsQueueEntry -b {BUILD} \
> > -d {PORT DIRECTORY}
> >
> > To add a port to the queue. tinderd will automatically pick it up,
> > run a tinderbuild on it, and will delete the entry after
> > tinderbuild completed.
> >
> > Now, my QA Tindy does something like:
> > > grep -C 3 ENQUEUED QAT_tinder_commit.sh
> > ${TC} addPort -b ${BUILD} -d ${PORT}
> > # ${TC} addBuildPortsQueueEntry -b ${BUILD}
> > -d ${PORT} -p ${PRIORITY} QR="insert into build_ports_queue
> > (Build_Ports_Queue_Id, Enqueue_Date, Build_Id, User_Id,
> > Port_Directory, Priority, Host_Id, Email_On_Completion, Status) \
> > values (NULL, NOW(), ${BUILD_ID}, 1, \"${PORT}\", ${PRIORITY}, 1,
> > 0, 'ENQUEUED'); \ insert into commit_mails \ values (NULL,
> > \"${MAIL_ID}\", \"`echo ${COMMITTER} | sed 's/"/\\"/g'`\",
> > \"${COMM_DATE}\", \"${TO}\", \"${SUBJ}\", LAST_INSERT_ID());"
> > ${MYSQL} -e "${QR}"
> >
> > and this queue entries are NOT deleted after the build finishes.
> > Note that I can not use addBuildPortsQueueEntry anymore (commented
> > above) because I need that LAST_INSERT_ID.
> >
> > For "regular" builds I use:
> > ${TC} addBuildPortsQueueEntry -b ${BUILD} -d ${PORT} -p
> > ${PRIORITY} and this queue entries ARE deleted after the build is
> > finished.
> >
> > Queue entries added via the web interface are also not deleted.
> >
> > 1. I believe there was a bug here that was silently corrected
> > recently since I was using addBuildPortsQueueEntry in both cases
> > and in neither the queue entries were deleted?
>
> Entries older than 25200 seconds (7 minutes) which are not ENQUEUED
> are deleted every time reorgBuildPortsQueue is called (by tinderd).
And that is called when?
> As long as you're setting the queue status properly (which is also
> done by tinderd), then this pruning should be happening.
At 23:52:45 local time:
# mysql -utinderbox -p -Dtinderbox -e "select * from build_ports_queue\G"
*************************** 1. row ***************************
Build_Ports_Queue_Id: 5245
Enqueue_Date: 2008-07-21 21:35:13
Completion_Date: 2008-07-21 22:49:51
Build_Id: 5
User_Id: 1
Port_Directory: finance/aqmoney
Priority: 9
Host_Id: 1
Email_On_Completion: 0
Status: SUCCESS
*************************** 2. row ***************************
Build_Ports_Queue_Id: 5246
Enqueue_Date: 2008-07-21 21:53:19
Completion_Date: 2008-07-21 22:35:59
Build_Id: 5
User_Id: 1
Port_Directory: finance/cbb
Priority: 9
Host_Id: 1
Email_On_Completion: 0
Status: SUCCESS
*************************** 3. row ***************************
Build_Ports_Queue_Id: 5252
Enqueue_Date: 2008-07-21 22:22:52
Completion_Date: 2008-07-21 22:24:57
Build_Id: 5
User_Id: 1
Port_Directory: x11/tint
Priority: 5
Host_Id: 1
Email_On_Completion: 0
Status: SUCCESS
*************************** 4. row ***************************
Build_Ports_Queue_Id: 5253
Enqueue_Date: 2008-07-21 22:53:21
Completion_Date: 2008-07-21 23:22:18
Build_Id: 5
User_Id: 1
Port_Directory: finance/eqonomize
Priority: 9
Host_Id: 1
Email_On_Completion: 0
Status: SUCCESS
*************************** 5. row ***************************
Build_Ports_Queue_Id: 5254
Enqueue_Date: 2008-07-21 22:55:30
Completion_Date: 2008-07-21 23:24:35
Build_Id: 5
User_Id: 1
Port_Directory: devel/p5-SVN-Notify-Filter-EmailFlatFileDB
Priority: 5
Host_Id: 1
Email_On_Completion: 0
Status: SUCCESS
[ .. ]
> > Or maybe I have a trigger broken in my MySQL database?
> >
> > 3. I suppose the delete from queue is done after running
> > postPortBuild Hook, right?
>
> It's done by tinderd.
Hmm. I need to be sure I still have the queue entry when postPortBuild
is run.
--
IOnut - Un^d^dregistered ;) FreeBSD "user"
"Intellectual Property" is nowhere near as valuable as "Intellect"
FreeBSD committer -> itetcu at FreeBSD.org, PGP Key ID 057E9F8B493A297B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://marcuscom.com/pipermail/tinderbox-list/attachments/20080721/e6ff2b40/attachment.bin>
More information about the tinderbox-list
mailing list