Skip to content

merge with develop when using --from-pr#1838

Merged
boegel merged 7 commits intoeasybuilders:developfrom
Caylo:fix-from-pr-issue1292
Aug 5, 2016
Merged

merge with develop when using --from-pr#1838
boegel merged 7 commits intoeasybuilders:developfrom
Caylo:fix-from-pr-issue1292

Conversation

@Caylo
Copy link
Copy Markdown
Contributor

@Caylo Caylo commented Jul 8, 2016

@boegel boegel added this to the v2.9.0 milestone Jul 8, 2016
Comment thread easybuild/tools/github.py Outdated
try:
pr = int(pr)
except ValueError:
raise EasyBuildError("PR number is not an integer")
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.

include pr (as a value) in the error message

@boegel
Copy link
Copy Markdown
Member

boegel commented Jul 8, 2016

@Caylo I briefly discussed this with @wpoely86, and he made a good point that we shouldn't just try to blindly apply the patch and fall back to using the PR branch as is, since we can actually check whether it makes sense to try and apply the patch...

If the PR is not merged yet, applying the patch to develop should work; if not, it means the PR is broken due to a conflict with develop, in which case it's OK to 'fail'. You can even detect the latter via the GitHub API too.

If the PR is already merged, there's no point in trying to apply the patch to develop at all, so then you could fall back to using the files in the PR as-is. Or we could (try to) use the latest version from develop instead (but maybe not by default).

Long story short: this needs a bit more thought... :)

@wpoely86
Copy link
Copy Markdown
Member

wpoely86 commented Jul 8, 2016

  • Merged -> develop downloaden
  • Open & Mergeable -> develop + patch
  • Other: files in PR downloaden (like current) + big fat warning

Comment thread easybuild/tools/filetools.py Outdated

if not result:
raise EasyBuildError("Patching with patch %s failed", patch_file)
raise EasyBuildError("Couldn't apply patch")
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.

keep mentioning name of patch file, and maybe also grab the output from the patch command and include it in the error message (you'll need to use simple=False in run_cmd and do out, ec = run_cmd(...)

Comment thread easybuild/tools/filetools.py Outdated
out, ec = run.run_cmd(patch_cmd, simple=False, path=adest, log_ok=False)

if ec:
raise EasyBuildError("Couldn't apply patch file %s. Process exited with code %s: %s", patch_file, out, result)
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.

result is undefined here?

this points out that the tests should be enhanced to check for a failing patch, which should raise this error (rather than a traceback)

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.

3 participants