Skip to content

🌱 Fix import linting rule for moved util package - #2378

Merged
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
joelanford:fix-util-import-lint
Dec 11, 2025
Merged

🌱 Fix import linting rule for moved util package#2378
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
joelanford:fix-util-import-lint

Conversation

@joelanford

Copy link
Copy Markdown
Member

Description

Update .golangci.yaml to reflect that util package is now at internal/shared/util (not internal/util), and update all imports to comply with the linting rule.

Reviewer Checklist

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

Update .golangci.yaml to reflect that util package is now at
internal/shared/util (not internal/util), and update all imports
to comply with the linting rule.
@joelanford
joelanford requested a review from a team as a code ownerDecember 10, 2025 21:03
CopilotAI review requested due to automatic review settings December 10, 2025 21:03
@netlify

netlifyBot commented Dec 10, 2025

Copy link
Copy Markdown

Deploy Preview for olmv1 ready!

NameLink
🔨 Latest commited096f1
🔍 Latest deploy loghttps://app.netlify.com/projects/olmv1/deploys/6939e03805cb430008de74cb
😎 Deploy Previewhttps://deploy-preview-2378--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.

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the import linting rule in .golangci.yaml to reflect that the util package has been moved from internal/util to internal/shared/util. The changes ensure all imports comply with the updated linting rule, which enforces an alias naming pattern where packages under internal/shared/util/ are imported with the suffix util appended to the package name.

Key changes:

  • Updated .golangci.yaml regex pattern to match the new package path structure
  • Renamed package testutils to test in internal/shared/util/test/ directory
  • Updated all test file imports to use the new alias testutil (following the ${packagename}util convention)
  • Updated feature gate utility imports to use the longer alias featuregatesutil (instead of fgutil)

Reviewed changes

Copilot reviewed 14 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
.golangci.yamlUpdated import linting regex pattern from internal/util/ to internal/shared/util/
internal/shared/util/test/utils.goChanged package declaration from testutils to test
internal/shared/util/test/summary.goChanged package declaration from testutils to test
internal/shared/util/test/artifacts.goChanged package declaration from testutils to test
internal/shared/util/test/templates/*.tmplAdded template files to the new package directory
internal/operator-controller/features/features.goUpdated import alias from fgutil to featuregatesutil
internal/catalogd/features/features.goUpdated import alias from fgutil to featuregatesutil
test/e2e/*.goUpdated imports from utils "...testutils" to testutil "...test"
test/upgrade-e2e/post_upgrade_test.goUpdated import from utils "...testutils" to testutil "...test"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecovBot commented Dec 10, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.85%. Comparing base (e4a633e) to head (ed096f1).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #2378 +/- ##
==========================================
- Coverage 74.86% 72.85% -2.02% 
==========================================
Files 95 98 +3 Lines 7377 7581 +204 ==========================================
Hits 5523 5523 - Misses 1419 1623 +204 
Partials 435 435 
FlagCoverage Δ
e2e44.62% <100.00%> (+0.05%)⬆️
experimental-e2e49.29% <100.00%> (+0.04%)⬆️
unit56.82% <0.00%> (-1.58%)⬇️

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.

@rashmigottipatirashmigottipati left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@openshift-ciopenshift-ciBot added the lgtm Indicates that a PR is ready to be merged. label Dec 11, 2025
@openshift-ci

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: perdasilva, rashmigottipati

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

The pull request process is described here

Details 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-ciopenshift-ciBot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 11, 2025
@pedjak
pedjak removed the request for review from camilamacedo86December 11, 2025 11:36
@pedjak

Copy link
Copy Markdown
Contributor

This PR is just about consolidating import aliases, hence it is strange that codecov reports drop in coverage.

/override codecov/project

@openshift-ci

Copy link
Copy Markdown

@pedjak: Overrode contexts on behalf of pedjak: codecov/project

Details

In response to this:

This PR is just about consolidating import aliases, hence it is strange that codecov reports drop in coverage.

/override codecov/project

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-merge-bot
openshift-merge-botBot merged commit 0240528 into operator-framework:mainDec 11, 2025
33 of 34 checks passed
@joelanford
joelanford deleted the fix-util-import-lint branch December 18, 2025 19:50
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by an approver from all required OWNERS files.lgtmIndicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@joelanford@pedjak@perdasilva@rashmigottipati