-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
oc start-build --from-repo now uses clone+checkout #10316
Conversation
[test] |
Recursive: true, | ||
Shallow: false, | ||
// TODO: Should we output this at a loglevel? If so, what level? | ||
Quiet: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's say loglevel 3 and above.
So I think (hope) I've proven that the code is safe to delete as is. Using the code in the original as the test case, we can show that this code runs fine.
However, it would probably still run fine if there was no code in the directory. So we change the line at 504 to On running this code, we get the same output as before:
Great, but it still may be empty and succeeding. So we move line 504 to 532, immediately after the clone, before the tar. Running this code, we get a failure:
This should be because we have deleted the content before the tar-ing takes place. @bparees ptal? |
w.Close() | ||
pw.CloseWithError(io.EOF) | ||
} | ||
transferFinished <- false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not true? (I realize you're doing nothing w/ the value, but true seems more sensible. or better still, the value of "err"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could change it to true, but the only effect that I wanted was to send a signal through to indicating that a deletion is OK. I don't think we should do error handling on the other side of the channel, because it is specifically for garbage collection.
Marking 1.4 because i don't think we want to risk this change in 1.3 at this point. |
@oatmealraisin needs a rebase |
@bparees Rebased |
select { | ||
case <-transferFinished: | ||
case <-time.After(timeout): | ||
glog.Warning("Transferring directory %q timed out after %q seconds.", clean, timeout.Seconds()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there really a need for this? the previous iteration of the code didn't worry about the timeout case. can you just move the removeAll down below where the transfer actually happens, with a flag to indicate if you should removeall (because you cloned to a tempdir) or not removeall (because you just uploaded from a dir the user specified)
[testextended][extended:core(builds)] |
[test] |
the change looks good to me, but you've been victimized by your other pull merging:
so you'll need to rework that code. |
@bparees Yep just noticed that, I'm on it |
Flake #9548 [test] |
Flake #9457, [test] |
@oatmealraisin pretty sure the extended test failure is caused by these changes, it's not a known flake. |
@bparees Yes sorry, I'm working on the Jenkins PR atm |
[test] |
Flake #11517 , [test] |
@bparees I've gotten the extended tests working, ptal? |
@bparees The code will search upwards for the root dir. I'm having trouble testing locally, don't know if this will pass, but ptal? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one nit and lgtm.
// NOTE: This actually takes the commit from the origin repository. If the | ||
// test-build-app changes, this commit has to be bumped. | ||
br, err := exutil.StartBuildAndWait(oc, "sample-build", "--commit=f0f3834", fmt.Sprintf("--from-repo=%s", exampleBuild)) | ||
gitCmd := exec.Command("git", "rev-parse", "HEAD") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do HEAD~1 so we're not just building HEAD. otherwise the git commit matching check later is suspect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would a tag be better? That way it doesn't change at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but we'd be broken if the tag went away for some reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also if someone does break this w/ a commit to origin we probably want to know
Flake #11406, [test] |
Waiting for Custom Build Strategy fix |
@oatmealraisin please squash in the meantime. |
@oatmealraisin i'm comfortable w/ merging this based on the only failure being a known issue, once you squash. |
@bparees Roger that, squashing |
This allows us to handle submodules. However, it takes up a bit more resources. This shouldn't be a problem - even the Linux kernel only took about 3 seconds to clone to another local directory.
Evaluated for origin test up to 5d22f46 |
Evaluated for origin testextended up to 5d22f46 |
[merge] |
Evaluated for origin merge up to 5d22f46 |
continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11086/) (Base Commit: 029c0dc) |
continuous-integration/openshift-jenkins/testextended FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin_extended/737/) (Base Commit: 029c0dc) (Extended Tests: core(builds)) |
Still getting hit by custom builds |
@oatmealraisin you're in the merge queue. |
and @coreydaley is working on the custom build strategy failures. |
@bparees Roger, just posting that I haven't abandoned the PR 👁️ 👁️ |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11167/) (Base Commit: 262bb72) (Image: devenv-rhel7_5321) |
This allows us to handle submodules. However, it takes up a bit more
resources. This shouldn't be a problem - even the Linux kernel only
took about 3 seconds to clone to another local directory.
Fixes #8922
@bparees @sosiouxme ptal?