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

Refactor where/how to define and load the default value of config #1392

Closed
nghialv opened this issue Jan 12, 2021 · 0 comments · Fixed by #2003
Closed

Refactor where/how to define and load the default value of config #1392

nghialv opened this issue Jan 12, 2021 · 0 comments · Fixed by #2003
Labels
kind/enhancement New feature or request
Projects

Comments

@nghialv
Copy link
Member

nghialv commented Jan 12, 2021

What would you like to be added:

Currently, we are not having a unified way to define and load the default value.
Some of them are

  • defined in the packages where they are used
  • defined in the config package and loaded via Validate function
  • defined in the config package and loaded via UnmarshalJSON function

So it is time for us to decide where to define and how to configure the default value of our config.
IMO I think all of them should be defined in the config package (as public consts) and loaded when the configuration is parsed. So the comment about the default value is the same in that package too. The docs refer to them too.

It would be nice if we can define the default value by go tag (as JSON tag). There are some libs for doing that thing but still not found a good enough one.

Why is this needed:

@nghialv nghialv added the kind/enhancement New feature or request label Jan 12, 2021
@nghialv nghialv added this to Future in ROADMAP via automation Jan 12, 2021
@nghialv nghialv moved this from Future to v1.0.0 in ROADMAP Jan 12, 2021
@nghialv nghialv moved this from v1.0.0 to Next in ROADMAP Jan 12, 2021
@nghialv nghialv moved this from Next to Future in ROADMAP Feb 5, 2021
ROADMAP automation moved this from Future to DONE May 26, 2021
pipecd-bot pushed a commit that referenced this issue May 26, 2021
**What this PR does / why we need it**:

**Which issue(s) this PR fixes**:

Fixes #1392

**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
-->
```release-note
NONE
```

This PR was merged by Kapetanios.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
No open projects
ROADMAP
  
DONE
Development

Successfully merging a pull request may close this issue.

1 participant