Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

ConfigGetRequest should support exact name instead of only prefix #4760

Open
briancain opened this issue Jun 1, 2023 · 0 comments
Open

ConfigGetRequest should support exact name instead of only prefix #4760

briancain opened this issue Jun 1, 2023 · 0 comments
Labels
bug Something isn't working core jira Will add an Issue to Jira

Comments

@briancain
Copy link
Member

Describe the bug

Currently our ConfigGetRequest only supports looking up config variables by a prefix. If the prefix matches multiple config vars, it returns them all. There's no way to look up a specific config var only.

message ConfigGetRequest {
// scope is the scoping for this config variable. This describes the
// target environment requesting configuration. For runners, this may still
// be set if you are an on-demand runner requesting variables that may be
// set for runners only in a specific project/app.
oneof scope {
Ref.Application application = 2;
// For project scope, for historical reason, we return all matching
// config vars (for all apps). We do not merge by name or perform
// resolution logic. This is how this has always behaved.
Ref.Project project = 3;
}
// Runner is specified if the requesting environment is a runner environment.
Ref.RunnerId runner = 4;
// Workspace that the target environment is in. This will limit configuration
// values to those that are only for this workspace. If this isn't set, all
// configuration values will be returned.
Ref.Workspace workspace = 5;
// Labels that are set in the target environment. This will limit the
// configuration values to those which have label selectors that match (or
// those that just ignore labels).
map<string, string> labels = 6;
// Get all configuration entries under the given prefix. When empty,
// returns all config variables.
string prefix = 1;
}

// Get all configuration entries under the given prefix. When empty,
// returns all config variables.
string prefix = 1;

This might be surprising behavior if a user knows exactly what they want to look up and they aren't interested in prefix matching for all cases.

Steps to Reproduce

  • Create some config vars that start with the same string
  • Call waypoint config get my-prefix where my-prefix is the same string prefix that you set
  • See them all returned (this is currently by design)

Expected behavior

I imagine it might be nice to for this endpoint to have an exact lookup rather than a prefix.

Waypoint Platform Versions
Additional version and platform information to help triage the issue if
applicable:

  • Waypoint CLI Version:
  • Waypoint Server Platform and Version: (like docker, nomad, kubernetes)
  • Waypoint Plugin: (like aws/ecs, pack, azure)

Additional context
Add any other context about the problem here.

@briancain briancain added bug Something isn't working core new jira Will add an Issue to Jira labels Jun 1, 2023
@cicoyle cicoyle removed the new label Jun 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working core jira Will add an Issue to Jira
Projects
None yet
Development

No branches or pull requests

2 participants