Skip to content

Change default cosa --strict parameter#58

Merged
jlebon merged 1 commit intocoreos:masterfrom
ravanelli:fcosBuild
Dec 7, 2020
Merged

Change default cosa --strict parameter#58
jlebon merged 1 commit intocoreos:masterfrom
ravanelli:fcosBuild

Conversation

@ravanelli
Copy link
Copy Markdown
Member

In order to be more flexible across the CIs
remove the --strict default option. And let
who is calling it define the parameters.
We have cases where we don't want to use
--strict.

Signed-off-by: Renata Ravanelli rravanel@redhat.com


def extraFetchArgs = params.get('extraFetchArgs', "");
shwrap("cd ${cosaDir} && cosa fetch --strict ${extraFetchArgs}")
def extraFetchArgs = params.get('extraFetchArgs', "--strict");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think normally you do always want strict mode turned on in CI because it ensures that the lockfiles are the complete sources of truth (see coreos/rpm-ostree#1858 and coreos/fedora-coreos-tracker#454). Essentially, non-strict mode is useful mostly for the developer case.

In the case of RHCOS, which doesn't use lockfiles yet, using cosa {fetch,build} --strict should have no effect.

That said, it does make sense to make this configurable to be flexible (and e.g. allow developers to hack up the manifest quickly and fire up a Jenkins job for it).

Instead of putting this in extraFetchArgs and extraArgs, and potentially having callers which already use these lose the --strict arg, WDYT about adding a new strict bool instead which defaults to true?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for the overview @jlebon ;)

Copy link
Copy Markdown
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

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

Minor bikeshed, otherwise LGTM! :)

// Available parameters:
// make: boolean -- run `make && make install DESTDIR=...`
// skipInit: boolean -- assume `cosa init` has already been run
// skipStrict boolean -- do not run cosa using `--strict' option
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmm, skip... so far has been about skipping executing some steps. If you prefer the "default to false" semantics, I think this is closer to noForce -- how about calling this noStrict to match it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

aaa good point. Fixed!

In order to be more flexible across the CIs
remove the `--strict` default option. And let
who is calling it define the parameters.
We have cases where we don't want to use
`--strict`.

Signed-off-by: Renata Ravanelli <rravanel@redhat.com>
@jlebon jlebon merged commit 14bbbfe into coreos:master Dec 7, 2020
@ravanelli ravanelli deleted the fcosBuild branch March 18, 2021 16:41
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.

2 participants