Azure / apiops

APIOps applies the concepts of GitOps and DevOps to API deployment. By using practices from these two methodologies, APIOps can enable everyone involved in the lifecycle of API design, development, and deployment with self-service and automated tools to ensure the quality of the specifications and APIs that they’re building.
https://azure.github.io/apiops
MIT License
279 stars 164 forks source link

[BUG] Run Publisher fails from version 5.1.0 #481

Closed ttfreeman closed 15 hours ago

ttfreeman commented 4 months ago

Release version

5.1.0 and 5.1.1

Describe the bug

Run - Publisher workflow for github actions fails at step "Run publisher with Config yaml and Commit id" . This is due to $uri for "https://github.com/Azure/apiops/releases/download/v5.0.0/$publisherFileName" no longer requires .exe in publisherFileName .

Expected behavior

It was working up to version v5.0.1. It stopped working from version v5.1.0 because Power shell API request to URI "https://github.com/Azure/apiops/releases/download/v5.0.0/$publisherFileName" throws a not found error. Run Set-StrictMode -Version Latest Downloading publisher... VERBOSE: Requested HTTP/1.1 GET with 0-byte payload VERBOSE: Received HTTP/1.1 77265990-byte response of content type application/octet-stream VERBOSE: File Name: publisher.exe Setting file permissions... dbug: Microsoft.Extensions.Hosting.Internal.Host[1] Hosting starting info: Publisher[0] Beginning execution... info: Publisher[0] Getting files from commit ID 9ec3aa44acc78fa10e11517eb454812774af6549... info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime[0] Hosting environment: Production info: Microsoft.Hosting.Lifetime[0] Content root path: /home/runner/work/KuvaCloud/KuvaCloud dbug: Microsoft.Extensions.Hosting.Internal.Host[2] Hosting started info: Publisher[0] Processing modified files in commit ID... info: Publisher[0] Putting named value alarm-backend-kuva... info: Publisher[0] Putting named value alarm-backend-dvn... dbug: PutRestResource[0]

Actual behavior

Run Set-StrictMode -Version Latest Downloading publisher... VERBOSE: Requested HTTP/1.1 GET with 0-byte payload VERBOSE: Received HTTP/1.1 response of content type text/html of unknown size Invoke-WebRequest: /home/runner/work/_temp/1a9902ba-17c4-4807-8fa7-6c247945bde0.ps1:11 Line 11 Invoke-WebRequest -Uri "$uri" -OutFile "$destinationFilePath" ~~~~~~~~~~~~~

Error: Process completed with exit code 1.

Reproduction Steps

Try running Run Publisher .

github-actions[bot] commented 4 months ago
  Thank you for opening this issue! Please be patient while we will look into it and get back to you as this is an open source project. In the meantime make sure you take a look at the [closed issues](https://github.com/Azure/apiops/issues?q=is%3Aissue+is%3Aclosed) in case your question has already been answered. Don't forget to provide any additional information if needed (e.g. scrubbed logs, detailed feature requests,etc.).
  Whenever it's feasible, please don't hesitate to send a Pull Request (PR) our way. We'd greatly appreciate it, and we'll gladly assess and incorporate your changes.
waelkdouh commented 4 months ago

Please try 5.1.1. Make sure you dose the pipelines as well with this version.

ttfreeman commented 3 months ago

Please try 5.1.1. Make sure you dose the pipelines as well with this version.

5.1.1 is the same, as mentioned in the issue description. I noticed two new issues for the same problem: https://github.com/Azure/apiops/issues/494 https://github.com/Azure/apiops/issues/486

waelkdouh commented 3 months ago

Please get the latest release and let us know if this issue persists.

waelkdouh commented 3 months ago

Also make sure you are using the latest pipeline yaml files.

ttfreeman commented 3 months ago

We tried updating to version 5.1.3. Now we get the following error in the publisher workflow (so still stuck at version 5.0.0): image

waelkdouh commented 3 months ago

Did you also update the pipelines?

ics-development commented 2 months ago

I'm having the issue with revisions after updating to 5.1.4:

"code":"IdentifierAlreadyInUse","message":"Resource already exists."

info: Publisher[0] Putting product ipoint-shifts...

[debug]Agent environment resources - Disk: / Available 20946.00 MB out of 74244.00 MB, Memory: Used 681.00 MB out of 6921.00 MB, CPU: Usage 25.36%

info: Publisher[0] Putting policy policy in product ipoint-shifts... info: Publisher[0] Putting API ipoint-shifts;rev=1... info: Publisher[0] Putting API ipoint-shifts... crit: Publisher[0] System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/***/resourceGroups/rg-apim-staging/providers/Microsoft.ApiManagement/service/apim-acacium-staging/apis/ipoint-shifts;rev=1?api-version=2022-04-01-preview&asyncId=66361c34217d201b2473497f&asyncCode=201 failed with status code 409. Content is '{"error":{"code":"IdentifierAlreadyInUse","message":"Resource already exists.","details":null}}'.

waelkdouh commented 2 months ago

Publishing APIs with revisions is currently bugged. We will include a fix in our next major release (sometime in the next week or so). It will be release as part of V6. We are currently testing some alpha versions of v6 but it has some issues and it's not ready for you to start consuming yet. Stay tuned.

ics-development commented 2 months ago

@waelkdouh awesome, will do, thank you. Appreciate your hard work.

guythetechie commented 15 hours ago

Please try our latest release, revision issues have been addressed there.