New error using Update-AppveyorBuild -Version

Dave's Avatar

Dave

25 Feb, 2021 08:24 PM

For a long time I have used

init:
  - ps: Update-AppveyorBuild -Version $($env:APPVEYOR_REPO_COMMIT.substring(0,7))
Today this started generating an error. What is odd is that the error happens most of the time, but not every time.
Exception calling "UpdateBuildDetails" with "10" argument(s): "Build with specified version already exists."
At C:\Program Files\AppVeyor\BuildAgent\Modules\build-worker-api\build-worker-api.psm1:41 char:5
+     [Appveyor.BuildAgent.Api.RestBuildServices]::UpdateBuildDetails($ ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : Exception
Has something changed? Am I doing something wrong?
Thanks!
  1. Support Staff 1 Posted by Feodor Fitsner on 25 Feb, 2021 08:33 PM

    Feodor Fitsner's Avatar

    Nothing has been changed. Exception calling "UpdateBuildDetails" with "10" argument(s) looks wierd. Could you drop a link to a build where you get that?

  2. 2 Posted by Dave on 25 Feb, 2021 08:36 PM

    Dave's Avatar
  3. Support Staff 3 Posted by Feodor Fitsner on 25 Feb, 2021 08:39 PM

    Feodor Fitsner's Avatar

    Alright, build with that version indeed exists: https://ci.appveyor.com/project/roundfile/new-builds/history

  4. 4 Posted by Dave on 25 Feb, 2021 08:51 PM

    Dave's Avatar

    Notice this additional information from the Windows build log. It appears the sequential build number is used instead of the substring of the commit number.
    https://ci.appveyor.com/project/roundfile/new-builds/builds/3795628...

    Write-Host $env:APPVEYOR_REPO_COMMIT
    464fc4e3d97f7d79ed05c1f49d118922f4965fac
    Write-Host $($env:APPVEYOR_REPO_COMMIT.substring(0,7))
    464fc4e
    Update-AppveyorBuild -Version "$($env:APPVEYOR_REPO_COMMIT.substring(0,7))"
    Exception calling "UpdateBuildDetails" with "10" argument(s): "Build with specified version already exists."
    At C:\Program Files\AppVeyor\BuildAgent\Modules\build-worker-api\build-worker-api.psm1:41 char:5
    +     [Appveyor.BuildAgent.Api.RestBuildServices]::UpdateBuildDetails($ ...
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : Exception


    Write-Host $env:APPVEYOR_BUILD_VERSION 199

    Looking at the macos build it appears that the Update-AppveyorBuild -Version command fails completely.
    https://ci.appveyor.com/project/roundfile/new-builds/builds/3795628...

    Write-Host $env:APPVEYOR_REPO_COMMIT
    464fc4e3d97f7d79ed05c1f49d118922f4965fac
    Write-Host $($env:APPVEYOR_REPO_COMMIT.substring(0,7))
    464fc4e
    Update-AppveyorBuild -Version "$($env:APPVEYOR_REPO_COMMIT.substring(0,7))"
    Update-AppveyorBuild: Error updating build details.
    Command completed with errors
    Build failed
    

    This is all new just today. The scripts have worked fine before.

  5. Support Staff 5 Posted by Feodor Fitsner on 25 Feb, 2021 08:53 PM

    Feodor Fitsner's Avatar
  6. 6 Posted by Dave on 25 Feb, 2021 09:01 PM

    Dave's Avatar

    Thanks! Is this happening because of the cancelled build? Not a unique version number in that case?

  7. Support Staff 7 Posted by Feodor Fitsner on 26 Feb, 2021 04:36 AM

    Feodor Fitsner's Avatar

    Yep, that was the issue.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac