Skip to content

Conversation

@mkenigs
Copy link
Contributor

@mkenigs mkenigs commented Dec 13, 2021

These functions will be needed by both
#2802
and
#2851
so adding them here to avoid merge conflicts later

Moved/renamed newFile -> NewIgnFile

@openshift-ci openshift-ci bot requested review from jkyros and yuqi-zhang December 13, 2021 20:11
@mkenigs mkenigs force-pushed the helpers branch 2 times, most recently from 5c4ae4c to 3dc07fc Compare December 13, 2021 20:38
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sinnykumari @jkyros I think the conclusion from the thread on John's PR was to leave the debug statements in. Are we wanting to keep or remove the comment?

Copy link
Member

Choose a reason for hiding this comment

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

I think I'd vote for having the caller log the diff as a whole, which could be done more easily with the above change of returning a struct.

Copy link
Contributor

Choose a reason for hiding this comment

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

Returning struct with diff would be much better.

These functions will be needed by both
openshift#2802
and
openshift#2851
so adding them here to avoid merge conflicts later

Moved/renamed newFile -> NewIgnFile

// CalculateConfigFileDiffs compares the files present in two ignition configurations and returns the list of files
// that are different between them
func CalculateConfigFileDiffs(oldIgnConfig, newIgnConfig *ign3types.Config) []string {
Copy link
Member

Choose a reason for hiding this comment

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

WDYT about returning a struct type with the diff that distinguishes add/remove/modify?

This is like https://github.com/coreos/bootupd/blob/499e2af364dee4bbc9811c62ddfd001b4686cd9d/src/filetree.rs#L46

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we need that info somewhere in MCO?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could use it for isDrainRequired (see #2851)

Copy link
Contributor

Choose a reason for hiding this comment

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

This can be at least useful to log messages by caller instead of doing it here,in the context of https://github.com/openshift/machine-config-operator/pull/2870/files#r768161851

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jkyros wdyt? Time to pull out the howitzer or not?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think given this is needed for #2851 which I think we want to get in before Friday, it might be better to fix this later if we decide it's worth it

Copy link
Member

Choose a reason for hiding this comment

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

I think we end up having to someday, but that day doesn't necessarily have to be today if there are timeline concerns.

Copy link
Contributor

Choose a reason for hiding this comment

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

sure, let's create a card for this in Jira so that someone pick this up later on.

Copy link
Member

Choose a reason for hiding this comment

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

I think I'd vote for having the caller log the diff as a whole, which could be done more easily with the above change of returning a struct.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 14, 2021

@mkenigs: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-single-node e197c8b link false /test e2e-aws-single-node
ci/prow/e2e-aws-disruptive e197c8b link false /test e2e-aws-disruptive
ci/prow/e2e-aws-upgrade-single-node e197c8b link false /test e2e-aws-upgrade-single-node
ci/prow/e2e-vsphere-upgrade e197c8b link false /test e2e-vsphere-upgrade

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Contributor

@sinnykumari sinnykumari left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

@sinnykumari sinnykumari left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 15, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 15, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mkenigs, sinnykumari

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

The pull request process is described here

Details 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 15, 2021
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

3 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@sinnykumari
Copy link
Contributor

/skip

@mkenigs
Copy link
Contributor Author

mkenigs commented Dec 15, 2021

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 15, 2021
@mkenigs
Copy link
Contributor Author

mkenigs commented Dec 15, 2021

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 15, 2021
@openshift-merge-robot openshift-merge-robot merged commit a0fd736 into openshift:master Dec 15, 2021
mkenigs added a commit to mkenigs/machine-config-operator that referenced this pull request Dec 15, 2021
If a config change does not contain changes to registries.conf, don't
apply checks specific to registries.conf

Also start using helper functions added in
openshift#2870
@mkenigs mkenigs deleted the helpers branch March 18, 2022 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants