tinderd's auto-delete queue entry

Ion-Mihai Tetcu itetcu at FreeBSD.org
Mon Jul 21 07:19:33 EDT 2008


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?

2. What is different between my INSERT and addBuildPortsQueueEntry?

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?


Thanks,

-- 
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/07d0722f/attachment.bin>


More information about the tinderbox-list mailing list