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

apps: add spec commands: get and validate #852

Merged
merged 4 commits into from Sep 22, 2020

Conversation

kamaln7
Copy link
Member

@kamaln7 kamaln7 commented Sep 9, 2020

This adds two commands:

  1. doctl apps spec get <app-id> prints an app spec as YAML (default) or JSON
    • an optional deployment ID may be passed to get that specific deployment's spec
    • I added this because doctl apps get <app id> -o json | jq .[0].spec is not very convenient plus it requires jq or similar to be installed
  2. doctl apps spec validate <filename> checks whether a given app spec is valid
    • we are working on an API endpoint that validates specs beyond just checking if they're valid JSON or YAML, the plan is to use this endpoint here once it's ready
    • I didn't add integration tests because the API endpoints are covered by apps get and apps get-deployment. LMK if I should still add them

Copy link
Member

@andrewsomething andrewsomething left a comment

Looks like this is failing due to godo changes introduced in your previous PR.

I didn't add integration tests because the API endpoints are covered by apps get and apps get-deployment. LMK if I should still add them

We would definitely appreciate integration tests for new commands. We'd like to keep coverage here good. Beyond testing the endpoints, its the only real test of the UI itself.

@kamaln7
Copy link
Member Author

@kamaln7 kamaln7 commented Sep 19, 2020

Addressed the godo issues and added integration tests 👍 Also updated app spec parsing to surface the actual error

@guardrails
Copy link

@guardrails guardrails bot commented Sep 19, 2020

All previously detected findings have been fixed. Good job! 👍🎉

We will keep this comment up-to-date as you go along and notify you of any security issues that we identify.


👉 Go to the dashboard for detailed results.

📥 Happy? Share your feedback with us.

@andrewsomething andrewsomething self-requested a review Sep 22, 2020
Copy link
Member

@andrewsomething andrewsomething left a comment

LGTM!

🙏 Thanks for the tests!

@andrewsomething andrewsomething merged commit 6b5a1f9 into digitalocean:master Sep 22, 2020
2 checks passed
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