Stack List prefers remote stacks, but Get prefers local

Open
#2,120 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
64/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go
Domain
cli

Research direction

Start in src/pkg/stacks/manager.go at the linked Load method, then trace getSpecifiedStack and the implementation behind defang stack ls. Confirm how local files and the remote Fabric database are selected, and update the behavior so local stack data consistently overrides remote data across listing, loading, and specified-stack lookup.

Written by the indexing model from the issue text.

Description

DX

Since https://github.com/DefangLabs/defang-mvp/issues/2655 defang stack ls overwrites any info from local stack files with the info from the remote (fabric) DB.

But when deploying, the Load method loads local stack files, and only checks remote when file loading fails. https://github.com/DefangLabs/defang/blob/3968770a545dd22c679c9c81948d7676c1edb454/src/pkg/stacks/manager.go#L153

Similarly, getSpecifiedStack also read local stack first, and remote on os.IsNotExist.

IMHO, local files should override remote (to ensure users have a way to override).

Dominant language
Go
Stars
166
Forks
24
Avg merge
10h 8m
Merged PRs (30d)
33

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DefangLabs/defang

All issues in DefangLabs/defang

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.