kubesphere / ks-devops

This is a cloud-native application that focuses on the DevOps area.
https://kubesphere.io/devops/
Apache License 2.0
159 stars 90 forks source link

the excess builds were not deleted #393

Open liuyp2018 opened 3 years ago

liuyp2018 commented 3 years ago

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

mzmuer commented 2 years ago

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

LinuxSuRen commented 2 years ago

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

mzmuer commented 2 years ago

@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.

LinuxSuRen commented 2 years ago

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

mzmuer commented 2 years ago

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?

LinuxSuRen commented 2 years ago

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.

mzmuer commented 2 years ago

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.

LinuxSuRen commented 2 years ago

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

yudong2015 commented 2 years ago

reference issue: #847