You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@yetus.apache.org by "Sean Busbey (JIRA)" <ji...@apache.org> on 2018/08/17 18:24:00 UTC
[jira] [Commented] (YETUS-646) curl grabbed the wrong patch
[ https://issues.apache.org/jira/browse/YETUS-646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584250#comment-16584250 ]
Sean Busbey commented on YETUS-646:
-----------------------------------
It looks like the current jira plugin logic expressly is trying to follow the behavior described. Namely, "go through each attachment listed and get the first one we can successfully curl"
{code}
while read -r relativeurl && [[ ${found} = false ]]; do
PATCHURL="${JIRA_URL}${relativeurl}"
printf " %s -> " "${PATCHURL}"
jira_http_fetch "${relativeurl}" "${fileloc}"
retval=$?
if [[ ${retval} == 0 ]]; then
found=true
echo "Downloaded"
elif [[ ${retval} == 22 ]]; then
echo "404"
else
echo "Error (curl returned ${retval})"
fi
done < <(cat "${PATCH_DIR}/jira-attachments.txt")
if [[ "${found}" = false ]]; then
yetus_error "ERROR: ${input} could not be downloaded."
cleanup_and_exit 1
fi
{code}
This was from YETUS-298, presumably because a delete between us fetching the list and downloading gets us a 404.
Barring objection, I'll keep that same behavior in the case of a 404 but bail out if it's any other error code.
> curl grabbed the wrong patch
> ----------------------------
>
> Key: YETUS-646
> URL: https://issues.apache.org/jira/browse/YETUS-646
> Project: Yetus
> Issue Type: Bug
> Components: Test Patch
> Reporter: Allen Wittenauer
> Assignee: Sean Busbey
> Priority: Critical
>
> This should never ever happen:
> {code}
> $ smart-apply-patch --committer YETUS-642 --plugins=all
> Processing: YETUS-642
> YETUS-642 patch is being downloaded at Thu Jul 26 09:15:56 PDT 2018 from
> https://issues.apache.org/jira/secure/attachment/12932466/YETUS-642.01.patch -> Error (curl returned 35)
> https://issues.apache.org/jira/secure/attachment/12932465/YETUS-642.00.patch -> Downloaded
> Applying the patch:
> Thu Jul 26 09:15:57 PDT 2018
> cd /Users/aw/shared-vmware/yetus
> git am --signoff --whitespace=fix -p1 /tmp/yetus-5194.3382/patch
> Applying: YETUS-642. reaper generated shelldocs output is busted
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)