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

build-script: T3664: Allowed all options in both config file and comm… #622

Merged
merged 1 commit into from
May 17, 2024

Conversation

zdc
Copy link
Contributor

@zdc zdc commented May 15, 2024

Change Summary

Allowed all options in both config file and command args

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Component(s) name

build-script

Proposed changes

Moved defaults away from argparser to defaults.py. This unlocks the ability to pass values that can be defined as command line arguments via a config file.

With this change logic looks like this (in order of overrides).

Pre-build config:
data/defaults.toml -> build-flavors/<flavor>.toml -> --<command line argument>

Build config:
defaults.py -> data/defaults.toml -> build-types/<type>.toml -> architectures/<architecture>.toml -> build-flavors/<flavor>.toml -> --<command line argument>

How to test

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

…and args

Moved defaults away from argparser to `defaults.py`. This unlocks the ability to
pass values that can be defined as command line arguments via a config file.

With this change logic looks like this (in order of overrides).

Pre-build config:
`data/defaults.toml` -> `build-flavors/<flavor>.toml` ->
`--<command line argument>`

Build config:
`defaults.py` -> `data/defaults.toml` -> `build-types/<type>.toml` ->
`architectures/<architecture>.toml` -> `build-flavors/<flavor>.toml` ->
`--<command line argument>`
@zdc
Copy link
Contributor Author

zdc commented May 15, 2024

@dmbaturin please check if this does not break the logic you put into the build script, especially in the pre_build_config part.

@c-po c-po requested review from a team, dmbaturin, sarthurdev, jestabro, sever-sever and c-po and removed request for a team May 16, 2024 18:24
@c-po
Copy link
Member

c-po commented May 17, 2024

@Mergifyio backport sagitta

@c-po c-po merged commit be1d2fa into vyos:current May 17, 2024
4 of 5 checks passed
Copy link

mergify bot commented May 17, 2024

backport sagitta

✅ Backports have been created

zdc added a commit that referenced this pull request May 17, 2024
build-script: T3664: Allowed all options in both config file and comm… (backport #622)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants