Skip to content

Align naming conventions with AWS CLI#71

Merged
yimsk merged 9 commits intodevelopfrom
issue-65-naming-cleanup
Jan 2, 2026
Merged

Align naming conventions with AWS CLI#71
yimsk merged 9 commits intodevelopfrom
issue-65-naming-cleanup

Conversation

@yimsk
Copy link
Copy Markdown
Contributor

@yimsk yimsk commented Jan 2, 2026

Summary

  • Rename directories/packages to match AWS CLI conventions (kebab-case)
  • Fix registry names to align with AWS CLI service names
  • Fix DAO error strings and deduplicate client helpers
  • Add pseudo-ARN format documentation for Cost Explorer

Closes #65

yimsk added 8 commits January 1, 2026 09:04
Rename 7 services to match AWS CLI naming:
- computeoptimizer → compute-optimizer
- cognito → cognito-idp
- config → configservice
- costexplorer → ce
- eventbridge → events
- macie → macie2
- sfn → stepfunctions

Old names preserved as aliases for backward compatibility.

Closes #65
- Service dirs: costexplorer→ce, eventbridge→events, sfn→stepfunctions,
  cognito→cognito-idp, config→configservice, macie→macie2,
  computeoptimizer→compute-optimizer, servicequotas→service-quotas,
  licensemanager→license-manager, networkfirewall→network-firewall
- Resource dirs: hyphenate compound names (e.g., loggroups→log-groups)
- Update imports and ARN mappings

Closes #65
@claude

This comment was marked as outdated.

@claude
Copy link
Copy Markdown

claude Bot commented Jan 2, 2026

Pull Request Review - PR #71: Align naming conventions with AWS CLI

Summary

This PR successfully refactors directory and package names across the codebase to align with AWS CLI conventions using kebab-case. The changes are systematic and consistent, affecting 238 files with 381 additions and 399 deletions.


Strengths

1. Excellent Consistency

  • All directory renames follow kebab-case convention systematically
  • Error messages in DAO files updated to match new paths
  • Import paths updated comprehensively in cmd/claws/imports_custom.go

2. Good Code Quality

  • Error message improvements (e.g., new apigateway/http-apis dao vs old camelCase)
  • Proper alignment with AWS CLI service names (e.g., cognito-idp, bedrock-agent)
  • Zero logic changes - purely structural refactoring

3. Helpful Documentation

  • Pseudo-ARN format documentation added for Cost Explorer resources (custom/ce/costs/dao.go:164-166)
  • Clear comments explaining why resources don't have real ARNs

4. Code Deduplication

  • Removal of duplicate client helper functions in:
    • custom/cfn/stacks/actions.go (lines 59-74)
    • custom/cloudwatch/log-streams/actions.go (lines 58-60)
    • custom/dynamodb/tables/actions.go (lines 77-79)
  • Now properly using shared client functions from parent packages

5. CI Improvements

  • Added develop branch to CI workflow triggers (.github/workflows/ci.yml)

🔍 Observations & Minor Suggestions

1. Service Naming Alignment

The PR correctly aligns service names with AWS CLI conventions:

  • costexplorerce (matches AWS CLI)
  • cognitocognito-idp (correct service name)
  • eventbridgeevents (matches AWS CLI)
  • sfnstepfunctions (full service name)
  • configconfigservice (correct service name)

2. Import Organization

The reorganization of imports in imports_custom.go is good, with logical grouping and alphabetical ordering within groups. The Cost Explorer section was properly moved up to maintain alphabetical order.

3. Error Handling

All error messages in DAO constructors properly updated to reflect new paths, maintaining consistency with the error wrapping pattern used throughout the codebase.


🔒 Security Review

  • ✅ No security concerns identified
  • ✅ No changes to authentication/authorization logic
  • ✅ No new external dependencies
  • ✅ No changes to data handling or API calls

Performance Considerations

  • ✅ Zero performance impact - purely renaming/organizational changes
  • ✅ No changes to API calls or data processing logic
  • ✅ Client deduplication is a minor positive improvement

🧪 Test Coverage

  • The PR appears to be primarily structural refactoring
  • No test files were modified, which suggests tests reference resources by registration, not import paths (good design)
  • Recommendation: Run full test suite to verify all resource registrations work correctly with new names

📋 Recommendations

High Priority: None

All changes look good and ready to merge.

Nice to Have:

  1. Verify Build: Ensure task gen-imports was run and the generated file is correct (appears to be done)
  2. Verify Navigation: Test cross-resource navigation still works after renames
  3. Documentation Update: Consider updating any documentation that references old directory names (if any exist)

