notification-controller icon indicating copy to clipboard operation
notification-controller copied to clipboard

Make bitbucket server/data center git commit status functionality more robust

Open gdasson opened this issue 2 years ago • 3 comments

This is an extension to this initial PR

This PR offers the below:

  • Fixes this bug
  • Adds more bitbucket server states:
    • Context: Currently, the code supports only 2 bitbucket server build status states SUCCESSFUL or FAILED based on event severity types info or error respectively. For some info events, the bitbucket server build status is incorrectly being set as SUCCESSFUL. For example:
      • an info event with event reason DependencyNotReady should ideally be set as UNKNOWN
      • an info event with event reason Progressing (for ex: Health checks still haven't passed),should ideally be set as INPROGRESS This PR adds these functionalities.

Reference: This REST API document shows the different Bitbucket server build status states available for use.

Screenshot to show the different states on Bitbucket Server UI Screenshot 2023-12-29 at 10 38 16 PM

gdasson avatar Dec 30 '23 04:12 gdasson

@stefanprodan thanks for the review and feedback. What is the process to add constants to fluxcd/pkg? Should I initiate a proposal conversation on flux-contributors slack channel? Or just submit a PR on fluxcd/pkg and kustomize-controller describing the proposal of movings constants to fluxcd/pkg? Please let me know. Thx.

gdasson avatar Dec 31 '23 17:12 gdasson

What is the process to add constants to fluxcd/pkg? Should I initiate a proposal conversation on flux-contributors slack channel? Or just submit a PR on fluxcd/pkg and kustomize-controller describing the proposal of movings constants to fluxcd/pkg? Please let me know. Thx.

@gdasson It should be fine to just open a PR adding the necessary reasons in https://github.com/fluxcd/pkg/blob/b60db8e44ea93b1a27a05b5083d77d9c56123e9f/apis/meta/conditions.go#L123 along with the other reasons. And then another PR in kustomize-controller using these new constants from pkg repo. We haven't had any formal process for adding such common constant values.

darkowlzz avatar Jan 08 '24 14:01 darkowlzz

@gdasson can you please open a separate PR to fix the bug so we can include it in the next patch release? The handling of status conditions can't go into a patch release and these should cover all Git providers not only BitBucket.

stefanprodan avatar Jan 22 '24 15:01 stefanprodan