Fix: Prevent duplicate module entries when deploying external modules with params#55
Closed
hinriksnaer wants to merge 1 commit into
Closed
Fix: Prevent duplicate module entries when deploying external modules with params#55hinriksnaer wants to merge 1 commit into
hinriksnaer wants to merge 1 commit into
Conversation
… with params
Bug: When deploying external modules with parameters via
fedpunk module deploy <url>, two entries were created:
1. Normalized name string (e.g., "module-name")
2. URL with params object (e.g., {module: "url", params: {...}})
Root cause: deployer-deploy-module normalized URL to name before
adding to config, then param-save-to-config searched for URL and
didn't find it, creating a duplicate entry.
Fix: Store original module reference (URL) instead of normalized name.
This allows param-save-to-config to find and update the existing entry.
Before:
modules:
enabled:
- fedpunk-claude-gauth-example
- module: https://github.com/.../fedpunk-claude-gauth-example.git
params:
gcloud_auth: yes
After:
modules:
enabled:
- module: https://github.com/.../fedpunk-claude-gauth-example.git
params:
gcloud_auth: yes
Test: bash test/ci/test-external-module-params-no-duplicate.sh
Fixes user-reported issue in container deployment.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Owner
Author
|
Closing in favor of full unstable → main PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When deploying external modules with parameters using:
Two entries were created in
~/.config/fedpunk/fedpunk.yaml:Root Cause
In
lib/fish/deployer.fish(line 48-58):deployer-deploy-modulenormalized URL to module nameparam-save-to-configsearched for the URLSolution
Store the original module reference (URL) instead of normalizing it:
Before (buggy):
After (fixed):
This allows
param-save-to-configto find and update the existing entry instead of creating a duplicate.Changes
lib/fish/deployer.fish: Store original URL instead of normalized nametest/ci/test-external-module-params-no-duplicate.sh: Updated to test fixTesting
Result:
User Impact
Fixes issue reported in container where duplicate entries appeared after running:
Users will now have clean, single-entry module configs with params.
🤖 Generated with Claude Code