-
Notifications
You must be signed in to change notification settings - Fork 21
404 Not Found when external PR built on AppVeyor due to incorrect documentation #76
Comments
I see that it uses an invalid branch name for the url, and I noticed you are setting the branch name yourself in the cake build script here: https://github.com/chroma-sdk/Colore/blob/develop/build.cake#L358 (which ends up being I believe this is the cause of the failure. Btw, you should not need to set the branch name yourself when you are running on appveyor (yes I know there was an issue in the past that required to do that, but that bug should have been fixed). |
Ah, thanks. I'll test without an explicit branch set and see if it resolves
it.
…On Mon, 15 Jul 2019, 08:18 Kim J. Nordmo, ***@***.***> wrote:
I see that it uses an invalid branch name for the url, and I noticed you
are setting the branch name yourself in the cake build script here:
https://github.com/chroma-sdk/Colore/blob/develop/build.cake#L358 (which
ends up being pull/267/merge on the PR, this needs to be the base branch
getting merged into).
I believe this is the cause of the failure. Btw, you should not need to
set the branch name yourself when you are running on appveyor (yes I know
there was an issue in the past that required to do that, but that bug
should have been fixed).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#76?email_source=notifications&email_token=AAEGRNUIPZHFHURWXGNXQEDP7QJEJA5CNFSM4IDR2WZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ4ZQUY#issuecomment-511285331>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEGRNT7ZA3UI5R6S5OK43DP7QJEJANCNFSM4IDR2WZA>
.
|
👍 Please do keep me posted, the problem could be elsewhere, but that is the only thing I could see that could cause the problem. |
The problem seems to persist even when letting the branch be detected automatically. This AppVeyor build works correctly (non-PR build with the explicit branch setting removed). This AppVeyor build still fails, even though the branch name now resolves to the same as in the working build. |
@Sharparam I see now that you are not using the latest version of Codecov-exe, so the first thing I would recommend is to update the version used to While I don't think I have fixed any bugs that will help with this, it is better to make sure. However, what I actually think is the problem is that I am not correctly encoding the branch name value, which then causes codecov.io to return a 404 response code. I will put together a build with that assumption when I get home later today (will be around 8-9 hours until I can). |
Thought for sure I had upgraded to 1.7.0, but evidently not. Updating that now and waiting for a rebased PR to see if it changes anything. If the issue is the branch name encoding, then shouldn't the same issue happen on my regular |
Updating to 1.7.0 seems to not make it run at all: https://ci.appveyor.com/project/chroma-sdk/colore/builds/26394710 With an error: "The specified executable is not a valid application for this OS platform." |
Oh right, I have completely forgotten to update the Cake.Codecov addin with the new paths. Ever since version 1.6.0 the normal package also includes Linux and OSX binaries, and the (yet to be updated) version of Cake.Codecov is incorrectly picking up the linux or osx binaries before the windows binary. You can work around that until I can get the addin updated by passing in the path to the exe yourself. Like this for instance: var ccVersion = $"{version.FullSemVer}.build.{BuildSystem.AppVeyor.Environment.Build.Version}";
Information("Running Codecov tool with version {0} on OpenCover result", ccVersion);
var codecovPath = Context.Tools.Resolve("codecov.exe");
Codecov(new CodecovSettings
{
Files = new[] { "./artifacts/opencover-results.xml" },
Required = true,
////Branch = version.BranchName,
EnvironmentVariables = new Dictionary<string, string>
{
["APPVEYOR_BUILD_VERSION"] = ccVersion
},
Verbose = true,
ToolPath = codecovPath
}); I am sorry about that, I completely forgot to update the addin. EDIT: Issue tracking the status of Cake addin is here: cake-contrib/Cake.Codecov#40 |
See these issues for details: * codecov/codecov-exe#76 (comment) * cake-contrib/Cake.Codecov#40
Ah, I see. Setting the tool path made it work again for regular builds. Remains to see what the result of PR builds is. |
I would think so, but it could be the combination of a PR and non-encoded branch name that is the problem. |
Here's the build of the PR with 1.7.0 of Codecov Still failing, though there seems to be a bit more output this time. |
I see. There is still a little while until I get home, but I will take a closer look at what is going on (I may need to fork your repository to get to the bottom of this). The additional output is mostly due to the implementation of the fallback uploader that was implemented in v1.6.0, and the actual response from codecov.io that was implemented in v1.7.0. Unfortunately the response isn't helpful in this case, but hopefully I will get to the bottom of this anyhow. |
Feel free to fork and make a PR to experiment in. Editing the build scripts in your fork should apply those changes in AppVeyor since all the configuration is stored in-repo. |
Unfortunately some things got in the way today, so I haven't been able to look into this further, and I am about to sign off for tonight. I believe I should have some time before work tomorrow, so I will try my best to look into it then. Otherwise I won't be able to do that until Saturday or Sunday. |
Hmm, it unfortunately seems I was wrong. It have nothing to do with the unescaped branch name. It did notice some difference between with one of my other projects and your project, however this seem to be the result of wrong documentation in the Cake.Codecov addin. |
This did indeed turn out to be a documentation issue on the Issue have also been opened regarding the incorrect documentation (the existing documentation only works if Pull Requests also increment the build number) here: cake-contrib/Cake.Codecov#54 I will be closing this issue as it turned out to not be in the application itself. |
AppVeyor build here: https://ci.appveyor.com/project/chroma-sdk/colore/builds/25970637
Example of working (internal) build with the same config here: https://ci.appveyor.com/project/chroma-sdk/colore/builds/25970154
When building PRs that aren't made within the same repo, the Codecov step on AppVeyor fails with a 404 Not Found error.
The PR in question: chroma-sdk/Colore#267
Relevant error output:
The text was updated successfully, but these errors were encountered: