Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix feed creation for dnceng-stage and staging scenarios #8082

Merged
merged 1 commit into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public AzureDevOpsArtifactFeed(string name, string organization, string project)
}
break;
default:
throw new NotImplementedException($"Organization '{organization}' contains no feed permissions information.");
// Use the default permissions
Permissions = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonfortescue can you take a look at this bit? My recollection is that you changed some stuff around permissions for dnceng-stage, and I want to make sure this captures the change you had made

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous implementation of this had no permissions setup for anything but dnceng, so this effectively goes back to that: https://github.com/dotnet/arcade/pull/7700/files

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this looks fine to me -- this is exactly how it's supposed to be.

break;

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,8 @@ private async Task<bool> ExecuteAsync()
// 1. In nuget.config files (and elsewhere), the name at a glance can identify its visibility
// 2. Existing automation has knowledge of "darc-int" and "darc-pub" for purposes of injecting authentication for internal builds
// and managing the isolated feeds within the NuGet.config files.
string accessTag = GetFeedVisibilityTag(AzureDevOpsOrg, AzureDevOpsProject);
string extraContentInfo = !string.IsNullOrEmpty(ContentIdentifier) ? $"-{ContentIdentifier}" : "";
string baseFeedName = FeedName ?? $"darc-{accessTag}{extraContentInfo}-{feedCompatibleRepositoryName}-{CommitSha.Substring(0, ShaUsableLength)}";
string baseFeedName = FeedName ?? $"darc-{GetFeedVisibilityTag(AzureDevOpsOrg, AzureDevOpsProject)}{extraContentInfo}-{feedCompatibleRepositoryName}-{CommitSha.Substring(0, ShaUsableLength)}";
string versionedFeedName = baseFeedName;
bool needsUniqueName = false;
int subVersion = 0;
Expand Down Expand Up @@ -204,7 +203,7 @@ private string GetFeedVisibilityTag(string organization, string project)
throw new NotImplementedException($"Project '{project}' within organization '{organization}' has no visibility mapping.");
}
default:
throw new NotImplementedException($"Organization '{organization}' has no visibility mapping.");
return project.Substring(0, Math.Min(3, project.Length));
}
}
}
Expand Down