dotnet / dotnet/arcade-services
Publishing should de-dupe asset target locations.
- Dominant language
- C#
- Stars
- 86
- Forks
- 86
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 35
Description
- [ ] This issue is blocking
- [ ] This issue is causing unreasonable pain
If a branch has a default channel set up with the same branch going to two channels, we may see errors if the following happens:
* There are blobs to publish
* These blobs go to the same location on two channels
* The publish tasks attempt to publish a given blob for more than one different channel's target at the same time.
Basically, you get a case where foo.zip should go to blobstorageaccount/bar on two separate threads. There are holds on the blobs during upload and we fail. As far as I know, if we attempt to re-publish the blobs, we won't see such an error because the blob will
already exist, and we will realize it has the same contents as before.
```
D:\a\_work\1\s\.packages\microsoft.dotnet.arcade.sdk\8.0.0-beta.23151.4\tools\SdkTasks\PublishArtifactsInManifest.proj(144,5): error : Unexpected exception publishing file D:\a\_work\1\a\232fb35f-86f8-444d-ad0a-64972a27e970\Microsoft.TemplateEngine.Abstractions.8.0.100-preview.2.23153.3.symbols.nupkg to assets/symbols/Microsoft.TemplateEngine.Abstractions.8.0.100-preview.2.23153.3.symbols.nupkg: This operation is not permitted as the blob is immutable due to one or more legal holds.
D:\a\_work\1\s\.packages\microsoft.dotnet.arcade.sdk\8.0.0-beta.23151.4\tools\SdkTasks\PublishArtifactsInManifest.proj(144,5): error : RequestId:5605a626-101e-001c-69e8-4d4a42000000
D:\a\_work\1\s\.packages\microsoft.dotnet.arcade.sdk\8.0.0-beta.23151.4\tools\SdkTasks\PublishArtifactsInManifest.proj(144,5): error : Time:2023-03-03T15:55:27.3773342Z
D:\a\_work\1\s\.packages\microsoft.dotnet.arcade.sdk\8.0.0-beta.23151.4\tools\SdkTasks\PublishArtifactsInManifest.proj(144,5): error : Status: 409 (This operation is not permitted as the blob is immutable due to one or more legal holds.)
D:\a\_work\1\s\.packages\microsoft.dotnet.arcade.sdk\8.0.0-beta.23151.4\tools\SdkTasks\PublishArtifactsInManifest.proj(144,5): error : ErrorCode: BlobImmutableDueToLegalHold
```
I think this could be fixed in two ways:
- Add retries for this particular error (on retry, the blob may already be published, and we should fall back to checking whether it is the same contents)
- Deduping at a more granular level. Right now we dedupe the target feed configs. But if two channels have subtly different target feed configs, like if they have different aka.ms link prefixes, we wouldn't dedupe them because that would mean that one of the latest links wouldn't get updated. We could try and dedupe again at some more granular level, based on actual file uploads, aka.ms updates, etc.
### Release Note Category
- [ ] Feature changes/additions
- [ ] Bug fixes
- [ ] Internal Infrastructure Improvements
### Release Note Description
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.