diff --git a/src/NuGet.Services.Validation.Orchestrator/Configuration/ValidationConfiguration.cs b/src/NuGet.Services.Validation.Orchestrator/Configuration/ValidationConfiguration.cs
index 0b491d839..f68ae8d07 100644
--- a/src/NuGet.Services.Validation.Orchestrator/Configuration/ValidationConfiguration.cs
+++ b/src/NuGet.Services.Validation.Orchestrator/Configuration/ValidationConfiguration.cs
@@ -49,5 +49,10 @@ public class ValidationConfiguration
/// The threshold until a validation set is no longer processed.
///
public TimeSpan TimeoutValidationSetAfter { get; set; }
+
+ ///
+ /// The duration for which SAS tokens are generated for package URLs passed down to validators.
+ ///
+ public TimeSpan NupkgUrlValidityPeriod { get; set; } = TimeSpan.FromDays(7);
}
}
diff --git a/src/NuGet.Services.Validation.Orchestrator/ValidationOutcomeProcessor.cs b/src/NuGet.Services.Validation.Orchestrator/ValidationOutcomeProcessor.cs
index 6a76282f2..c61202087 100644
--- a/src/NuGet.Services.Validation.Orchestrator/ValidationOutcomeProcessor.cs
+++ b/src/NuGet.Services.Validation.Orchestrator/ValidationOutcomeProcessor.cs
@@ -133,10 +133,10 @@ public async Task ProcessValidationOutcomeAsync(PackageValidationSet validationS
{
await ScheduleCheckIfNotTimedOut(validationSet, validatingEntity, tooLongNotificationAllowed: false);
}
- else
- {
- await _packageFileService.DeletePackageForValidationSetAsync(validationSet);
- }
+
+ // TODO: implement delayed cleanup that would allow internal services
+ // to access original packages for some time after package become available:
+ // https://github.com/NuGet/Engineering/issues/2506
}
else
{
diff --git a/src/NuGet.Services.Validation.Orchestrator/ValidationSetProcessor.cs b/src/NuGet.Services.Validation.Orchestrator/ValidationSetProcessor.cs
index 471643e0a..6d539f721 100644
--- a/src/NuGet.Services.Validation.Orchestrator/ValidationSetProcessor.cs
+++ b/src/NuGet.Services.Validation.Orchestrator/ValidationSetProcessor.cs
@@ -154,11 +154,11 @@ private async Task ProcessNotStartedValidations(PackageValidationSet valid
using (_logger.BeginScope("Not started {ValidationType} Key {ValidationId}", packageValidation.Type, packageValidation.Key))
{
_logger.LogInformation("Processing not started validation {ValidationType} for {PackageId} {PackageVersion}, validation set {ValidationSetId}, {ValidationId}",
- packageValidation.Type,
- validationSet.PackageId,
- validationSet.PackageNormalizedVersion,
- validationSet.ValidationTrackingId,
- packageValidation.Key);
+ packageValidation.Type,
+ validationSet.PackageId,
+ validationSet.PackageNormalizedVersion,
+ validationSet.ValidationTrackingId,
+ packageValidation.Key);
var validationConfiguration = GetValidationConfiguration(packageValidation.Type);
if (validationConfiguration == null)
{
@@ -283,7 +283,7 @@ private async Task CreateValidationRequest(
{
var nupkgUrl = await _packageFileService.GetPackageForValidationSetReadUriAsync(
packageValidationSet,
- DateTimeOffset.UtcNow.Add(_validationConfiguration.TimeoutValidationSetAfter));
+ DateTimeOffset.UtcNow.Add(_validationConfiguration.NupkgUrlValidityPeriod));
var validationRequest = new ValidationRequest(
validationId: packageValidation.Key,