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

go/control: Add runtime provisioner type to host status output #5301

Merged
merged 1 commit into from Jul 3, 2023

Conversation

abukosek
Copy link
Contributor

@abukosek abukosek commented Jul 3, 2023

This PR adds the runtime provisioner type to the status output.

@abukosek abukosek force-pushed the andrej/feature/status-rt-prov branch from 1e417d2 to db82eb1 Compare July 3, 2023 11:10
@abukosek abukosek marked this pull request as ready for review July 3, 2023 11:32
Copy link
Contributor

@peternose peternose left a comment

Choose a reason for hiding this comment

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

{
  "runtimes": {
    "8000000000000000000000000000000000000000000000000000000000000000": {
      "provisioner": "sandbox"
    }
  },
}

👍

if provisioner != nil {
status.Provisioner = provisioner.Name()
} else {
status.Provisioner = "none"
Copy link
Contributor

Choose a reason for hiding this comment

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

		switch {
		case err != nil:
			n.logger.Error("failed to fetch host configuration",
				"err", err,
			)
		case provisioner != nil:
			status.Provisioner = provisioner.Name()
		default:
			status.Provisioner = "none"
		}

Could also use an empty string, as the comment says this is the name of the provisioner.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think "none" is a bit more user-friendly in this case :)

@abukosek abukosek force-pushed the andrej/feature/status-rt-prov branch from db82eb1 to 113f082 Compare July 3, 2023 11:57
@abukosek abukosek merged commit 337354b into master Jul 3, 2023
3 checks passed
@abukosek abukosek deleted the andrej/feature/status-rt-prov branch July 3, 2023 12:16
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.

None yet

2 participants