Skip to content

Conversation

@qcserestipy
Copy link

@qcserestipy qcserestipy commented Nov 4, 2025

Fix Dagger Dev Server: Registryctl Compilation and Configuration Updates

Comprehensive Summary of Changes

This PR fixes multiple issues in the Dagger development environment setup to ensure proper compilation and runtime functionality of the registryctl component, along with other configuration improvements:

Key Changes:

  1. Registry Configuration Updates (.dagger/config/registry/config.yml)

    • Updated Redis cache configuration from layerinfo to blobdescriptor for compatibility
    • Modified Redis connection format from addr to addrs array format
    • Reorganized Redis configuration structure (moved db, dialtimeout to proper order)
    • Added TLS configuration section for Redis (disabled by default)
    • Removed deprecated pool configuration in favor of modern Redis client settings
  2. Registryctl Service Fixes (.dagger/devServices.go)

    • Added chmod +x command for /run_script to ensure executable permissions for registryctl
    • Added same fix for core service run script
    • Fixed script execution permissions that were preventing proper service startup
  3. Build Process Optimization (.dagger/main.go)

    • Commented out unnecessary registry binary inclusion in registryctl build
    • Removed redundant registry_DO_NOT_USE_GC binary mounting that was causing compilation issues
    • Fixed GetVersion() function to properly trim whitespace from VERSION file output
  4. Nginx Service Cleanup (.dagger/devServices.go)

    • Removed debug port 4001 exposure from nginx proxy service
    • Cleaned up development-only configuration
  5. Documentation Update (.dagger/README.md)

    • Updated command from dagger call run-dev up -v to dagger call dev-server up -v
    • Aligned documentation with actual implementation

Issue being fixed

Fixes registryctl compilation and runtime issues in Dagger development environment


Note: This PR focuses on infrastructure and development environment improvements. The changes ensure that developers can successfully build and run Harbor components using Dagger without encountering compilation or runtime errors related to registryctl.


Summary by cubic

Fixes the Dagger dev server so registryctl compiles and starts correctly. Improves registry and nginx configs and build steps for a smoother local dev experience.

  • Bug Fixes
    • Update registry config for Redis: use blobdescriptor cache, add addrs array, set db/timeouts, add TLS toggle, remove deprecated pool settings.
    • Make /run_script executable in core and registryctl containers to fix startup.
    • Remove unused registry_DO_NOT_USE_GC binary from registryctl build; trim whitespace in GetVersion().
    • Stop exposing nginx debug port 4001.
    • Update README command to: dagger call dev-server up -v.

Written for commit 051f4a7. Summary will update automatically on new commits.

Summary by CodeRabbit

  • Documentation

    • Updated development setup instructions and dev-server command for starting local Harbor components.
  • Chores

    • Registry caching/storage configuration refactored.
    • Service setup adjusted (debug port no longer exposed; execution permissions updated).
    • Version output trimmed for cleaner display.

…ke registryctl compile (#1)

Signed-off-by: Patrick Eschenbach <[email protected]>
Copilot AI review requested due to automatic review settings November 4, 2025 20:09
@coderabbitai
Copy link

coderabbitai bot commented Nov 4, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Switched the Dagger dev invocation to dev-server, refactored registry Redis/cache keys (addr→addrs list, layerinfo→blobdescriptor, added db/dialtimeout/tls), added execute permission steps for run_script in services, removed nginx debug port exposure, and removed special registryctl binary injection while trimming returned version whitespace.

Changes

Cohort / File(s) Change Summary
Development CLI
.dagger/README.md
Replaced dagger call run-dev up -v with dagger call dev-server up -v.
Registry config
.dagger/config/registry/config.yml
Replaced storage.cache.layerinfo with storage.cache.blobdescriptor; changed redis.addrredis.addrs: [redis:6379]; added redis.db and redis.dialtimeout; added redis.tls.enabled: false; removed redis.password and redis.pool entries.
Registryctl config
.dagger/config/registryctl/config.yml
Line rewritten for registry_config: "/etc/registry/config.yml" (no functional change).
Dagger services
.dagger/devServices.go
Removed NginxService exposure of port 4001; added chmod +x /run_script steps to CoreService and RegistryCtlService.
Build tooling
.dagger/main.go
Removed special-case registryctl binary injection and exposed port handling in BuildImage; GetVersion now returns a trimmed version string.

Sequence Diagram(s)

(Skipped — changes are configuration and build/script adjustments without new runtime control-flow behavior to diagram.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Pay attention to .dagger/config/registry/config.yml for Redis key shape and semantics.
  • Verify services relying on nginx debug port or registryctl injected binary are not broken.
  • Check that added chmod steps execute in the correct lifecycle for run scripts.

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main changes: fixing the Dagger dev server with a focus on registryctl compilation and configuration updates, which aligns with the primary intent of the PR.
Description check ✅ Passed The description covers all key changes with clear sections, includes the issue being addressed, and follows the template structure with comprehensive summary and details of fixes across multiple components.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2e7ee5d and 051f4a7.

📒 Files selected for processing (1)
  • .dagger/config/registry/config.yml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .dagger/config/registry/config.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

Copilot AI left a comment

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 Dagger configuration for Harbor development environment, including Redis configuration updates, code cleanup, and documentation fixes.

  • Commented out deprecated registryctl-specific registry binary build logic
  • Updated registry Redis configuration to use modern connection format
  • Added execution permissions for run scripts in service configurations
  • Fixed version string handling to trim whitespace

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.dagger/main.go Commented out deprecated registryctl registry binary logic and fixed version string trimming
.dagger/devServices.go Commented out debug port and added chmod execution for run scripts in CoreService and RegistryCtlService
.dagger/config/registryctl/config.yml Trailing newline formatting fix
.dagger/config/registry/config.yml Updated Redis configuration from old single-address format to modern multi-address format with TLS settings
.dagger/README.md Updated command from run-dev to dev-server to match actual function name

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

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 5 files

Signed-off-by: Patrick Eschenbach <[email protected]>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 4, 2025

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@Vad1mo Vad1mo merged commit ad4cf62 into container-registry:next Nov 5, 2025
4 of 5 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.

2 participants