Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate GitHub Release Draft #117

Merged

Conversation

razo7
Copy link
Member

@razo7 razo7 commented May 1, 2023

Similar to the rest of Medik8s operators we add an automation for the creation of Github Release upon Git tag creation.

ECOPROJECT-1128

  1. Add Github Action step for building the draft.
  2. Use container-build-community target for CI so quay.io/medik8s will store SNR's community version for K8s.

@openshift-ci openshift-ci bot requested review from clobrano and mshitrit May 1, 2023 13:05
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 1, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: razo7

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label May 1, 2023
@razo7 razo7 force-pushed the automate-github-release-draft branch 3 times, most recently from 2f13c5e to 487af11 Compare May 8, 2023 11:35
@razo7 razo7 changed the title Automate GitHub Release Draft [WIP] Automate GitHub Release Draft May 8, 2023
@razo7 razo7 force-pushed the automate-github-release-draft branch 3 times, most recently from 51ab666 to e604fd0 Compare May 8, 2023 14:41
@razo7
Copy link
Member Author

razo7 commented May 9, 2023

/retest

@razo7 razo7 changed the title [WIP] Automate GitHub Release Draft Automate GitHub Release Draft May 9, 2023
@razo7
Copy link
Member Author

razo7 commented May 9, 2023

/retest

1 similar comment
@razo7
Copy link
Member Author

razo7 commented May 10, 2023

/retest

@razo7 razo7 force-pushed the automate-github-release-draft branch from e604fd0 to 0dbd69f Compare May 11, 2023 05:46
@mshitrit
Copy link
Member

/lgtm

@razo7
Copy link
Member Author

razo7 commented May 11, 2023

/retest

1 similar comment
@razo7
Copy link
Member Author

razo7 commented May 11, 2023

/retest

@mshitrit
Copy link
Member

/retest

@razo7 razo7 force-pushed the automate-github-release-draft branch from cac234e to 8ce92a2 Compare May 22, 2023 11:00
@razo7 razo7 force-pushed the automate-github-release-draft branch from 30eaf7c to ba528a7 Compare May 22, 2023 11:25
@razo7 razo7 changed the title Automate GitHub Release Draft [WIP] Automate GitHub Release Draft May 22, 2023
@razo7 razo7 force-pushed the automate-github-release-draft branch from ba528a7 to a3d2c40 Compare May 22, 2023 11:47
razo7 added 2 commits May 22, 2023 15:13
Automatically create Github release when we create git tag, and it creates the draft with a nice structure and with the bundle dir (for community releases). We also create new targets for community usage
We reuglarly push the community version for K8s to quay/medik8s
@razo7 razo7 changed the title [WIP] Automate GitHub Release Draft Automate GitHub Release Draft May 22, 2023
@razo7 razo7 force-pushed the automate-github-release-draft branch from a3d2c40 to a1215e8 Compare May 22, 2023 12:16
@razo7
Copy link
Member Author

razo7 commented May 22, 2023

In this PR I also wanted to update hosted runner Ubuntu image for github-actions - ubuntu-20.04 -> ubuntu-22.04, but it introduced an error running make test in dockerized go. See for example the below error from last Github CI run with ubuntu-22.04 :

/home/go/src/github.com/medik8s/self-node-remediation-operator/bin/controller-gen/v0.12.0/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
/home/go/src/github.com/medik8s/self-node-remediation-operator/bin/controller-gen/v0.12.0/controller-gen: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.32' not found (required by /home/go/src/github.com/medik8s/self-node-remediation-operator/bin/controller-gen/v0.12.0/controller-gen) /home/go/src/github.com/medik8s/self-node-remediation-operator/bin/controller-gen/v0.12.0/controller-gen: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.34' not found (required by /home/go/src/github.com/medik8s/self-node-remediation-operator/bin/controller-gen/v0.12.0/controller-gen)
make: *** [Makefile:138: manifests] Error 1

For more context see golang/go#58550

