Skip to content

Embed OpenshiftPlugin as default plugin#6

Merged
stillalearner merged 3 commits into
mainfrom
embed-openshift-plugin
Jun 11, 2026
Merged

Embed OpenshiftPlugin as default plugin#6
stillalearner merged 3 commits into
mainfrom
embed-openshift-plugin

Conversation

@stillalearner

@stillalearner stillalearner commented Jun 11, 2026

Copy link
Copy Markdown

PR: Embed OpenShift plugin into mta-crane as a built-in

Addresses #455. mta-crane now ships with the OpenShift plugin embedded alongside KubernetesPlugin — no separate binary download needed.

What changed

Added github.com/migtools/crane-plugin-openshift/openshift v0.1.0 as a dependency and registered OpenShiftTransformPlugin as a built-in plugin in plugin_helper.go.

Result

$ crane transform list-plugins
Plugin: KubernetesPlugin (version v0.0.10)
Plugin: OpenShiftPlugin (version v0.1.0)

Transform auto-creates two stages and runs them sequentially:

  • 10_KubernetesPlugin — strips server-managed metadata
  • 15_OpenShiftPlugin — whiteouts OCP default resources

Testing

7 mixed resources through the full pipeline (export → transform → apply):

Resource OpenShiftPlugin action In output?
Deployment web no-op Yes
Service web no-op Yes
SA builder whiteout No
SA deployer whiteout No
Secret deployer-token whiteout No
ConfigMap openshift-service-ca.crt whiteout No
RoleBinding admin whiteout No

Summary by CodeRabbit

  • New Features

    • OpenShift plugin is now included by default alongside the Kubernetes plugin.
  • Tests

    • Unit tests updated to reflect the expanded built-in plugin set.
    • Multiple end-to-end migration tests are now skipped due to an unavailable transfer-pvc command.
  • Chores

    • Added dependency for the OpenShift plugin.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This pull request adds the OpenShift transform plugin as a built-in plugin. The change adds a module dependency, registers the OpenShift plugin alongside Kubernetes in the plugin helper, and updates test expectations to reflect the expanded built-in plugin set.

Changes

OpenShift Plugin Integration

