Skip to content

Refactoring util pkg for "revive" linter#415

Merged
lukeatdell merged 4 commits into
mainfrom
usr/lukeatdell/pkg-renaming
Jul 2, 2025
Merged

Refactoring util pkg for "revive" linter#415
lukeatdell merged 4 commits into
mainfrom
usr/lukeatdell/pkg-renaming

Conversation

@lukeatdell

@lukeatdell lukeatdell commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

Description

This PR address the new "revive" linting error related to poor package naming.
New packages have been created under the "common/utils" directory and functions from the old utils package have been organized in these packages as best possible.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
https://github.com/dell/csm/issues/1896

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

Kubernetes e2e

$ ./e2e.test --kubeconfig=~/.kube/config --ginkgo.timeout=2h --ginkgo.skip='\[Feature:|\[Disruptive\]' --ginkgo.focus='External.Storage.*' --storage.testdriver=./manifest.yaml

  I0701 16:34:55.470084 664 external.go:189] Driver loaded from path [./manifest.yaml]: &{DriverInfo:{Name:csi-isilon.dellemc.com InTreePluginName: TestTags:[] MaxFileSize:0 SupportedSizeRange:{Max: Min:8Gi} SupportedFsType:map[:{} nfs:{}] SupportedMountOption:map[] RequiredMountOption:map[] Capabilities:map[block:false capacity:false controllerExpansion:true exec:false fsGroup:false multipods:true nodeExpansion:true offlineExpansion:true onlineExpansion:true persistence:true pvcDataSource:true snapshotDataSource:true topology:true volumeLimits:false] RequiredAccessModes:[] TopologyKeys:[csi-isilon.dellemc.com/10.247.102.193] NumAllowedTopologies:0 StressTestOptions:<nil> VolumeSnapshotStressTestOptions:0xc000013530 PerformanceTestOptions:<nil>} StorageClass:{FromName:false FromFile: FromExistingClassName:isilon} VolumeAttributesClass:{FromName:false FromFile: FromExistingClassName:} SnapshotClass:{FromName:false FromFile: FromExistingClassName:isilon-snapclass} InlineVolumes:[] ClientNodeName: Timeouts:map[]}
  I0701 16:34:56.268884     664 e2e.go:109] Starting e2e run "7867a929-bc83-47b0-88dc-6feedd72b116" on Ginkgo node 1
Running Suite: Kubernetes e2e suite
===========================================================================
Random Seed: 1751402095 - will randomize all specs

Will run 189 of 7037 specs
SSSSSSSSSSSSSSSSSSSSSSSSSSSS•...


Ran 37 of 7037 Specs in 1478.988 seconds
SUCCESS! -- 37 Passed | 0 Failed | 0 Pending | 7000 Skipped
PASS

- renaming and reorganizing packages due to "revive" linting issue. Make the package names more descriptive.
@github-actions

github-actions Bot commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/dell/csi-powerscale/common/utils 0.00% (ø)
github.com/dell/csi-powerscale/common/utils/fromcontext 0.00% (ø)
github.com/dell/csi-powerscale/common/utils/identifiers 0.00% (ø)
github.com/dell/csi-powerscale/common/utils/logging 0.00% (ø)
github.com/dell/csi-powerscale/common/utils/powerscale-fs 0.00% (ø)
github.com/dell/csi-powerscale/common/utils/string-utils 0.00% (ø)
github.com/dell/csi-powerscale/csi-utils 0.00% (ø)
github.com/dell/csi-powerscale/provider 0.00% (ø)
github.com/dell/csi-powerscale/service 0.00% (ø)
github.com/dell/csi-powerscale/test/integration 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/dell/csi-powerscale/common/utils/fromcontext/from-context.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/common/utils/identifiers/fqdn.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/common/utils/identifiers/node.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/common/utils/identifiers/snapshot.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/common/utils/identifiers/uuid.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/common/utils/identifiers/volume.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/common/utils/logging/logging.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/common/utils/powerscale-fs/powerscale-fs.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/common/utils/string-utils/string-utils.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/common/utils/utils.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/csi-utils/csiutils.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/provider/provider.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/service/controller.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/service/csi_extension_server.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/service/isiService.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/service/node.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/service/nodeConnectivityChecker.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/service/replication.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerscale/service/service.go 0.00% (ø) 0 0 0

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/dell/csi-powerscale/common/utils/fromcontext/from-context_test.go
  • github.com/dell/csi-powerscale/common/utils/identifiers/fqdn_test.go
  • github.com/dell/csi-powerscale/common/utils/identifiers/node_test.go
  • github.com/dell/csi-powerscale/common/utils/identifiers/snapshot_test.go
  • github.com/dell/csi-powerscale/common/utils/identifiers/uuid_test.go
  • github.com/dell/csi-powerscale/common/utils/identifiers/volume_test.go
  • github.com/dell/csi-powerscale/common/utils/logging/logging_test.go
  • github.com/dell/csi-powerscale/common/utils/powerscale-fs/powerscale-fs_test.go
  • github.com/dell/csi-powerscale/common/utils/string-utils/string-utils_test.go
  • github.com/dell/csi-powerscale/common/utils/utils_test.go
  • github.com/dell/csi-powerscale/csi-utils/csiutils_test.go
  • github.com/dell/csi-powerscale/provider/provider_test.go
  • github.com/dell/csi-powerscale/service/step_defs_test.go
  • github.com/dell/csi-powerscale/test/integration/step_defs_test.go

@lukeatdell

lukeatdell commented Jul 1, 2025

Copy link
Copy Markdown
Contributor Author

Kubernetes e2e results look a bit sus. If anyone has a more applicable test config, please let me know and I'll re-run the tests with that config.

@lukeatdell

Copy link
Copy Markdown
Contributor Author

New e2e test are running with a more appropriate config.
Results pending...

@lukeatdell

Copy link
Copy Markdown
Contributor Author

K8s e2e test results updated.

@lukeatdell lukeatdell merged commit 8a63422 into main Jul 2, 2025
6 checks passed
@lukeatdell lukeatdell deleted the usr/lukeatdell/pkg-renaming branch July 2, 2025 13:01
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