@mshitrit
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm label May 23, 2023
@openshift-merge-robot openshift-merge-robot merged commit 2365c8b into medik8s:main May 23, 2023
@slintes
Copy link
Member

slintes commented May 23, 2023

In this PR I also wanted to update hosted runner Ubuntu image for github-actions - ubuntu-20.04 -> ubuntu-22.04, but it introduced an error running make test in dockerized go. See for example the below error from last Github CI run with ubuntu-22.04 :

/home/go/src/github.com/medik8s/self-node-remediation-operator/bin/controller-gen/v0.12.0/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
/home/go/src/github.com/medik8s/self-node-remediation-operator/bin/controller-gen/v0.12.0/controller-gen: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.32' not found (required by /home/go/src/github.com/medik8s/self-node-remediation-operator/bin/controller-gen/v0.12.0/controller-gen) /home/go/src/github.com/medik8s/self-node-remediation-operator/bin/controller-gen/v0.12.0/controller-gen: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.34' not found (required by /home/go/src/github.com/medik8s/self-node-remediation-operator/bin/controller-gen/v0.12.0/controller-gen)
make: *** [Makefile:138: manifests] Error 1

For more context see golang/go#58550

Following the discussion you linked to, this an issue with the GCC version when using dynamically linked Go builds. We do static builds though (CGO_ENABLED=0). The missing part is: adding CGO_ENABLED=0 to the go test command as well. Maybe you want to give it a try?

@razo7
Copy link
Member Author

razo7 commented May 24, 2023

In this PR I also wanted to update hosted runner Ubuntu image for github-actions - ubuntu-20.04 -> ubuntu-22.04, but it introduced an error running make test in dockerized go. See for example the below error from last Github CI run with ubuntu-22.04 :

/home/go/src/github.com/medik8s/self-node-remediation-operator/bin/controller-gen/v0.12.0/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
/home/go/src/github.com/medik8s/self-node-remediation-operator/bin/controller-gen/v0.12.0/controller-gen: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.32' not found (required by /home/go/src/github.com/medik8s/self-node-remediation-operator/bin/controller-gen/v0.12.0/controller-gen) /home/go/src/github.com/medik8s/self-node-remediation-operator/bin/controller-gen/v0.12.0/controller-gen: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.34' not found (required by /home/go/src/github.com/medik8s/self-node-remediation-operator/bin/controller-gen/v0.12.0/controller-gen)
make: *** [Makefile:138: manifests] Error 1

For more context see golang/go#58550

Following the discussion you linked to, this an issue with the GCC version when using dynamically linked Go builds. We do static builds though (CGO_ENABLED=0). The missing part is: adding CGO_ENABLED=0 to the go test command as well. Maybe you want to give it a try?

Thanks for sharing Marc.
I am not sure it will resolve the problem, since the error came from running make test in dockerized go, but not from the actual running of the unit tests.
IIUC it came from running the manifests target, since the above error include the following line /home/go/src/github.com/medik8s/self-node-remediation-operator/bin/controller-gen/v0.12.0/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases which match the call for target manifests.

I tried to add CGO_ENABLED=0 as an environment variable of the dockerized Go, but it didn't help.

@slintes
Copy link
Member

slintes commented May 24, 2023

I see. So the controller-gen binary is the problem. It's already installed (=compiled) in an earlier test step, outside of the DOCKER_GO container. Can you try adding CGO_ENABLED=0 to the go-install-tool here? 🤔
https://github.com/medik8s/self-node-remediation/blob/main/Makefile#L263

@razo7
Copy link
Member Author

razo7 commented May 24, 2023

I see. So the controller-gen binary is the problem. It's already installed (=compiled) in an earlier test step, outside of the DOCKER_GO container. Can you try adding CGO_ENABLED=0 to the go-install-tool here? thinking https://github.com/medik8s/self-node-remediation/blob/main/Makefile#L263

Sounds like a good idea, I will open a new PR for that 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants