Skip to content

Conversation

srm6867
Copy link

@srm6867 srm6867 commented Aug 12, 2025

Fixes: KAAP-856

Overview

What this PR does / why we need it

Special notes for your reviewer

Does this PR introduce a user-facing change?


Summary by Bito

This pull request optimizes the build process by disabling VCS information and removing obsolete Makefile targets. It includes bug fixes for the Keystone connector, particularly addressing domain naming inconsistencies and error handling. The test suite has been enhanced with updated host configurations, improved logging, and stronger validation checks.

Copy link

bito-code-review bot commented Aug 12, 2025

Code Review Agent Run #fca187

Actionable Suggestions - 0
Additional Suggestions - 1
  • Makefile - 1
    • Duplicated build flag in go build commands · Line 41-42
      The `-buildvcs=false` flag is added to prevent Go from embedding VCS information in the binary. This is a good practice for reproducible builds, but it's duplicated in both build commands. Consider extracting this flag to the `LD_FLAGS` variable to avoid duplication.
      Code suggestion
       @@ -38,6 +38,7 @@
        .PHONY: release-binary
        release-binary: LD_FLAGS = "-w -X main.version=$(VERSION) -extldflags \"-static\""
      +release-binary: GO_BUILD_FLAGS = -buildvcs=false
        release-binary: ## Build release binaries (used to build a final container image).
      -	@go build -buildvcs=false -o /go/bin/dex -v -ldflags $(LD_FLAGS) $(REPO_PATH)/cmd/dex
      -	@go build -buildvcs=false -o /go/bin/docker-entrypoint -v -ldflags $(LD_FLAGS) $(REPO_PATH)/cmd/docker-entrypoint
      +	@go build $(GO_BUILD_FLAGS) -o /go/bin/dex -v -ldflags $(LD_FLAGS) $(REPO_PATH)/cmd/dex
      +	@go build $(GO_BUILD_FLAGS) -o /go/bin/docker-entrypoint -v -ldflags $(LD_FLAGS) $(REPO_PATH)/cmd/docker-entrypoint
Review Details
  • Files reviewed - 3 · Commit Range: c8fe170..5133ee9
    • Makefile
    • connector/keystone/keystone.go
    • connector/keystone/keystone_test.go
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • Golangci-lint (Linter) - ✖︎ Failed

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at mithil@platform9.com.

Documentation & Help

AI Code Review powered by Bito Logo

Copy link

bito-code-review bot commented Aug 12, 2025

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
Other Improvements - Optimized Build Process

Makefile - Updated build commands with the -buildvcs=false flag and removed outdated targets, streamlining the build and release process.

Bug Fix - Fixed Keystone Client Issues

keystone.go - Corrected the domain string from 'default' to 'Default' and refined error handling to ensure consistency in the Keystone client.

Testing - Enhanced Keystone Testing Suite

keystone_test.go - Updated test configurations by switching host addresses to keystoneAdminURL, adding slog-based logging, and improving group validations for robust test results.

@srm6867 srm6867 force-pushed the private/shubham/sync-temp-fixes branch from 5133ee9 to a8e250d Compare August 12, 2025 09:49
@srm6867 srm6867 changed the title Private/shubham/sync temp fixes fixes to upstream sync PR Aug 12, 2025
Copy link

@cruizen cruizen left a comment

Choose a reason for hiding this comment

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

LGTM.

@indradhanush are you looking into moving the image to quay.io as part of a separate issue? (since we are hitting rate limits with docker - which causes the Teamcity build to fail too)

@cruizen cruizen requested a review from a team August 12, 2025 10:25
@srm6867 srm6867 changed the title fixes to upstream sync PR fixes for upstream sync PR Aug 12, 2025
@indradhanush
Copy link

LGTM.

@indradhanush are you looking into moving the image to quay.io as part of a separate issue? (since we are hitting rate limits with docker - which causes the Teamcity build to fail too)

Yes! Sorry it fell through the gaps for me combined with my access key to quay.io not working (open request with IT portal in progress). I'll look into it today. Might sync with you to for the quay.io access for testing.

Copy link

@bito-code-review bito-code-review bot left a comment

Choose a reason for hiding this comment

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

Code Review Agent Run #ab5f77

Actionable Suggestions - 1
  • connector/keystone/keystone.go - 1
    • Domain name case change may break authentication · Line 342-342
Additional Suggestions - 1
  • Makefile - 1
    • Duplicated build flag in go build commands · Line 41-42
      The `-buildvcs=false` flag is added to prevent Go from embedding VCS information in the binary. This is a good practice for reproducible builds, but it's duplicated in both build commands. Consider extracting this flag to the `LD_FLAGS` variable to avoid duplication.
      Code suggestion
       @@ -38,8 +38,9 @@
        .PHONY: release-binary
      -release-binary: LD_FLAGS = "-w -X main.version=$(VERSION) -extldflags \"-static\""
      +release-binary: BUILD_FLAGS = "-buildvcs=false"
      +release-binary: LD_FLAGS = "-w -X main.version=$(VERSION) -extldflags \"-static\""
        release-binary: ## Build release binaries (used to build a final container image).
      -	@go build -buildvcs=false -o /go/bin/dex -v -ldflags $(LD_FLAGS) $(REPO_PATH)/cmd/dex
      -	@go build -buildvcs=false -o /go/bin/docker-entrypoint -v -ldflags $(LD_FLAGS) $(REPO_PATH)/cmd/docker-entrypoint
      +	@go build $(BUILD_FLAGS) -o /go/bin/dex -v -ldflags $(LD_FLAGS) $(REPO_PATH)/cmd/dex
      +	@go build $(BUILD_FLAGS) -o /go/bin/docker-entrypoint -v -ldflags $(LD_FLAGS) $(REPO_PATH)/cmd/docker-entrypoint
Review Details
  • Files reviewed - 3 · Commit Range: a8e250d..a8e250d
    • Makefile
    • connector/keystone/keystone.go
    • connector/keystone/keystone_test.go
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • Golangci-lint (Linter) - ✖︎ Failed

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at mithil@platform9.com.

Documentation & Help

AI Code Review powered by Bito Logo

@@ -340,7 +339,7 @@ func (p *conn) authenticate(ctx context.Context, username, pass string) (string,

func (p *conn) getAdminTokenUnscoped(ctx context.Context) (string, error) {
domain := domainKeystone{
Name: "default",
Name: "Default",

Choose a reason for hiding this comment

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

Domain name case change may break authentication

The domain name is being changed from 'default' to 'Default' which may cause authentication failures if the Keystone service expects the domain name to be lowercase. OpenStack Keystone domains are typically case-sensitive.

Code suggestion
Check the AI-generated fix before applying
Suggested change
Name: "Default",
Name: "default",

Code Review Run #ab5f77


Should Bito avoid suggestions like this for future reviews? (Manage Rules)

  • Yes, avoid them

@srm6867 srm6867 merged commit 029c2d0 into private/shubham/sync-upstream-aug-2025 Aug 12, 2025
7 of 8 checks passed
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