Make bitbucket server/data center git commit status functionality more robust
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
SUCCESSFULorFAILEDbased on event severity typesinfoorerrorrespectively. For someinfoevents, the bitbucket server build status is incorrectly being set asSUCCESSFUL. For example:- an info event with event reason
DependencyNotReadyshould ideally be set asUNKNOWN - an info event with event reason
Progressing(for ex: Health checks still haven't passed),should ideally be set asINPROGRESSThis PR adds these functionalities.
- an info event with event reason
-
Context: Currently, the code supports only 2 bitbucket server build status states
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
@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.
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 onfluxcd/pkgandkustomize-controllerdescribing the proposal of movings constants tofluxcd/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.
@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.