Skip to content

Conversation

@smarterclayton
Copy link
Contributor

@smarterclayton smarterclayton commented Jan 23, 2019

The cvo package is getting a bit full. In preparation for parallel payload processing where we want to have a readable graph processor, move payload related functions into their own package. The syncTask struct is renamed to payload.Task. Code movement, a few structs are made public purely for the ability to use diff.ObjectReflectDiff on them in testing.

Extracted from #88 to make it easier to change the applier function.

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 23, 2019
return nil
}

var (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These will only reside in sync_worker until the graph iterator (pulling chunks of work from the payload graph and executing in parallel) is added.

@smarterclayton
Copy link
Contributor Author

@abhinavdahiya I know this looks scary, wanted to split it now (mostly) before I play with a different parallel execution

@abhinavdahiya
Copy link
Contributor

@abhinavdahiya I know this looks scary, wanted to split it now (mostly) before I play with a different parallel execution

👻 I just couldn't get to it today, was busy with some other work. I'll take a look at this tomorrow first thing

@smarterclayton
Copy link
Contributor Author

smarterclayton commented Jan 25, 2019 via email

@smarterclayton
Copy link
Contributor Author

/retest

errs = append(errs, errors.Wrapf(err, "error parsing %s", file.Name()))
continue
}
for _, m := range ms {
Copy link
Contributor

@abhinavdahiya abhinavdahiya Jan 25, 2019

Choose a reason for hiding this comment

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

nit: so a bunch of manifests will have the same name... can we add that as comment to Name field like please do not use it to dedup or as a map key.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, maybe it should be OriginalFilename

if image == nil || !equalUpdate(configv1.Update{Image: image.ReleaseImage}, update) {
glog.V(4).Infof("Loading image")
// cache the payload until the release image changes
validPayload := w.payload
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this change s/image/validPayload/ seems to reverse the idea from #98

Copy link
Contributor

Choose a reason for hiding this comment

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

nvm, i think it is to keep up with package name pkg/payload.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I did a find and replace before, but went back to being it here to have payload be the internals.

@abhinavdahiya
Copy link
Contributor

The refactor in d14c401 looks a good one-to-one move with no major changes to behavior.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 25, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, smarterclayton

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:
  • OWNERS [abhinavdahiya,smarterclayton]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@abhinavdahiya
Copy link
Contributor

/hold

for #97 (comment)

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 25, 2019
The cvo package is getting a bit full. In preparation for parallel
payload processing where we want to have a readable graph processor
move payload related functions into their own package. The syncTask
struct is renamed to payload.Task.

Record the filename of the manifest when read and store it on Task
for reference in debugging and parallelization.
@smarterclayton
Copy link
Contributor Author

Updated with comment (move to OriginalFilename and add a comment).

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Jan 25, 2019
@openshift-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@smarterclayton
Copy link
Contributor Author

Integration test was broken by rebase, I'll disable it until there is a working fix.

@smarterclayton
Copy link
Contributor Author

/retest

2 similar comments
@smarterclayton
Copy link
Contributor Author

/retest

@smarterclayton
Copy link
Contributor Author

/retest

@smarterclayton
Copy link
Contributor Author

/test integration

@smarterclayton
Copy link
Contributor Author

/test integration

@smarterclayton
Copy link
Contributor Author

/retest

@smarterclayton smarterclayton added lgtm Indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jan 27, 2019
@openshift-merge-robot openshift-merge-robot merged commit 2619c68 into openshift:master Jan 27, 2019
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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants