Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ require (
golang.org/x/sys v0.42.0 // indirect
golang.org/x/text v0.35.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9 // indirect
google.golang.org/genproto/googleapis/rpc 3700d4141b60 // indirect
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚑ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check googleapis/rpc versions across HyperFleet repositories

echo "=== Checking genproto/googleapis/rpc versions across repos ==="

# Check hyperfleet-api (this repo)
echo -e "\n--- hyperfleet-api ---"
rg -n "google.golang.org/genproto/googleapis/rpc" go.mod go.sum

# Search for any direct usage of googleapis/rpc in this codebase
echo -e "\n=== Checking for direct imports of googleapis/rpc ==="
rg -n --type=go "google.golang.org/genproto/googleapis/rpc"

Repository: openshift-hyperfleet/hyperfleet-api

Length of output: 579


Fix malformed version syntax in go.mod and resolve dependency mismatch with go.sum.

The current go.mod entry 3700d4141b60 is not a valid Go pseudo-version format. The go.sum file still references v0.0.0-20260401024825-9d38bb4040a9, creating a mismatch that will cause module resolution issues. Ensure the entry is reformatted to a proper pseudo-version (e.g., v0.0.0-20260401024825-3700d4141b60), and verify that both files reference the same version consistently.

Additionally, after correcting the syntax, verify that this genproto version is intentionally different from the versions in related repositories:

  • hyperfleet-sentinel and hyperfleet-adapter currently use v0.0.0-20260401024825-9d38bb4040a9
  • hyperfleet-broker uses v0.0.0-20260209200024-4cfbd4190f57

Cross-repo version consistency for transitive dependencies should be validated to avoid unexpected behavior during dependency resolution.

πŸ€– 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 `@go.mod` at line 149, The go.mod entry for module symbol
google.golang.org/genproto/googleapis/rpc uses a malformed pseudo-version
(3700d4141b60); update it to a valid pseudo-version matching go.sum (e.g.,
v0.0.0-20260401024825-3700d4141b60) so both files reference the same version,
then run go mod tidy (or go get
google.golang.org/genproto@v0.0.0-20260401024825-3700d4141b60) to regenerate
go.sum and resolve the mismatch; finally confirm this genproto version is
intentionally different from the versions used in hyperfleet-sentinel,
hyperfleet-adapter, and hyperfleet-broker and adjust for cross-repo consistency
if needed.

⚠️ Potential issue | πŸ”΄ Critical | ⚑ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Validate go.mod syntax and retrieve correct pseudo-version for the commit

# Check if go.mod is valid
echo "=== Validating go.mod syntax ==="
go mod verify || echo "go mod verify failed"

# Attempt to retrieve correct pseudo-version for commit 3700d4141b60
echo -e "\n=== Checking commit 3700d4141b60 in googleapis/go-genproto ==="
# Note: This commit should have a timestamp associated with it
git ls-remote https://github.com/googleapis/go-genproto.git 3700d4141b60* || echo "Commit lookup failed"

# Check what go list reports for this module
echo -e "\n=== Checking module version via go list ==="
go list -m google.golang.org/genproto/googleapis/rpc || echo "go list failed"

Repository: openshift-hyperfleet/hyperfleet-api

Length of output: 332


🏁 Script executed:

#!/bin/bash
# Check the actual go.mod file around line 149
echo "=== go.mod lines 145-155 ==="
sed -n '145,155p' go.mod

echo -e "\n=== Searching for genproto/googleapis/rpc in go.sum ==="
grep "google.golang.org/genproto/googleapis/rpc" go.sum | head -5

Repository: openshift-hyperfleet/hyperfleet-api

Length of output: 869


Version mismatch in go.mod and go.sum will break dependency resolution.

Line 149 specifies a bare commit hash 3700d4141b60 for google.golang.org/genproto/googleapis/rpc, but go.sum contains the conflicting entry v0.0.0-20260401024825-9d38bb4040a9. This mismatch prevents successful module resolution and requires go mod tidy to fix.

Go module version specifications must use proper pseudo-version format (v0.0.0-yyyymmddhhmmss-commithash) and be consistent with go.sum entries.

πŸ€– 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 `@go.mod` at line 149, Replace the bare commit hash for the module
google.golang.org/genproto/googleapis/rpc in go.mod with the proper
pseudo-version that matches go.sum (e.g., v0.0.0-20260401024825-9d38bb4040a9) or
run `go mod tidy` to let Go compute and sync the correct pseudo-version; ensure
the entry in go.mod exactly matches the pseudo-version found in go.sum so
dependency resolution succeeds.

google.golang.org/grpc v1.80.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down