Skip to content

Conversation

@sebrandon1
Copy link
Member

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

@openshift-ci
Copy link

openshift-ci bot commented Nov 14, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sebrandon1
Once this PR has been reviewed and has the lgtm label, please assign oourfali for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

danielerez and others added 20 commits January 28, 2026 14:09
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.
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 28, 2026
@openshift-merge-robot
Copy link

PR needs rebase.

Details

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-ci
Copy link

openshift-ci bot commented Jan 28, 2026

@sebrandon1: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-sno-dualstack-dhcp 131c9e8 link false /test e2e-sno-dualstack-dhcp
ci/prow/unit-test 131c9e8 link true /test unit-test
ci/prow/lint 131c9e8 link true /test lint
ci/prow/e2e-compact-ipv4-static 131c9e8 link true /test e2e-compact-ipv4-static
ci/prow/images 131c9e8 link true /test images

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants