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

feat(wash-cli): add label command to set and remove host labels #1276

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

connorsmith256
Copy link
Contributor

@connorsmith256 connorsmith256 commented Jan 3, 2024

Feature or Problem

This adds wash label as an option. It uses the put_label and delete_label control interface functions to add or remove labels

Related Issues

Resolves #692

Release Information

v0.26.0 (new feature)

Consumer Impact

Jordan is happy :)

Testing

Unit Test(s)

Acceptance or Integration

Manual Verification

Manually tested:

./target/debug/wash label damp foo=bar

Host `damp-rain-7348` labeled with `foo=bar`

wash get hosts -o json | jq -r '.hosts | .[] | .labels'
{
  "foo": "bar",
  "hostcore.arch": "aarch64",
  "hostcore.os": "macos",
  "hostcore.osfamily": "unix"
}
./target/debug/wash label damp foo --delete

Host `damp-rain-7348` unlabeled with `foo`
wash get hosts -o json | jq -r '.hosts | .[] | .labels'
{
  "hostcore.arch": "aarch64",
  "hostcore.os": "macos",
  "hostcore.osfamily": "unix"
}

Signed-off-by: Connor Smith <connor.smith.256@gmail.com>
@connorsmith256 connorsmith256 changed the title feat(wash-cli): add tag command to set and remove host labels feat(wash-cli): add label command to set and remove host labels Jan 3, 2024
Copy link
Contributor

@thomastaylor312 thomastaylor312 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go, my only question is around making sure we don't release this in wash before we cut a new host version that handles the new topic

crates/wash-lib/src/cli/label.rs Show resolved Hide resolved
@connorsmith256
Copy link
Contributor Author

@thomastaylor312 note v0.81.0 of the host added support for the .labels.[put|del] topics, so there shouldn't be a concern around releasing wash here

@connorsmith256 connorsmith256 merged commit 1ad43c4 into wasmCloud:main Jan 8, 2024
47 checks passed
@connorsmith256 connorsmith256 deleted the feat/wash-tag branch January 8, 2024 20:48
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.

[REQUEST] Runtime Host Tags
2 participants