apiops icon indicating copy to clipboard operation
apiops copied to clipboard

[BUG] The extractor does not publish the artifact with API changes

Open Nopesound opened this issue 1 year ago • 3 comments

Release version

5.1.4

Describe the bug

During the modification extraction phase there are no errors, the extractor extracts all the modifications, but in the end there are no files in the published artifact other than the lint one.

Expected behavior

That the extractor creates an artifact containing the changes made to the bees and creates the PR associated with it

Actual behavior

The extractor extracts the modified files but does not publish these changes within the artifact

Reproduction Steps

I modify any api inside apim and then launch the extraction pipeline. But nothing happens, below is the detail of the artifact creation task..

Artifact name input: artifacts-from-portal
Uploading pipeline artifact from /home/vsts/work/1/a for build #80
Using default max parallelism.
Max dedup parallelism: 192
DomainId: 0
Verbose, ArtifactHttpClientFactory.CreateVssHttpClient: DedupStoreHttpClient with BaseUri: https://vsblobprodweu2.vsblob.visualstudio.com/A92fddbc3-09c9-4f2e-8a7a-241aa03e0a71/, MaxRetries:5, SendTimeout:00:01:40
Information, ApplicationInsightsTelemetrySender will correlate events with X-TFS-Session 1defd828-cb23-4d20-b65e-f597c53d373f
Verbose, Started ITelemetrySender BlobStoreApplicationInsightsTelemetrySender.
Hashtype: Dedup1024K
Information, DedupManifestArtifactClient will correlate http requests with X-TFS-Session 1defd828-cb23-4d20-b65e-f597c53d373f
Verbose, Globbing completed in: 00:00:00.0111228
Verbose, Pages to upload computed in 00:00:00.0037364
Information, Processed 0 files from /home/vsts/work/1/a successfully.
Verbose, ManifestId: B5*01
Verbose, ContentNode: No files
Verbose, RootId: 6F*02
Verbose, Trying to put node 6F*02 of 1 children, 0 receipts used. (Children: B5*01 [None])
Verbose, Added node 6F*02 of 1 children and got 1 receipts back. (Receipts: 6F*02 [2024-04-25T21:20:53Z])
Information, Uploaded 0 out of 61 bytes
Information, Content upload is done!
Information, 
Content upload statistics:
Total Content: 61.0 bytes
Physical Content Uploaded: 0.0 bytes
Logical Content Uploaded: 0.0 bytes
Compression Saved: 0.0 bytes
Deduplication Saved: 61.0 bytes
Number of Chunks Uploaded: 0
Total Number of Chunks: 1

I noticed that he here Uploading pipeline artifact from /home/vsts/work/1/a for build #80 talks about a folder a, but mine is called apiops

Nopesound avatar Apr 22 '24 22:04 Nopesound

  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.

github-actions[bot] avatar Apr 22 '24 22:04 github-actions[bot]

The extractor is only responsible for extracting the artifacts. You need to trigger the publisher pipeline to promote the changes across apim instances. Please refer to the docs and the wiki.

waelkdouh avatar Apr 23 '24 19:04 waelkdouh

I am experiencing the same issue. Everything appears correct in the extractor (all green), but running the extractor does not produce any results. There should be some warning or indication explaining why the artifact was not created.

To troubleshoot, I moved the code to another project and pipeline with an identical setup but using a new service connection. In this new setup, it works fine. However, it does not work with the original service connection. I suspect that the problem lies with the service connection, specifically that the service principal does not have sufficient permissions. Unfortunately, no errors or warnings are thrown, and it fails silently. The image below shows that oh everything looks good but artifacts not created at all. The below is what I have to resolve this especially when you first run the apiops extractor.

  1. I think you can focus on the permissions of the app registrations if it has the comprehensive permissions to do the job.
  2. When you first run, create an empty folder called artifacts and add empty file called policy.xml then it recognises there are some changes and it starts to pick up things

image

EdenGoforIt avatar May 16 '24 20:05 EdenGoforIt