🎯 Final Verdict

✅ APPROVED - Ready to Merge

This is a well-executed refactoring PR that:

  • ✅ Follows AWS CLI naming conventions consistently
  • ✅ Maintains code quality and improves it (deduplication)
  • ✅ Has no security or performance concerns
  • ✅ Properly updates all references (imports, error messages, registrations)
  • ✅ Adds helpful documentation for pseudo-ARN format

Estimated Risk: Very Low
Type: Refactoring/Cleanup
Breaking Changes: None (internal structure only)

Great work on issue #65! This improves codebase maintainability and aligns with AWS CLI conventions. 🎉


📝 Checklist Verification

  • ✅ Code quality and best practices - Excellent
  • ✅ Potential bugs or issues - None identified
  • ✅ Performance considerations - No impact
  • ✅ Security concerns - None
  • ✅ Test coverage - Should be verified with CI

@yimsk yimsk merged commit 69a39e1 into develop Jan 2, 2026
5 checks passed
@yimsk yimsk deleted the issue-65-naming-cleanup branch January 2, 2026 03:27
yimsk added a commit that referenced this pull request Jan 2, 2026
* Align naming conventions with AWS CLI (#71)

* Align registry names with AWS CLI conventions

Rename 7 services to match AWS CLI naming:
- computeoptimizer → compute-optimizer
- cognito → cognito-idp
- config → configservice
- costexplorer → ce
- eventbridge → events
- macie → macie2
- sfn → stepfunctions

Old names preserved as aliases for backward compatibility.

Closes #65

* Fix pseudo-ARN prefix to match registry service name (ce)

* Add comment explaining pseudo-ARN format for Cost Explorer

* Rename directories to align with AWS CLI conventions

- Service dirs: costexplorer→ce, eventbridge→events, sfn→stepfunctions,
  cognito→cognito-idp, config→configservice, macie→macie2,
  computeoptimizer→compute-optimizer, servicequotas→service-quotas,
  licensemanager→license-manager, networkfirewall→network-firewall
- Resource dirs: hyphenate compound names (e.g., loggroups→log-groups)
- Update imports and ARN mappings

Closes #65

* Rename bedrock dirs to kebab-case for AWS CLI consistency

* Fix DAO error strings and deduplicate client helpers

* Fix error strings and deduplicate client helpers

* Fix package names to match directory names (events, stepfunctions)

* Add develop branch to CI triggers

* feat: propagate ALL_PROXY to HTTP_PROXY/HTTPS_PROXY (#74)

* feat: support ALL_PROXY environment variable (#69)

* feat: propagate ALL_PROXY to HTTP_PROXY and configure NO_PROXY

Extend proxy support based on issue #69 feedback:
- Propagate ALL_PROXY to both HTTP_PROXY and HTTPS_PROXY
- Auto-configure NO_PROXY for AWS credential endpoints:
  - 169.254.169.254 (EC2 IMDS)
  - 169.254.170.2 (ECS Task Role)
  - 169.254.170.23 (EKS Pod Identity)
- Preserve existing NO_PROXY entries, only add missing endpoints

Refs #69, #67

* fix: default NO_PROXY to IMDS only and remove proxy value from logs

- NO_PROXY now only includes EC2 IMDS (169.254.169.254) by default
- ECS/EKS endpoints can be added via config (TODO #67)
- Remove proxy URL from log output to avoid credential exposure

* refactor: simplify splitNoProxy and use tagged switch in parseFlags

* refactor: separate NO_PROXY config from ALL_PROXY propagation

configureNoProxy() now runs independently when any proxy is set,
not tied to ALL_PROXY propagation. Cleaner separation of concerns.

* refactor: remove lowercase env var support for simplicity

* refactor: remove NO_PROXY auto-configuration

* refactor: skip proxy propagation for --help/--version and cleanup test

* test: add test case for lowercase all_proxy not supported

* feat: add alias completion in command mode (#76)

* feat: add alias completion in command mode (#70)

Include aliases in GetSuggestions() so :cost+Tab suggests cost-explorer.
Self-referential aliases (sfn→sfn) excluded from suggestions.

* refactor: use prefix+fuzzy for diff completion

* refactor: use CutPrefix and cache GetAliases

* refactor: extract match functions to shared module

- Move fuzzyMatch and matchNamesWithFallback to match.go
- Make :tag/:tags clear behavior explicit
- Sort suggestions alphabetically (services + aliases)

* refactor: cache GetAliasesForService and sort match results

* refactor: unify command parser pattern for sort and login

* test: add cache concurrency tests and improve comments

* refactor: use CutPrefix in ecs tasks render

* refactor: use CutSuffix in parseNumericValue

* fix: quote profile name in error message for clarity

* fix: lowercase pattern in fuzzyMatch for case insensitivity

* chore: remove .claude symlink

* chore: add .claude to gitignore

* fix: lowercase pattern in matchNamesWithFallback prefix check

* fix: return defensive copy from alias cache methods
@yimsk yimsk mentioned this pull request Jan 2, 2026
yimsk added a commit that referenced this pull request Jan 2, 2026
* Align naming conventions with AWS CLI (#71)

* Align registry names with AWS CLI conventions

Rename 7 services to match AWS CLI naming:
- computeoptimizer → compute-optimizer
- cognito → cognito-idp
- config → configservice
- costexplorer → ce
- eventbridge → events
- macie → macie2
- sfn → stepfunctions

Old names preserved as aliases for backward compatibility.

Closes #65

* Fix pseudo-ARN prefix to match registry service name (ce)

* Add comment explaining pseudo-ARN format for Cost Explorer

* Rename directories to align with AWS CLI conventions

- Service dirs: costexplorer→ce, eventbridge→events, sfn→stepfunctions,
  cognito→cognito-idp, config→configservice, macie→macie2,
  computeoptimizer→compute-optimizer, servicequotas→service-quotas,
  licensemanager→license-manager, networkfirewall→network-firewall
- Resource dirs: hyphenate compound names (e.g., loggroups→log-groups)
- Update imports and ARN mappings

Closes #65

* Rename bedrock dirs to kebab-case for AWS CLI consistency

* Fix DAO error strings and deduplicate client helpers

* Fix error strings and deduplicate client helpers

* Fix package names to match directory names (events, stepfunctions)

* Add develop branch to CI triggers

* feat: propagate ALL_PROXY to HTTP_PROXY/HTTPS_PROXY (#74)

* feat: support ALL_PROXY environment variable (#69)

* feat: propagate ALL_PROXY to HTTP_PROXY and configure NO_PROXY

Extend proxy support based on issue #69 feedback:
- Propagate ALL_PROXY to both HTTP_PROXY and HTTPS_PROXY
- Auto-configure NO_PROXY for AWS credential endpoints:
  - 169.254.169.254 (EC2 IMDS)
  - 169.254.170.2 (ECS Task Role)
  - 169.254.170.23 (EKS Pod Identity)
- Preserve existing NO_PROXY entries, only add missing endpoints

Refs #69, #67

* fix: default NO_PROXY to IMDS only and remove proxy value from logs

- NO_PROXY now only includes EC2 IMDS (169.254.169.254) by default
- ECS/EKS endpoints can be added via config (TODO #67)
- Remove proxy URL from log output to avoid credential exposure

* refactor: simplify splitNoProxy and use tagged switch in parseFlags

* refactor: separate NO_PROXY config from ALL_PROXY propagation

configureNoProxy() now runs independently when any proxy is set,
not tied to ALL_PROXY propagation. Cleaner separation of concerns.

* refactor: remove lowercase env var support for simplicity

* refactor: remove NO_PROXY auto-configuration

* refactor: skip proxy propagation for --help/--version and cleanup test

* test: add test case for lowercase all_proxy not supported

* feat: add alias completion in command mode (#76)

* feat: add alias completion in command mode (#70)

Include aliases in GetSuggestions() so :cost+Tab suggests cost-explorer.
Self-referential aliases (sfn→sfn) excluded from suggestions.

* refactor: use prefix+fuzzy for diff completion

* refactor: use CutPrefix and cache GetAliases

* refactor: extract match functions to shared module

- Move fuzzyMatch and matchNamesWithFallback to match.go
- Make :tag/:tags clear behavior explicit
- Sort suggestions alphabetically (services + aliases)

* refactor: cache GetAliasesForService and sort match results

* refactor: unify command parser pattern for sort and login

* test: add cache concurrency tests and improve comments

* refactor: use CutPrefix in ecs tasks render

* refactor: use CutSuffix in parseNumericValue

* fix: quote profile name in error message for clarity

* fix: lowercase pattern in fuzzyMatch for case insensitivity

* chore: remove .claude symlink

* chore: add .claude to gitignore

* fix: lowercase pattern in matchNamesWithFallback prefix check

* fix: return defensive copy from alias cache methods
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.

1 participant