Skip to content

🌱 Remove kaniko / extension-developer-e2e cleanup #2116

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

Merged
merged 1 commit into from
Jul 24, 2025

Conversation

dtfranz
Copy link
Contributor

@dtfranz dtfranz commented Jul 24, 2025

Removes use of kaniko, which is now an archived project, in favor of using tools we already have at our disposal. Also attempted to clean up the Makefile and setup script a bit, as well as a fail-early check in the test to make it clearer that some env is required.

The combination of env + args for this test is still not great but hopefully it's at least a bit easier to understand.

Description

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

@dtfranz dtfranz requested a review from a team as a code owner July 24, 2025 07:42
Copy link

netlify bot commented Jul 24, 2025

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 91d6fe3
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/68820430f983230009ad80f2
😎 Deploy Preview https://deploy-preview-2116--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@openshift-ci openshift-ci bot requested review from bentito and tmshort July 24, 2025 07:42
export E2E_TEST_CATALOG_V1 := e2e/test-catalog:v1
export E2E_TEST_CATALOG_V2 := e2e/test-catalog:v2
export CATALOG_IMG := $(LOCAL_REGISTRY_HOST)/$(E2E_TEST_CATALOG_V1)
export CLUSTER_REGISTRY_HOST := $(E2E_REGISTRY_NAME).$(E2E_REGISTRY_NAMESPACE).svc:5000
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The naming of CLUSTER vs LOCAL for registry host was backwards IMO, so I switched it around.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original naming was cluster-centric... I do wonder if there are better names... e.g.
INSIDE_CLUSTER ?
OUTSIDE_CLUSTER ?

@@ -32,6 +32,9 @@ func TestExtensionDeveloper(t *testing.T) {
require.NoError(t, corev1.AddToScheme(scheme))
require.NoError(t, rbacv1.AddToScheme(scheme))

require.NotEmpty(t, os.Getenv("CATALOG_IMG"), "environment variable CATALOG_IMG must be set")
Copy link
Contributor Author

@dtfranz dtfranz Jul 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These fields are required to be set for the test, and if not it will fail in an unclear way.

@dtfranz dtfranz force-pushed the remove-kaniko branch 2 times, most recently from 601fb2c to 5657f3d Compare July 24, 2025 08:38
Copy link

codecov bot commented Jul 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.65%. Comparing base (8cf5bda) to head (91d6fe3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2116      +/-   ##
==========================================
+ Coverage   72.61%   73.65%   +1.03%     
==========================================
  Files          78       78              
  Lines        7260     7260              
==========================================
+ Hits         5272     5347      +75     
+ Misses       1633     1564      -69     
+ Partials      355      349       -6     
Flag Coverage Δ
e2e 43.59% <ø> (+0.04%) ⬆️
experimental-e2e 56.17% <ø> (?)
unit 58.88% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dtfranz dtfranz force-pushed the remove-kaniko branch 3 times, most recently from 96f8952 to 843a8f1 Compare July 24, 2025 09:36
@dtfranz
Copy link
Contributor Author

dtfranz commented Jul 24, 2025

Having issues with podman vs docker environments 😑
/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 24, 2025
Removes use of kaniko, which is now an archived project, in favor of using tools we already have at our disposal. Also attempted to clean up the Makefile and setup script a bit, as well as a fail-early check in the test to make it clearer that some env is required.

Signed-off-by: Daniel Franz <dfranz@redhat.com>
@dtfranz
Copy link
Contributor Author

dtfranz commented Jul 24, 2025

Should be fixed now
/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 24, 2025
Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 🚀
I loved it when we were able to delete dependencies with third parties!!!!
Just a nit and a question. Otherwise, I am OK with.

I think @tmshort should give a look as well since I think he has been working relate to it.

.PHONY: test-ext-dev-e2e
test-ext-dev-e2e: $(OPERATOR_SDK) $(KUSTOMIZE) $(KIND) #HELP Run extension create, upgrade and delete tests.
test/extension-developer-e2e/setup.sh $(OPERATOR_SDK) $(CONTAINER_RUNTIME) $(KUSTOMIZE) $(KIND) $(KIND_CLUSTER_NAME) $(E2E_REGISTRY_NAMESPACE)
test-ext-dev-e2e: $(OPERATOR_SDK) $(KUSTOMIZE) #HELP Run extension create, upgrade and delete tests.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we not keep the $(KIND) here: test-ext-dev-e2e: $(OPERATOR_SDK) $(KUSTOMIZE)
We removed it from the shell test/extension-developer-e2e/setup.sh but I understand that the above will ensure that we have it installed.

Copy link
Contributor Author

@dtfranz dtfranz Jul 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we should limit dependency declaration like that to targets that actually use the dependency. In my mind this would be a little bit like adding $(KIND) to the e2e target; it's not necessary because e2e can't be run without the prerequisites from test-e2e already being called, and if they weren't then having $(KIND) declared as a dependency for it wouldn't help at all.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sense 👍


kubectl wait --for=condition=Complete -n "${namespace}" jobs/kaniko-${reg_pkg_name} --timeout=60s
${container_tool} build -f "${TMP_ROOT}/catalog.Dockerfile" -t "${catalog_push_tag}" "${TMP_ROOT}/"
${container_tool} push ${catalog_push_tag} ${tls_flag}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to ensure that I understand it, do we need to push the catalog image for a registry build locally, because in OCP we cannot do a kind load image, am I right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a registry vs kind load is theoretically faster since kind load will transfer all image layers each time it's run, while the registry can reuse them. It's still an option, but I think the registry is probably more feature-rich.

@camilamacedo86
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 24, 2025
@tmshort
Copy link
Contributor

tmshort commented Jul 24, 2025

Looks reasonable
/approve

Copy link

openshift-ci bot commented Jul 24, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tmshort

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 Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 24, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 5dfcc76 into operator-framework:main Jul 24, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants