konstructio / kubefirst

The Kubefirst Open Source Platform
https://kubefirst.konstruct.io/docs
MIT License
1.78k stars 139 forks source link

Cannot install to a GitHub org that enforces commit signoff #2201

Open mrsimonemms opened 4 months ago

mrsimonemms commented 4 months ago

Which version of kubefirst are you using?

2.4.10

Which cloud provider?

Civo, k3d (local)

Which DNS?

Cloud ones (default)

Which installation type?

CLI, Marketplace

Which distributed Git provider?

GitHub

Did you use a fork of gitops-template?

No

Which Operating System?

Linux

What is the issue?

My organisation enforces commit signoff, which is set in https://github.com/organizations//settings/repository-defaults.

When installing Kubefirst to this org, this errors with the message "Error: error creating github resources with terraform /root/.k1/kubefirst/gitops/terraform/github: exit status 1". Digging through the logs, this returns the error:

2024-06-17 12:21:27 debug ERR: [31m│[0m [0m[1;37m[31mError: [0m[0m[1;37mPATCH https://api.github.com/repos/open-cloud-dev/gitops: 422 Commit signoff is enforced by the organization and cannot be disabled [][0m

image

When I disable this option in the org, it installs fine.

This could be fixed in two ways:

  1. the simple fix would be to run a check to ensure that it is NOT set (perhaps in the validation stage where token scopes are checked)
  2. the more complex fix would be to make the application actually signoff the commits

Code of Conduct

fharper commented 3 months ago

I'm advocating for #2 since a while (see https://github.com/kubefirst/kubefirst/issues/1680), but would settle for #1 as a first step :)

mrsimonemms commented 3 months ago

@fharper this feels like a duplicate of #1680 (or the same problem viewed from a different angle). Shall we close as dupe?

fharper commented 3 months ago

They can still be separate as this one is the issue that happens, the other one a feature (even if I filled it as a bug, my mistake). This one could be fix with the workaround you provided as solution #1, so my feature request would still be valid.

I think we can close mine since yours is better explained, but I'm just afraid we do the quick fix, and we lost track of the fact that we should definitely sign the commits as a proper fix in the future.

I really don't answer your question 😅