Skip to content

refactor: wave 4 - consolidate duplicates, centralize parsing, extract helpers#279

Merged
jongio merged 1 commit into
mainfrom
swarm/wave-4-refactoring
May 19, 2026
Merged

refactor: wave 4 - consolidate duplicates, centralize parsing, extract helpers#279
jongio merged 1 commit into
mainfrom
swarm/wave-4-refactoring

Conversation

@jongio
Copy link
Copy Markdown
Owner

@jongio jongio commented May 19, 2026

Wave 4: Refactoring

Issues Resolved

Code Smell Fixes (#274)

  • Consolidate ServiceInfo: Reduced duplication across 5 files by importing from canonical \serviceinfo\ package
  • Centralize azure.yaml parsing: Route callers through \service.ParseAzureYaml\ instead of independent \yaml.Unmarshal\ calls
  • DetectedProjects struct: Replace 3-parameter data clump (
    odeProjects, \pythonProjects, \dotnetProjects) with a single struct
  • Extract runReqsFix: Break 205-line function into \parseReqs, \checkPrerequisite, \�nsureDockerReq\ helpers
  • Replace parallel switches: Convert \getServiceFilterColumn/\getMessageColumn\ parallel switch statements into a single \ ableConfig\ map

Architecture Fixes (#265, bounded scope)

  • Extract shared conversion: Move duplicated \convertAzureLogLevelToService\ to \internal/common/loglevel.go\
  • Remove global state: Make \cmdOrchestrator\ in \core.go\ injectable instead of package-level mutable

Deferred (too risky for automated changes)

  • Breaking up god packages (service/, dashboard/)
  • Adding interfaces to major abstractions
  • Filesystem abstraction layer
  • Full dashboard-service decoupling

Closes #274, #265

…t helpers

Code smells (#274):
- Reduce ServiceInfo duplication across 5 files
- Centralize azure.yaml parsing via service.ParseAzureYaml
- Introduce DetectedProjects struct for 3-parameter data clump
- Extract runReqsFix into cohesive helper methods
- Replace parallel switch statements in query_builder.go with config map

Architecture (#265):
- Extract shared Azure log level conversion to eliminate duplication
- Remove global mutable cmdOrchestrator, make injectable

Closes #274, #265

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jongio jongio force-pushed the swarm/wave-4-refactoring branch from 32ced2a to b4dcc84 Compare May 19, 2026 17:26
@jongio jongio merged commit 18700ad into main May 19, 2026
7 of 13 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.

code smell detection: findings for azd-app

1 participant