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

[installer] Add config validation #6265

Merged
merged 1 commit into from
Oct 21, 2021
Merged

Conversation

mrsimonemms
Copy link
Contributor

Description

Validate the given configuration

Related Issue(s)

Fixes #6102

How to test

go run . validate config --config /path/to/config.yaml

This also can be done with go run . render --config /path/to/config.yaml

Release Notes

Installation config validation

Documentation

@mrsimonemms
Copy link
Contributor Author

I've decided to keep validating the database/object store until after I've got these connecting to GCP, which is my next job

@mrsimonemms
Copy link
Contributor Author

/assign @csweichel

installer/pkg/config/v1/validation.go Show resolved Hide resolved
installer/pkg/config/v1/config.go Show resolved Hide resolved
installer/cmd/validate_config.go Outdated Show resolved Hide resolved
@princerachit
Copy link
Contributor

I am seeing an error while running the command:

gitpod /workspace/gitpod/installer $ go run . -v validate config --config example-config.yaml 
Error: unknown command "config" for "gitpod-installer"
Run 'gitpod-installer --help' for usage.
Error: unknown command "config" for "gitpod-installer"
exit status 1

@mrsimonemms
Copy link
Contributor Author

@princerachit Replace go run . -v validate config --config example-config.yaml with go run . validate config --config example-config.yaml - there's a -v in there that's breaking things for you (I think)

@princerachit
Copy link
Contributor

/lgtm

@roboquat roboquat added the lgtm label Oct 19, 2021
@roboquat
Copy link
Contributor

LGTM label has been added.

Git tree hash: 87815dad1231ba9e4aa8976158f614423c626487

@princerachit princerachit changed the title Sje/installer validate config [installer] Add config validation Oct 19, 2021
@roboquat roboquat removed the lgtm label Oct 19, 2021
This includes some refactoring of the render command as the config validation and render commands share
some of the same principles.
@codecov
Copy link

codecov bot commented Oct 20, 2021

Codecov Report

Merging #6265 (35380f0) into main (7623c5f) will decrease coverage by 2.13%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##            main   #6265      +/-   ##
========================================
- Coverage   8.21%   6.08%   -2.14%     
========================================
  Files         12      10       -2     
  Lines       1022     854     -168     
========================================
- Hits          84      52      -32     
+ Misses       934     800     -134     
+ Partials       4       2       -2     
Flag Coverage Δ
components-local-app-app-linux-amd64 ?
components-local-app-app-linux-arm64 ?
components-local-app-app-windows-386 ?
components-local-app-app-windows-amd64 ?
components-local-app-app-windows-arm64 ?
installer-app 6.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
components/local-app/pkg/auth/pkce.go
components/local-app/pkg/auth/auth.go

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7623c5f...35380f0. Read the comment docs.

@csweichel
Copy link
Contributor

/lgtm

@roboquat roboquat added the lgtm label Oct 21, 2021
@roboquat
Copy link
Contributor

LGTM label has been added.

Git tree hash: c040def9fb4b18ed23989477a4e4e336f4b62d57

@roboquat
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: csweichel, princerachit

Associated issue: #6102

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@roboquat roboquat merged commit 8629395 into main Oct 21, 2021
@roboquat roboquat deleted the sje/installer-validate-config branch October 21, 2021 14:10
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note size/XL team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[installer] Validate configuration
4 participants