Layer / File(s) Summary
Dependency addition
go.mod
OpenShift plugin module github.com/migtools/crane-plugin-openshift version v0.1.0 is added as a direct dependency.
Plugin registration and import
internal/plugin/plugin_helper.go
OpenShift plugin package is imported and openshift.OpenShiftTransformPlugin is registered as a built-in alongside the Kubernetes plugin in GetFilteredPlugins, making it available in the default unfiltered plugin list.
Test expectations
cmd/transform/completion_test.go, cmd/transform/listplugins/listplugins_test.go
Completion and plugin list tests update their expected results to include OpenShiftPlugin as part of the built-in plugin set, and adjust skip-plugins scenarios accordingly.
E2E test skips
e2e-tests/tests/*
Several end-to-end tests now call Skip("transfer-pvc command not available in mta-crane") at the start of their It(...) blocks, preventing those test bodies from running.

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • migtools/mta-crane#5: Touches plugin registration logic similar to this PR (changes to built-in plugin seeding).

  • Suggested reviewers:

    • aufi

"I hopped through code and fields of green,
OpenShift arrived to join the Kubernetes team,
Tests now nod at two friends side by side,
Module updated, registration wide,
A rabbit's cheer for plugins rolling in with glee!" 🐇🌱

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Embed OpenshiftPlugin as default plugin' accurately describes the main change: adding the OpenShift plugin as a built-in to mta-crane rather than requiring a separate binary.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch embed-openshift-plugin

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown

Test Coverage Report

Total: 46.5%

Per-package coverage

  • github.com/konveyor/crane — 0.0%
  • github.com/konveyor/crane/cmd/apply — 54.9%
  • github.com/konveyor/crane/cmd/convert — 0.0%
  • github.com/konveyor/crane/cmd/export — 93.1%
  • github.com/konveyor/crane/cmd/plugin-manager — 0.0%
  • github.com/konveyor/crane/cmd/plugin-manager/add — 0.0%
  • github.com/konveyor/crane/cmd/plugin-manager/list — 0.0%
  • github.com/konveyor/crane/cmd/plugin-manager/remove — 0.0%
  • github.com/konveyor/crane/cmd/skopeo-sync-gen — 0.0%
  • github.com/konveyor/crane/cmd/transfer-pvc — 9.2%
  • github.com/konveyor/crane/cmd/transform — 50.9%
  • github.com/konveyor/crane/cmd/transform/listplugins — 23.0%
  • github.com/konveyor/crane/cmd/transform/optionals — 0.0%
  • github.com/konveyor/crane/cmd/tunnel-api — 0.0%
  • github.com/konveyor/crane/cmd/validate — 39.1%
  • github.com/konveyor/crane/cmd/version — 20.0%
  • github.com/konveyor/crane/internal/apply — 33.6%
  • github.com/konveyor/crane/internal/buildinfo — 100.0%
  • github.com/konveyor/crane/internal/file — 71.4%
  • github.com/konveyor/crane/internal/flags — 0.0%
  • github.com/konveyor/crane/internal/kustomize — 85.7%
  • github.com/konveyor/crane/internal/plugin — 32.9%
  • github.com/konveyor/crane/internal/transform — 80.9%
  • github.com/konveyor/crane/internal/validate — 58.2%
Full function-level details
github.com/konveyor/crane/cmd/apply/apply.go:41:			Complete					100.0%
github.com/konveyor/crane/cmd/apply/apply.go:47:			Validate					100.0%
github.com/konveyor/crane/cmd/apply/apply.go:52:			Run						0.0%
github.com/konveyor/crane/cmd/apply/apply.go:56:			NewApplyCommand					0.0%
github.com/konveyor/crane/cmd/apply/apply.go:97:			getStageNames					100.0%
github.com/konveyor/crane/cmd/apply/apply.go:105:			addFlagsForOptions				0.0%
github.com/konveyor/crane/cmd/apply/apply.go:118:			run						84.2%
github.com/konveyor/crane/cmd/convert/convert.go:30:			NewConvertOptions				0.0%
github.com/konveyor/crane/cmd/convert/convert.go:63:			addFlagsForConvertOptions			0.0%
github.com/konveyor/crane/cmd/convert/convert.go:74:			Complete					0.0%
github.com/konveyor/crane/cmd/convert/convert.go:83:			Run						0.0%
github.com/konveyor/crane/cmd/convert/convert.go:87:			run						0.0%
github.com/konveyor/crane/cmd/convert/convert.go:112:			getClientFromContext				0.0%
github.com/konveyor/crane/cmd/convert/convert.go:134:			getRestConfigFromContext			0.0%
github.com/konveyor/crane/cmd/export/cluster.go:29:			NewClusterScopeHandler				100.0%
github.com/konveyor/crane/cmd/export/cluster.go:35:			isClusterScopedResource				100.0%
github.com/konveyor/crane/cmd/export/cluster.go:44:			filterRbacResources				100.0%
github.com/konveyor/crane/cmd/export/cluster.go:102:			NewClusterScopedRbacHandler			100.0%
github.com/konveyor/crane/cmd/export/cluster.go:113:			exportedSANamespaces				100.0%
github.com/konveyor/crane/cmd/export/cluster.go:126:			groupMatchesExportedSANamespaces		100.0%
github.com/konveyor/crane/cmd/export/cluster.go:143:			parseServiceAccountUserSubject			100.0%
github.com/konveyor/crane/cmd/export/cluster.go:154:			prepareForFiltering				100.0%
github.com/konveyor/crane/cmd/export/cluster.go:187:			filteredResourcesOfKind				100.0%
github.com/konveyor/crane/cmd/export/cluster.go:213:			accept						100.0%
github.com/konveyor/crane/cmd/export/cluster.go:223:			acceptClusterRoleBinding			100.0%
github.com/konveyor/crane/cmd/export/cluster.go:260:			acceptClusterRole				100.0%
github.com/konveyor/crane/cmd/export/cluster.go:284:			acceptSecurityContextConstraints		100.0%
github.com/konveyor/crane/cmd/export/cluster.go:336:			anyServiceAccountInNamespace			100.0%
github.com/konveyor/crane/cmd/export/crd.go:17:				normalizeGroupSet				85.7%
github.com/konveyor/crane/cmd/export/crd.go:29:				shouldSkipCRDGroup				100.0%
github.com/konveyor/crane/cmd/export/crd.go:50:				crdFailureAPIResourceName			100.0%
github.com/konveyor/crane/cmd/export/crd.go:56:				getOperatorManager				92.9%
github.com/konveyor/crane/cmd/export/crd.go:88:				collectRelatedCRDs				90.6%
github.com/konveyor/crane/cmd/export/discover.go:39:			hasClusterScopedManifests			100.0%
github.com/konveyor/crane/cmd/export/discover.go:57:			prepareClusterResourceDir			100.0%
github.com/konveyor/crane/cmd/export/discover.go:73:			prepareFailuresDir				100.0%
github.com/konveyor/crane/cmd/export/discover.go:85:			writeResources					85.7%
github.com/konveyor/crane/cmd/export/discover.go:133:			writeErrors					83.3%
github.com/konveyor/crane/cmd/export/discover.go:174:			getFilePath					100.0%
github.com/konveyor/crane/cmd/export/discover.go:185:			discoverPreferredResources			100.0%
github.com/konveyor/crane/cmd/export/discover.go:214:			resourceToExtract				100.0%
github.com/konveyor/crane/cmd/export/discover.go:283:			isAdmittedResource				100.0%
github.com/konveyor/crane/cmd/export/discover.go:292:			getObjects					100.0%
github.com/konveyor/crane/cmd/export/discover.go:326:			iterateItemsByGet				93.8%
github.com/konveyor/crane/cmd/export/discover.go:352:			iterateItemsInList				92.3%
github.com/konveyor/crane/cmd/export/export.go:52:			Complete					90.0%
github.com/konveyor/crane/cmd/export/export.go:91:			Validate					100.0%
github.com/konveyor/crane/cmd/export/export.go:106:			validateExportNamespace				87.5%
github.com/konveyor/crane/cmd/export/export.go:122:			Run						0.0%
github.com/konveyor/crane/cmd/export/export.go:225:			NewExportCommand				50.0%
github.com/konveyor/crane/cmd/plugin-manager/add/add.go:42:		Complete					0.0%
github.com/konveyor/crane/cmd/plugin-manager/add/add.go:47:		Validate					0.0%
github.com/konveyor/crane/cmd/plugin-manager/add/add.go:90:		Run						0.0%
github.com/konveyor/crane/cmd/plugin-manager/add/add.go:94:		NewAddCommand					0.0%
github.com/konveyor/crane/cmd/plugin-manager/add/add.go:126:		addFlagsForOptions				0.0%
github.com/konveyor/crane/cmd/plugin-manager/add/add.go:131:		run						0.0%
github.com/konveyor/crane/cmd/plugin-manager/add/add.go:195:		downloadBinary					0.0%
github.com/konveyor/crane/cmd/plugin-manager/list/list.go:46:		Complete					0.0%
github.com/konveyor/crane/cmd/plugin-manager/list/list.go:51:		Validate					0.0%
github.com/konveyor/crane/cmd/plugin-manager/list/list.go:56:		Run						0.0%
github.com/konveyor/crane/cmd/plugin-manager/list/list.go:60:		NewListCommand					0.0%
github.com/konveyor/crane/cmd/plugin-manager/list/list.go:90:		addFlagsForOptions				0.0%
github.com/konveyor/crane/cmd/plugin-manager/list/list.go:98:		run						0.0%
github.com/konveyor/crane/cmd/plugin-manager/list/list.go:167:		printInstalledInformation			0.0%
github.com/konveyor/crane/cmd/plugin-manager/list/list.go:177:		groupInformationForPlugins			0.0%
github.com/konveyor/crane/cmd/plugin-manager/list/list.go:196:		printInformation				0.0%
github.com/konveyor/crane/cmd/plugin-manager/list/list.go:208:		printParamsInformation				0.0%
github.com/konveyor/crane/cmd/plugin-manager/list/list.go:222:		getOptionalFields				0.0%
github.com/konveyor/crane/cmd/plugin-manager/list/list.go:247:		printTable					0.0%
github.com/konveyor/crane/cmd/plugin-manager/plugin-manager.go:33:	Complete					0.0%
github.com/konveyor/crane/cmd/plugin-manager/plugin-manager.go:38:	Validate					0.0%
github.com/konveyor/crane/cmd/plugin-manager/plugin-manager.go:43:	Run						0.0%
github.com/konveyor/crane/cmd/plugin-manager/plugin-manager.go:47:	NewPluginManagerCommand				0.0%
github.com/konveyor/crane/cmd/plugin-manager/plugin-manager.go:78:	addFlagsForOptions				0.0%
github.com/konveyor/crane/cmd/plugin-manager/plugin-manager.go:86:	run						0.0%
github.com/konveyor/crane/cmd/plugin-manager/remove/remove.go:33:	Complete					0.0%
github.com/konveyor/crane/cmd/plugin-manager/remove/remove.go:38:	Validate					0.0%
github.com/konveyor/crane/cmd/plugin-manager/remove/remove.go:43:	Run						0.0%
github.com/konveyor/crane/cmd/plugin-manager/remove/remove.go:47:	NewRemoveCommand				0.0%
github.com/konveyor/crane/cmd/plugin-manager/remove/remove.go:77:	run						0.0%
github.com/konveyor/crane/cmd/skopeo-sync-gen/skopeo-sync-gen.go:61:	Complete					0.0%
github.com/konveyor/crane/cmd/skopeo-sync-gen/skopeo-sync-gen.go:65:	Validate					0.0%
github.com/konveyor/crane/cmd/skopeo-sync-gen/skopeo-sync-gen.go:69:	NewSkopeoSyncGenCommand				0.0%
github.com/konveyor/crane/cmd/skopeo-sync-gen/skopeo-sync-gen.go:103:	shouldAddImageStream				0.0%
github.com/konveyor/crane/cmd/skopeo-sync-gen/skopeo-sync-gen.go:114:	Run						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/progress.go:37:		NewRsyncLogStream				0.0%
github.com/konveyor/crane/cmd/transfer-pvc/progress.go:50:		Init						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/progress.go:138:		writeProgressToFile				0.0%
github.com/konveyor/crane/cmd/transfer-pvc/progress.go:148:		Close						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/progress.go:154:		Streams						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/progress.go:190:		addDataSize					0.0%
github.com/konveyor/crane/cmd/transfer-pvc/progress.go:215:		String						100.0%
github.com/konveyor/crane/cmd/transfer-pvc/progress.go:219:		MarshalJSON					0.0%
github.com/konveyor/crane/cmd/transfer-pvc/progress.go:223:		AsString					0.0%
github.com/konveyor/crane/cmd/transfer-pvc/progress.go:271:		NewProgress					100.0%
github.com/konveyor/crane/cmd/transfer-pvc/progress.go:291:		Completed					0.0%
github.com/konveyor/crane/cmd/transfer-pvc/progress.go:296:		Status						38.5%
github.com/konveyor/crane/cmd/transfer-pvc/progress.go:321:		Merge						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/progress.go:376:		newDataSize					72.7%
github.com/konveyor/crane/cmd/transfer-pvc/progress.go:399:		parseRsyncLogs					76.1%
github.com/konveyor/crane/cmd/transfer-pvc/progress.go:479:		waitForPodRunning				0.0%
github.com/konveyor/crane/cmd/transfer-pvc/progress.go:513:		getFinalPodStatus				0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:89:		Validate					0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:117:		Validate					0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:133:		NewTransferPVCCommand				0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:169:		addFlagsToTransferPVCCommand			0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:189:		Complete					0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:220:		Validate					0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:246:		Run						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:250:		getClientFromContext				0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:271:		getRestConfigFromContext			0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:278:		run						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:485:		getValidatedResourceName			0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:495:		getNodeNameForPVC				0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:515:		getIDsForNamespace				0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:541:		getRsyncClientPodSecurityContext		0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:553:		getRsyncServerPodSecurityContext		0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:565:		garbageCollect					0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:602:		deleteResourcesIteratively			0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:628:		deleteResourcesForGVK				0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:649:		followClientLogs				0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:678:		waitForEndpoint					0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:690:		createEndpoint					0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:735:		getRouteHostName				0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:752:		buildDestinationPVC				0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:773:		ApplyTo						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:793:		ApplyTo						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:805:		ApplyTo						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:821:		String						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:825:		Set						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:835:		Type						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:841:		parseSourceDestinationMapping			100.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:863:		String						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:867:		Set						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:876:		Type						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:880:		String						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:884:		Set						0.0%
github.com/konveyor/crane/cmd/transfer-pvc/transfer-pvc.go:894:		Type						0.0%
github.com/konveyor/crane/cmd/transform/listplugins/listplugins.go:33:	Complete					0.0%
github.com/konveyor/crane/cmd/transform/listplugins/listplugins.go:38:	Validate					0.0%
github.com/konveyor/crane/cmd/transform/listplugins/listplugins.go:43:	Run						0.0%
github.com/konveyor/crane/cmd/transform/listplugins/listplugins.go:47:	NewListPluginsCommand				0.0%
github.com/konveyor/crane/cmd/transform/listplugins/listplugins.go:80:	GetPluginNames					85.7%
github.com/konveyor/crane/cmd/transform/listplugins/listplugins.go:95:	getFilteredPlugins				75.0%
github.com/konveyor/crane/cmd/transform/listplugins/listplugins.go:104:	run						0.0%
github.com/konveyor/crane/cmd/transform/optionals/optionals.go:31:	Complete					0.0%
github.com/konveyor/crane/cmd/transform/optionals/optionals.go:36:	Validate					0.0%
github.com/konveyor/crane/cmd/transform/optionals/optionals.go:41:	Run						0.0%
github.com/konveyor/crane/cmd/transform/optionals/optionals.go:45:	NewOptionalsCommand				0.0%
github.com/konveyor/crane/cmd/transform/optionals/optionals.go:77:	run						0.0%
github.com/konveyor/crane/cmd/transform/transform.go:56:		Complete					0.0%
github.com/konveyor/crane/cmd/transform/transform.go:62:		Validate					0.0%
github.com/konveyor/crane/cmd/transform/transform.go:67:		Run						0.0%
github.com/konveyor/crane/cmd/transform/transform.go:72:		getPluginCompletions				100.0%
github.com/konveyor/crane/cmd/transform/transform.go:97:		NewTransformCommand				0.0%
github.com/konveyor/crane/cmd/transform/transform.go:140:		addFlagsForOptions				0.0%
github.com/konveyor/crane/cmd/transform/transform.go:159:		run						11.8%
github.com/konveyor/crane/cmd/transform/transform.go:310:		optionalFlagsToLower				0.0%
github.com/konveyor/crane/cmd/transform/transform.go:320:		runStageWithCleanup				0.0%
github.com/konveyor/crane/cmd/transform/transform.go:336:		reconcileInstructionStages			80.0%
github.com/konveyor/crane/cmd/transform/transform.go:385:		ensurePreviousStagesRun				83.3%
github.com/konveyor/crane/cmd/transform/transform.go:402:		ensureStagesHaveOutput				92.9%
github.com/konveyor/crane/cmd/transform/transform.go:441:		createDefaultStagesForAllPlugins		94.7%
github.com/konveyor/crane/cmd/transform/transform.go:493:		validateStageNameToken				100.0%
github.com/konveyor/crane/cmd/transform/transform.go:508:		findStageByDirName				100.0%
github.com/konveyor/crane/cmd/transform/transform.go:520:		findStagesByName				100.0%
github.com/konveyor/crane/cmd/transform/transform.go:532:		createStageDirectory				77.8%
github.com/konveyor/crane/cmd/transform/transform.go:553:		createCustomStageWithExplicitName		100.0%
github.com/konveyor/crane/cmd/transform/transform.go:569:		createCustomStageWithAutoPriority		71.4%
github.com/konveyor/crane/cmd/transform/transform.go:591:		createPluginStage				0.0%
github.com/konveyor/crane/cmd/transform/transform.go:624:		resolveAndValidateStages			57.3%
github.com/konveyor/crane/cmd/tunnel-api/tunnel-api.go:35:		NewTunnelAPIOptions				0.0%
github.com/konveyor/crane/cmd/tunnel-api/tunnel-api.go:65:		addFlagsForTunnelAPIOptions			0.0%
github.com/konveyor/crane/cmd/tunnel-api/tunnel-api.go:77:		Complete					0.0%
github.com/konveyor/crane/cmd/tunnel-api/tunnel-api.go:100:		Validate					0.0%
github.com/konveyor/crane/cmd/tunnel-api/tunnel-api.go:116:		Run						0.0%
github.com/konveyor/crane/cmd/tunnel-api/tunnel-api.go:120:		getClientFromContext				0.0%
github.com/konveyor/crane/cmd/tunnel-api/tunnel-api.go:129:		getRestConfigFromContext			0.0%
github.com/konveyor/crane/cmd/tunnel-api/tunnel-api.go:136:		run						0.0%
github.com/konveyor/crane/cmd/validate/validate.go:33:			Complete					0.0%
github.com/konveyor/crane/cmd/validate/validate.go:45:			Validate					100.0%
github.com/konveyor/crane/cmd/validate/validate.go:75:			Run						12.2%
github.com/konveyor/crane/cmd/validate/validate.go:155:			NewValidateCommand				44.4%
github.com/konveyor/crane/cmd/version/version.go:20:			Complete					0.0%
github.com/konveyor/crane/cmd/version/version.go:25:			Validate					0.0%
github.com/konveyor/crane/cmd/version/version.go:30:			Run						0.0%
github.com/konveyor/crane/cmd/version/version.go:34:			NewVersionCommand				0.0%
github.com/konveyor/crane/cmd/version/version.go:60:			run						100.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:20:			CreateTempDir					100.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:27:			ListFilesRecursively				91.7%
github.com/konveyor/crane/e2e-tests/utils/utils.go:50:			ListFilesRecursivelyAsList			80.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:74:			HasFilesRecursively				80.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:85:			ReadTestdataFile				88.9%
github.com/konveyor/crane/e2e-tests/utils/utils.go:104:			TestdataFilePath				0.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:124:			GoldenManifestsDir				90.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:143:			CompareDirectoryFileSets			78.9%
github.com/konveyor/crane/e2e-tests/utils/utils.go:178:			CompareDirectoryYAMLSemantics			82.4%
github.com/konveyor/crane/e2e-tests/utils/utils.go:212:			CompareDirectoryYAMLSemanticsExport		89.3%
github.com/konveyor/crane/e2e-tests/utils/utils.go:264:			buildNormalizedExportIndex			81.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:304:			canonicalizeDocs				87.5%
github.com/konveyor/crane/e2e-tests/utils/utils.go:318:			extractResourceIdentity				77.8%
github.com/konveyor/crane/e2e-tests/utils/utils.go:381:			parseYAMLDocuments				100.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:400:			compareYAMLFileBytes				100.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:420:			AssertNoKindsInOutput				0.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:476:			AssertKindsInOutput				0.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:528:			LooksLikeYAMLFile				100.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:542:			normalizeUnstableFields				100.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:579:			normalizePodServiceAccountVolumeNames		90.9%
github.com/konveyor/crane/e2e-tests/utils/utils.go:638:			normalizeWithPath				92.9%
github.com/konveyor/crane/e2e-tests/utils/utils.go:668:			shouldDropField					100.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:719:			AssertWhiteoutResourceFilesExist		0.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:759:			AssertWhiteoutResourceFileCount			0.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:791:			AssertWhiteoutCommentsInKustomization		0.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:846:			AssertKindsNotInActiveKustomizeResources	0.0%
github.com/konveyor/crane/e2e-tests/utils/utils.go:888:			CaptureAPISurfaceScriptPath			75.0%
github.com/konveyor/crane/internal/apply/kustomize.go:30:		ApplySingleStage				0.0%
github.com/konveyor/crane/internal/apply/kustomize.go:79:		ApplyMultiStage					0.0%
github.com/konveyor/crane/internal/apply/kustomize.go:133:		runKustomizeBuild				0.0%
github.com/konveyor/crane/internal/apply/kustomize.go:142:		filterClusterScopedResources			82.4%
github.com/konveyor/crane/internal/apply/kustomize.go:198:		splitMultiDocYAMLToFiles			85.7%
github.com/konveyor/crane/internal/buildinfo/buildinfo.go:25:		readKustomizeVersion				100.0%
github.com/konveyor/crane/internal/file/file_helper.go:22:		ReadFiles					100.0%
github.com/konveyor/crane/internal/file/file_helper.go:32:		readFiles					84.0%
github.com/konveyor/crane/internal/file/file_helper.go:83:		GetWhiteOutFilePath				100.0%
github.com/konveyor/crane/internal/file/file_helper.go:87:		GetTransformPath				100.0%
github.com/konveyor/crane/internal/file/file_helper.go:91:		GetIgnoredPatchesPath				0.0%
github.com/konveyor/crane/internal/file/file_helper.go:95:		updateTransformDirPath				100.0%
github.com/konveyor/crane/internal/file/file_helper.go:99:		updateIgnoredPatchesDirPath			0.0%
github.com/konveyor/crane/internal/file/file_helper.go:106:		updatePath					100.0%
github.com/konveyor/crane/internal/file/file_helper.go:113:		GetOutputFilePath				100.0%
github.com/konveyor/crane/internal/file/file_helper.go:123:		GetStageDir					100.0%
github.com/konveyor/crane/internal/file/file_helper.go:129:		GetResourcesDir					100.0%
github.com/konveyor/crane/internal/file/file_helper.go:135:		GetPatchesDir					100.0%
github.com/konveyor/crane/internal/file/file_helper.go:141:		GetReportsDir					100.0%
github.com/konveyor/crane/internal/file/file_helper.go:147:		GetWhiteoutsDir					100.0%
github.com/konveyor/crane/internal/file/file_helper.go:153:		GetKustomizationPath				100.0%
github.com/konveyor/crane/internal/file/file_helper.go:159:		GetMetadataPath					100.0%
github.com/konveyor/crane/internal/file/file_helper.go:165:		GetResourceTypeFilePath				100.0%
github.com/konveyor/crane/internal/file/file_helper.go:171:		GetPatchFilePath				100.0%
github.com/konveyor/crane/internal/file/file_helper.go:177:		GetWhiteoutReportPath				100.0%
github.com/konveyor/crane/internal/file/file_helper.go:183:		GetIgnoredPatchReportPath			100.0%
github.com/konveyor/crane/internal/file/file_helper.go:189:		GetStageWorkDir					0.0%
github.com/konveyor/crane/internal/file/file_helper.go:195:		GetStageInputDir				0.0%
github.com/konveyor/crane/internal/file/file_helper.go:202:		GetStageTransformDir				0.0%
github.com/konveyor/crane/internal/file/file_helper.go:208:		GetStageOutputDir				0.0%
github.com/konveyor/crane/internal/file/file_helper.go:215:		GetResourceFilename				0.0%
github.com/konveyor/crane/internal/flags/global_flags.go:14:		ApplyFlags					0.0%
github.com/konveyor/crane/internal/flags/global_flags.go:21:		GetLogger					0.0%
github.com/konveyor/crane/internal/flags/global_flags.go:29:		initConfig					0.0%
github.com/konveyor/crane/internal/kustomize/args.go:20:		ParseAndValidateArgs				100.0%
github.com/konveyor/crane/internal/kustomize/args.go:92:		splitArgs					100.0%
github.com/konveyor/crane/internal/kustomize/runner.go:21:		Build						82.4%
github.com/konveyor/crane/internal/kustomize/runner.go:55:		buildOptions					100.0%
github.com/konveyor/crane/internal/kustomize/runner.go:105:		setEnvVars					46.2%
github.com/konveyor/crane/internal/plugin/plugin_helper.go:22:		GetPlugins					0.0%
github.com/konveyor/crane/internal/plugin/plugin_helper.go:39:		getBinaryPlugins				0.0%
github.com/konveyor/crane/internal/plugin/plugin_helper.go:64:		IsExecAny					0.0%
github.com/konveyor/crane/internal/plugin/plugin_helper.go:68:		GetFilteredPlugins				0.0%
github.com/konveyor/crane/internal/plugin/plugin_helper.go:111:		isPluginInList					0.0%
github.com/konveyor/crane/internal/plugin/plugin_manager_helper.go:24:	BuildManifestMap				0.0%
github.com/konveyor/crane/internal/plugin/plugin_manager_helper.go:68:	GetYamlFromUrl					75.0%
github.com/konveyor/crane/internal/plugin/plugin_manager_helper.go:82:	YamlToManifest					72.7%
github.com/konveyor/crane/internal/plugin/plugin_manager_helper.go:104:	FilterPluginForOsArch				100.0%
github.com/konveyor/crane/internal/plugin/plugin_manager_helper.go:122:	GetDefaultSource				0.0%
github.com/konveyor/crane/internal/plugin/plugin_manager_helper.go:131:	LocateBinaryInPluginDir				0.0%
github.com/konveyor/crane/internal/plugin/plugin_manager_helper.go:143:	IsUrl						100.0%
github.com/konveyor/crane/internal/plugin/plugin_manager_helper.go:149:	getData						80.0%
github.com/konveyor/crane/internal/transform/instructions.go:31:	LoadInstructions				61.1%
github.com/konveyor/crane/internal/transform/instructions.go:63:	friendlyInstructionsDecodeError			87.5%
github.com/konveyor/crane/internal/transform/instructions.go:78:	ValidateInstructions				100.0%
github.com/konveyor/crane/internal/transform/instructions.go:112:	GenerateStageDirNames				100.0%
github.com/konveyor/crane/internal/transform/orchestrator.go:41:	RunMultiStage					75.0%
github.com/konveyor/crane/internal/transform/orchestrator.go:147:	executeStage					72.7%
github.com/konveyor/crane/internal/transform/orchestrator.go:199:	transformResources				68.4%
github.com/konveyor/crane/internal/transform/orchestrator.go:250:	formatResourceID				0.0%
github.com/konveyor/crane/internal/transform/orchestrator.go:257:	getPluginForStage				90.9%
github.com/konveyor/crane/internal/transform/orchestrator.go:284:	getAvailablePluginNames				0.0%
github.com/konveyor/crane/internal/transform/orchestrator.go:297:	applyStageTransforms				80.8%
github.com/konveyor/crane/internal/transform/orchestrator.go:354:	loadResourcesFromDirectory			85.7%
github.com/konveyor/crane/internal/transform/orchestrator.go:369:	writeResourcesToDirectory			73.1%
github.com/konveyor/crane/internal/transform/stages.go:22:		DiscoverStages					90.5%
github.com/konveyor/crane/internal/transform/stages.go:83:		FilterStages					100.0%
github.com/konveyor/crane/internal/transform/stages.go:112:		GetFirstStage					100.0%
github.com/konveyor/crane/internal/transform/stages.go:122:		GetLastStage					66.7%
github.com/konveyor/crane/internal/transform/stages.go:132:		GetPreviousStage				100.0%
github.com/konveyor/crane/internal/transform/stages.go:142:		GetNextStage					100.0%
github.com/konveyor/crane/internal/transform/stages.go:152:		ValidateStageName				100.0%
github.com/konveyor/crane/internal/transform/stages.go:161:		GenerateStageName				100.0%
github.com/konveyor/crane/internal/transform/test_helpers.go:8:		hasKustomizeCommand				100.0%
github.com/konveyor/crane/internal/transform/test_helpers.go:14:	contains					100.0%
github.com/konveyor/crane/internal/transform/test_helpers.go:23:	findInString					100.0%
github.com/konveyor/crane/internal/transform/writer.go:28:		NewKustomizeWriter				100.0%
github.com/konveyor/crane/internal/transform/writer.go:37:		WriteStage					68.4%
github.com/konveyor/crane/internal/transform/writer.go:218:		getResourceID					100.0%
github.com/konveyor/crane/internal/transform/writer.go:231:		filterValidRemoveOps				76.2%
github.com/konveyor/crane/internal/transform/writer.go:275:		pathExists					93.5%
github.com/konveyor/crane/internal/transform/writer.go:352:		generateKustomizationWithComments		93.8%
github.com/konveyor/crane/internal/transform/writer.go:383:		checkStageDirectory				23.1%
github.com/konveyor/crane/internal/validate/api_resources.go:23:	ParseAPIResourcesJSON				90.9%
github.com/konveyor/crane/internal/validate/matcher.go:25:		MatchResults					75.0%
github.com/konveyor/crane/internal/validate/matcher.go:36:		MatchResultsFromIndex				100.0%
github.com/konveyor/crane/internal/validate/matcher.go:72:		buildDiscoveryIndex				64.7%
github.com/konveyor/crane/internal/validate/matcher.go:102:		matchEntry					100.0%
github.com/konveyor/crane/internal/validate/matcher.go:131:		buildKindIndex					100.0%
github.com/konveyor/crane/internal/validate/matcher.go:143:		addSuggestion					92.3%
github.com/konveyor/crane/internal/validate/report.go:17:		FormatTable					91.3%
github.com/konveyor/crane/internal/validate/report.go:60:		FormatJSON					100.0%
github.com/konveyor/crane/internal/validate/report.go:67:		FormatYAML					0.0%
github.com/konveyor/crane/internal/validate/report.go:79:		WriteFailures					0.0%
github.com/konveyor/crane/internal/validate/report.go:115:		failureFileName					0.0%
github.com/konveyor/crane/internal/validate/report.go:129:		safeFilePart					0.0%
github.com/konveyor/crane/internal/validate/report.go:145:		parseAPIVersion					0.0%
github.com/konveyor/crane/internal/validate/scanner.go:34:		ScanManifests					75.4%
github.com/konveyor/crane/internal/validate/types.go:46:		HasIncompatible					100.0%
github.com/konveyor/crane/internal/validate/types.go:49:		IncompatibleResults				0.0%
github.com/konveyor/crane/main.go:16:					main						0.0%
total:									(statements)					46.5%

Posted by CI

@aufi aufi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks great to me, thanks for the PR!


// Start with built-in plugins
unfilteredPlugins = append(unfilteredPlugins, &kubernetes.KubernetesTransformPlugin{})
unfilteredPlugins = append(unfilteredPlugins, &openshift.OpenShiftTransformPlugin{Log: logger})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍 We probably should add the logger to KubernetesPlugin too, commented it on migtools#494

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yes, that would need a change in crane-lib first i think

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
e2e-tests/tests/mta_801_stateful_migration_test.go (1)

16-16: ⚡ Quick win

Systematic loss of tier0 stateful migration test coverage.

All five tier0 E2E tests for stateful migration (PVC transfer) are now skipped because the transfer-pvc command is disabled in main.go. This removes test coverage for: basic stateful migration (MTA-801), empty PVC migration (MTA-804), MySQL data integrity validation (MTA-807, BUG #213), MongoDB non-admin migration (MTA-811, BUG #213), and CronJob+PVC migration (MTA-813, BUG #330/migtools#408).

Consider creating a tracking issue for re-enabling these tests when transfer-pvc is restored, and referencing that issue in a comment above each Skip call so future maintainers understand this is temporary rather than permanent test removal.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@e2e-tests/tests/mta_801_stateful_migration_test.go` at line 16, All five
tier0 stateful migration E2E tests were skipped due to disabling the
transfer-pvc command; create a tracking issue (e.g., "re-enable transfer-pvc and
restore stateful migration E2E tests") and add a brief comment above each
Skip(...) call in the affected test files (e.g., Skip in
e2e-tests/tests/mta_801_stateful_migration_test.go and the other four stateful
migration test files) that references the new issue number and notes this is
temporary until transfer-pvc is restored in main.go; do not change the Skip
behavior—only add the comment and open the tracking issue so future maintainers
know to re-enable the tests when transfer-pvc is reintroduced.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@e2e-tests/tests/mta_801_stateful_migration_test.go`:
- Line 16: All five tier0 stateful migration E2E tests were skipped due to
disabling the transfer-pvc command; create a tracking issue (e.g., "re-enable
transfer-pvc and restore stateful migration E2E tests") and add a brief comment
above each Skip(...) call in the affected test files (e.g., Skip in
e2e-tests/tests/mta_801_stateful_migration_test.go and the other four stateful
migration test files) that references the new issue number and notes this is
temporary until transfer-pvc is restored in main.go; do not change the Skip
behavior—only add the comment and open the tracking issue so future maintainers
know to re-enable the tests when transfer-pvc is reintroduced.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7651ecbd-e03d-4ae1-991a-ab8d017dd934

📥 Commits

Reviewing files that changed from the base of the PR and between 08d5250 and 94f5eae.

📒 Files selected for processing (6)
  • e2e-tests/tests/mta_801_stateful_migration_test.go
  • e2e-tests/tests/mta_804_empty_pvc_migration_test.go
  • e2e-tests/tests/mta_806_pvc_data_integrity_test.go
  • e2e-tests/tests/mta_807_data_validation_test.go
  • e2e-tests/tests/mta_811_mongodb_non_admin_test.go
  • e2e-tests/tests/mta_813_cronJob_PVC_test.go
✅ Files skipped from review due to trivial changes (1)
  • e2e-tests/tests/mta_806_pvc_data_integrity_test.go

@stillalearner stillalearner merged commit 28b0cde into main Jun 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants