ks-devops icon indicating copy to clipboard operation
ks-devops copied to clipboard

the excess builds were not deleted

Open liuyp2018 opened this issue 3 years ago • 9 comments
trafficstars

Describe the Bug

  1. The maximum number of build records is set to 1
  2. In the build list, the excess builds were not deleted

image

Versions Used KubeSphere: kubesphere v3.2.1-rc.1 Kubernetes: (If KubeSphere installer used, you can skip this)

/assign @JohnNiang /kind bug /priority Medium

liuyp2018 avatar Dec 02 '21 09:12 liuyp2018

I am interested in this issue and hope to try to solve it

mzmuer avatar Dec 09 '21 10:12 mzmuer

@mzmuer Great! Please let us know if you need any kind of help.

LinuxSuRen avatar Dec 09 '21 10:12 LinuxSuRen

@LinuxSuRen @JohnNiang I have found out the cause of the problem, Is this a legacy issue? I'm prepare to remove excess records at the end(finish, cancel, fail) of the job execution or process them when the list is returned. May I ask what kind of practice is generally preferred according to the project.

mzmuer avatar Dec 13 '21 03:12 mzmuer

Normally, I prefer to remove the PipelineRuns in two ways:

  • pipeline gc command
  • Receive the delete event from Jenkins (manual or automated), then ks-devops can delete it
    • For this case, I guess there are two components: event-receiver in ks-devops, event sender as a Jenkins plugin
    • pipeline-event-plugin is a draft project to play as an event sender
    • we have not started the event receiver part

LinuxSuRen avatar Dec 13 '21 03:12 LinuxSuRen

Normally, I prefer to remove the PipelineRuns in two ways:

  • pipeline gc command

  • Receive the delete event from Jenkins (manual or automated), then ks-devops can delete it

    • For this case, I guess there are two components: event-receiver in ks-devops, event sender as a Jenkins plugin
    • pipeline-event-plugin is a draft project to play as an event sender
    • we have not started the event receiver part

I see. Event-drive is a better solution. So now when the job end(or list returned) use similar cleanPipelineRunInNamespace function to temporary solve the problem?

mzmuer avatar Dec 13 '21 07:12 mzmuer

Yes, I'm thinking about if you're interested in the event-driven feature. I personally prefer to have a final solution in release 3.3 instead of a temporary one.

By the way, we have a SIG meeting this week. Please join us and let's talk about it if you have free time.

LinuxSuRen avatar Dec 13 '21 07:12 LinuxSuRen

Yes, I'm thinking about if you're interested in the event-driven feature. I personally prefer to have a final solution in release 3.3 instead of a temporary one.

By the way, we have a SIG meeting this week. Please join us and let's talk about it if you have free time.

thank you, very interested and to join yous. But I'm new to DevOps, so I still play a learning role.

mzmuer avatar Dec 13 '21 07:12 mzmuer

We have a WeChat. Please add me (ID: linuxsuren) as a WeChat contact, I can let you in it.

LinuxSuRen avatar Dec 13 '21 07:12 LinuxSuRen

reference issue: #847

yudong2015 avatar Nov 09 '22 04:11 yudong2015