-
Notifications
You must be signed in to change notification settings - Fork 39
mockgen deprecated: use uber-go/mock instead #607
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
base: master
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sebrandon1 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
acd2024 to
86ada25
Compare
Added support for the /var/lib/iri-registry dir copied to device during bootstrap step. Also, removed the redundant /oc-mirror/install prefix from the dir in data.iso (to simplify the required change in assisted-installer).
Added a temporary flag to ApplianceConfig to avoid starting the local registry on installation step. This is required for testing the IRI support in MCO.
* AGENT-1311: Use docker-registry from OCP release Add support for using the docker-registry image from the OCP release instead of always building a generic registry internally. The implementation follows a priority-based approach for registry selection: 1. User-configured imageRegistry.uri (highest priority) 2. docker-registry from OCP release (middle priority) 3. Internally built registry (fallback) Changes: - Add ShouldUseOcpRegistry() helper function to centralize decision logic - Update CopyRegistryImageIfNeeded() to handle all three registry sources - Add start-registry.sh wrapper script to execute correct podman command - Update registry.env to include USE_OCP_REGISTRY flag - Modify ignition files to use ShouldUseOcpRegistry() helper - Always copy source images to localhost/registry:latest for disconnected env The docker-registry image from OCP release requires different podman parameters (-u 0 --entrypoint=/usr/bin/distribution serve /etc/registry/config.yaml), which is handled by the wrapper script based on the USE_OCP_REGISTRY flag. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Assisted-by: Claude <noreply@anthropic.com> * Only use docker-registry when OCP version >= 4.21 The docker-registry image contains the distribution registry starting with 4.21. * Remove extraenous ocpRegistryFlag * Use correct entrypoint when running docker-registry image Adds conditional logic to use the proper entrypoint when starting the docker-registry image from OCP release during the build process. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Assisted-by: Claude <noreply@anthropic.com> * Use separate service directories for registry variants Create services/local-registry-default and services/local-registry-ocp directories, each containing start-local-registry.service with registry-specific configuration. Select directory at build time based on registry type. Remove USE_OCP_REGISTRY from registry.env. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Assisted-by: Claude <noreply@anthropic.com> * Refactor registry version checking and simplify GetRegistryEnv - Extract isVersionAtLeast() base function for version comparison - Add comprehensive unit tests for version comparison with CI builds - Replace IsUsingOcpRegistry() with ShouldUseOcpRegistry() - Simplify GetRegistryEnv() to use consts.RegistryImage directly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Assisted-by: Claude <noreply@anthropic.com> * Change registry port from 5000 to 22625 and update certificate paths This commit updates the registry configuration to use port 22625 instead of 5000 for the main registry (upgrade registry remains at port 5001). Changes: - Updated RegistryPort constant from 5000 to 22625 - Changed registry HTTP address in config.yml to :22625 - Updated service files to remove redundant port mappings (not needed with --net host) - Renamed certificate files from domain.{crt,key} to tls.{crt,key} - Changed certificate storage path from /tmp/certs to /etc/iri-registry/certs - Updated all test expectations to use port 22625 - Updated documentation examples to use port 22625 🤖 Generated with [Claude Code](https://claude.com/claude-code) Assisted-by: Claude <noreply@anthropic.com> * Exclude pre-release versions from minimum version check Remove pre-release metadata stripping in isVersionAtLeast to ensure pre-release versions (e.g., "4.21.0-rc.1" or "4.21.0-0.ci...") are considered less than their stable release counterpart. This means pre-release versions of 4.21.0 will return false and not use the OCP docker-registry, while stable 4.21.0 and later will return true. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Assisted-by: Claude <noreply@anthropic.com>
Support api-int.<registry-domain> and localhost in 'image-digest-mirror' IDMS.
The apply-host-config service is now skipping on interactive: ConditionPathExists=!/etc/assisted/interactive-ui Thus, update-hosts service fails due to: Requires=apply-host-config.service Hence, move to 'Wants' instead, to ensure the service starts also when apply-host-config skips.
…ion check" (openshift#625) This reverts commit 161d745. Prerelease 4.21 versions should be allowed to use docker-registry image. This is required so that we may test the docker-registry with appliance in CI.
) Add a systemd.path unit that monitors for the internal-release-image TLS certificate and key files during the install phase. When both files appear at /opt/openshift/tls/, the path unit triggers a service that copies the certificates to /etc/iri-registry/certs/ and restarts the registry. The setup-local-registry.sh script is modified to skip certificate generation if valid certificates already exist, preventing the IRI TLS certificates from being overwritten when the registry service restarts. Key components: - watch-iri-tls-certs.path: Monitors for certificate files using PathModified - reconfigure-local-registry-iri-tls.service: Triggered by path unit to reconfigure the registry (not enabled independently) - reconfigure-local-registry-iri-tls.sh: Validates files, copies certs, restarts registry, and disables the path unit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Assisted-by: Claude
Move PinnedImageSet generation from install ignition to bootstrap ignition to ensure manifests are available during cluster bootstrap. Changes: - Add GetMappingFile() method to Release interface using oc mirror --dry-run to generate mapping.txt without performing the actual mirror operation - Move addPinnedImageSetConfigFiles from InstallIgnition to BootstrapIgnition and place manifests in extra-manifests directory - Add OCP version validation for PinnedImageSet in ApplianceConfig to fail early if version is below minimum required - Update PinnedImageSet API version from v1alpha1 to v1 - Simplify PinnedImageSetPattern constant to just the resource name - Remove obsolete copyMappingFile logic since mapping is now generated on demand See: openshift#485
…openshift#631) Changes skopeo copy from docker-archive to dir format with --all and --preserve-digests flags to maintain manifest list and architecture-specific digests. This allows the registry image to be referenced by its original digest in start-local-registry.service. Key changes: - Use 'skopeo copy --all --preserve-digests docker://%s dir:%s' format - Change RegistryFilePath from registry.tar to registry directory - Update setup-local-registry.sh to use 'podman pull dir:' and tag the pulled image with :latest so podman run can reference the original digest for docker-registry images from the release payload - Add GetRegistryImageURI() to return actual source registry URI instead of always using localhost/registry:latest in REGISTRY_IMAGE env var - Update file copy operations to handle directories instead of tar files - Add comprehensive documentation explaining --all and --preserve-digests flags When using OCP docker-registry image with digest reference (e.g., registry.ci.openshift.org/ocp/4.21@sha256:abc...), the script now: 1. Pulls from dir: format 2. Finds the image by matching digest 3. Tags it as <base-image>:latest enabling podman run to use the original digest 🤖 Generated with [Claude Code](https://claude.com/claude-code) Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Update the rpms-signature-scan task reference to the latest trusted version to resolve Konflux enterprise contract violation. Task: rpms-signature-scan Old SHA: 78c8d7960c6db284356d94aaae64d1fca34fff4de6a6e20d897a088af0c81cf5 New SHA: 0b10508c82ccb0f5a06a66ce7af56e9bfd40651ddefdf0f499988e897771ee28
Update direct and indirect Go dependencies to their latest compatible versions: Direct dependencies: - github.com/coreos/stream-metadata-go: v0.4.5 -> v0.4.10 - github.com/diskfs/go-diskfs: v1.4.1 -> v1.4.2 - github.com/hashicorp/go-version: v1.7.0 -> v1.8.0 - github.com/itchyny/gojq: v0.12.17 -> v0.12.18 - github.com/openconfig/goyang: v1.6.0 -> v1.6.3 - github.com/spf13/cobra: v1.8.1 -> v1.10.2 - golang.org/x/crypto: v0.43.0 -> v0.46.0 - golang.org/x/term: v0.36.0 -> v0.38.0 Also updates various indirect dependencies including golang.org/x packages, prometheus, redis, and compression libraries.
- Bump ubi9/go-toolset base image from 1.24 to 1.25 - Upgrade golangci-lint from v1.64.8 to v2.7.2
- Upgrade Go version from 1.24.0 to 1.25.0 - Update golangci-lint to v2.7.2 for Go 1.25 compatibility - Update direct dependencies: - github.com/distribution/distribution/v3: v3.0.0-rc.3 -> v3.0.0 - github.com/coreos/ignition/v2: v2.20.0 -> v2.21.0 - github.com/onsi/ginkgo/v2: v2.19.1 -> v2.22.0 - github.com/onsi/gomega: v1.34.0 -> v1.36.0 - github.com/Masterminds/semver/v3: v3.2.1 -> v3.4.0 - Update indirect dependencies: - cloud.google.com/go/auth, aws-sdk-go, redis, otelhttp, etc. - Regenerate vendor directory
Fixes the deployment ISO failing to clone the appliance disk image when using /dev/disk/by-path/* paths as the target device. The virt-resize command was failing with 'No such file or directory' because symlinks were not being properly resolved. Changes: - Wait for udev to settle before accessing disk paths - Wait up to 60 seconds for the target device to become available - Resolve symlinks to their actual device paths before passing to virt-resize - Add proper error handling when target device is not found - Add --pull=never to podman run to prevent TTY prompt errors - Tag loaded image to configured name to fix 'image not found' errors Fixes: openshift#368
The test files were still importing github.com/golang/mock/gomock instead of go.uber.org/mock/gomock, causing type mismatch errors when the mocks were regenerated with uber-go/mock.
86ada25 to
131c9e8
Compare
|
PR needs rebase. DetailsInstructions 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. |
|
@sebrandon1: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
https://github.com/golang/mock is marked as archived as of
June 27, 2023. They recommend using go.uber.org/mock.This PR attempts to change the dependency to one that is maintained.
Tracking issue: redhat-best-practices-for-k8s/telco-bot#45