Newly initialised servers don't show upp in abra app new #166

Closed
opened 2021-09-14 13:10:54 +00:00 by knoflook · 0 comments
Owner

Describe the current behavior

only servers that have at least one app created show up when trying to create a new app.

Steps to reproduce

abra server add domain.tld
abra server init domain.tld
abra app new appname
(domain.tld doesn't appear as one of the servers)

Describe the expected behavior

the newly added server should show up

Additional information

  • version: 0.1.2-alpha-719e24e

I believe this is the problem:

func ensureServerFlag() error {
	appFiles, err := config.LoadAppFiles(newAppServer)
	if err != nil {
		return err
	}
	servers := appFiles.GetServers()
    [...]

because first we are loading all app files and then loading all servers to which those apps belong. If you have no apps on a server it won't be loaded.

## Describe the current behavior only servers that have at least one app created show up when trying to create a new app. ## Steps to reproduce `abra server add domain.tld` `abra server init domain.tld` `abra app new appname` (domain.tld doesn't appear as one of the servers) ## Describe the expected behavior the newly added server should show up ## Additional information - version: 0.1.2-alpha-719e24e I believe [this](https://git.coopcloud.tech/coop-cloud/abra/src/commit/f93563588aaa98a94835c87f8ea6b6a5fdfdbbc7/cli/app/new.go#L110) is the problem: ``` func ensureServerFlag() error { appFiles, err := config.LoadAppFiles(newAppServer) if err != nil { return err } servers := appFiles.GetServers() [...] ``` because first we are loading all app files and then loading all servers to which those apps belong. If you have no apps on a server it won't be loaded.
knoflook added the
bug
abra
labels 2021-09-14 13:10:55 +00:00
decentral1se added this to the Command-line tool sustainability milestone 2021-09-14 14:29:10 +00:00
decentral1se changed title from newly initialised servers don't show upp in abra app new to Newly initialised servers don't show upp in abra app new 2021-09-14 14:29:27 +00:00
decentral1se referenced this issue from a commit 2021-09-16 07:26:37 +00:00
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/organising#166
No description provided.