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

Do not require config.yml #508

Merged
merged 5 commits into from
Jun 15, 2020
Merged

Conversation

mtojek
Copy link
Contributor

@mtojek mtojek commented Jun 15, 2020

Changes:

  • do not require config.yml to be present
  • update Dockerfile
  • remove config.yml from the repository

@mtojek mtojek requested a review from ruflin June 15, 2020 10:42
@mtojek mtojek self-assigned this Jun 15, 2020
@elasticmachine
Copy link

elasticmachine commented Jun 15, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #508 updated]

  • Start Time: 2020-06-15T11:27:35.281+0000

  • Duration: 8 min 27 sec

main.go Show resolved Hide resolved
@@ -114,16 +116,18 @@ func main() {

func getConfig() (*Config, error) {
cfg, err := ucfgYAML.NewConfigWithFile(configPath)
if os.IsNotExist(err) {
return &defaultConfig, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a log message here that the default configs are used as no config was found?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

config.yml Outdated
@@ -1,5 +0,0 @@
public_dir: "./public"
Copy link
Contributor

Choose a reason for hiding this comment

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

I would still like to keep this one to show users what configs are there. It is also part documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about config.reference.yml?

Copy link
Contributor

Choose a reason for hiding this comment

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

++. Should we fall back to it or just have it there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There won't be any config.yml by default as it's not required, but there is will be a config.reference.yml if users would like to preview the configuration file.

Copy link
Contributor

Choose a reason for hiding this comment

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

SGTM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@mtojek mtojek requested a review from ruflin June 15, 2020 11:23
@mtojek mtojek merged commit c467efb into elastic:master Jun 15, 2020
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.

3 participants