Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): Respect owner in app.yaml during app resolution #4822

Merged
merged 2 commits into from
Jun 8, 2024

Conversation

theduke
Copy link
Contributor

@theduke theduke commented Jun 8, 2024

fix(cli): Fix app resolution - respect owner in config

The backend refactor that removed global aliases was not fully reflected
in the CLI, breaking "wasmer app get" and similar commands that all back
the reading the local app.yaml file.

This PR

  • Removes the Alias variant of AppIdent, since there conceptually are no global
    aliases anymore, just domains

  • Makes the resolution respect the owner in the config

  • Falls back to trying to get the app by name with the current user as
    the owner

  • Cleans up some related logic in the api crate

Note: we should add a way to retrieve apps by domain, but that requires additional backend support.

Closes #4818

theduke added 2 commits June 8, 2024 23:54
…Namespaces

Make the GetCurrentUser query only return a plain user without
namespaces.

Rename the current function/query to GetCurrentUserWithNamespaces,
get_current_user_with_namespaces.

This makes more sense , since the namespace query adds quite a lot of
extra work.
The backend refactor that removed global aliases was not fully reflected
in the CLI, breaking "wasmer app get" and similar commands that all back
the reading the local app.yaml file.

This commit

* Removes the `Alias` variant of AppIdent, since there conceptually are no global
  aliases anymore, just domains

* Makes the resolution respect the `owner` in the config

* Falls back to trying to get the app by name with the current user as
  the owner
@theduke theduke requested a review from syrusakbary as a code owner June 8, 2024 22:01
@syrusakbary syrusakbary merged commit 034f0f5 into main Jun 8, 2024
62 checks passed
@syrusakbary syrusakbary deleted the issue-4818-app-get-owner branch June 8, 2024 23:11
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.

CLI: "app get" app.yaml fallback only searches name, not scoped by owner
2 participants