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(repair): allow users to repair environments #241

Merged
merged 6 commits into from
Feb 2, 2022

Conversation

jayjayjpg
Copy link
Contributor

@jayjayjpg jayjayjpg commented Feb 1, 2022

Description of change

Closes #184

This adds the meroxa environment repair command to the CLI.

Type of change

  • New feature
  • Bug fix
  • Refactor
  • Documentation

How was this tested?

  • Unit Tests
  • Tested in staging

Demo

Staging

|meroxa-repair-error
meroxa-repair-success|

Locally

meroxa-repair-locally

Blockers

  • wrap up unit tests until CI passes
  • add a follow-up PR for documentation updates
  • integration test the feature locally
  • merge https://github.com/meroxa/meroxa-go/pull/92
  • test the feature branch in staging
  • vendor in latest meroxa-go and remove mod link to local repository

Additional references

Related to https://github.com/meroxa/platform-api/pull/811
Related to https://github.com/meroxa/meroxa-go/pull/92

Environment Implementation Plan (CLI): https://www.notion.so/meroxa/Environment-Implementation-Plan-Stage-2-60970cbce0a44c2b9095c0fea4172a69#7bc7dded7ae44b4e9fcd6e27ad189bba
Environment Implementation Plan (Client-API): https://www.notion.so/meroxa/Environment-Implementation-Plan-Stage-2-60970cbce0a44c2b9095c0fea4172a69#261d954133834d088323bfa6867375c1

Documentation updated

Since the feature is still hidden, this change does not include any doc updates.

@jayjayjpg jayjayjpg force-pushed the jj/save-the-environment branch 3 times, most recently from 67e244f to 8c09954 Compare February 1, 2022 16:34
@jayjayjpg jayjayjpg marked this pull request as ready for review February 1, 2022 16:37
}

func (r *Repair) Execute(ctx context.Context) error {
rr, err := r.client.PerformActionOnEnvironment(ctx, r.args.NameOrUUID, &meroxa.RepairEnvironmentInput{Action: "repair"})
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
rr, err := r.client.PerformActionOnEnvironment(ctx, r.args.NameOrUUID, &meroxa.RepairEnvironmentInput{Action: "repair"})
rr, err := r.client.PerformActionOnEnvironment(ctx, r.args.NameOrUUID, &meroxa.RepairEnvironmentInput{Action: meroxa. EnvironmentActionRepair})

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great catch and I updated this accordingly!

cmd/meroxa/root/environments/repair.go Outdated Show resolved Hide resolved
@jayjayjpg jayjayjpg merged commit f52bcf0 into master Feb 2, 2022
@jayjayjpg jayjayjpg deleted the jj/save-the-environment branch February 2, 2022 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

meroxa env repair my-env
3 participants