Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

[Package Renames 1] Add popularity transfers data client #765

Merged
merged 2 commits into from
Apr 14, 2020

Conversation

loic-sharma
Copy link
Contributor

@loic-sharma loic-sharma commented Apr 13, 2020

The auxiliary2azuresearch job needs to know which popularity transfers have changed to properly update the search index. To do this, the last seen popularity transfers data need to be persisted so that it can be compared against the latest data.

This adds new types IPopularityTransferDataClient and PopularityTransferDataClient that are unused for now. They will be added to the dependency injection container later.

Part of NuGet/NuGetGallery#7898

public OwnerDataClient Target { get; }

public List<string> BlobNames { get; } = new List<string>();
public List<byte[]> SavedBytes { get; } = new List<byte[]>();
public List<string> SavedStrings { get; } = new List<string>();
}

private class RecordingStream : MemoryStream
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was moved to its own file, next to the RecordingLogger.

@@ -41,6 +41,12 @@ public async Task AllowsEmptyObject()

Assert.Empty(output.Result);
Assert.Equal(ETag, output.AccessCondition.IfMatchETag);

Copy link
Contributor Author

@loic-sharma loic-sharma Apr 13, 2020

Choose a reason for hiding this comment

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

I added tests for the owners data client's telemetry and case sensitivity.

@loic-sharma loic-sharma changed the title [Package Renames] Add popularity transfers data client [Package Renames 1] Add popularity transfers data client Apr 13, 2020
@loic-sharma loic-sharma changed the base branch from master to dev April 14, 2020 17:41
@loic-sharma loic-sharma merged commit 11e04f1 into dev Apr 14, 2020
loic-sharma added a commit that referenced this pull request Apr 14, 2020
The `auxiliary2azuresearch` job needs to know which popularity transfers have changed to properly update the search index.

Previous change: #765
Part of NuGet/NuGetGallery#7898
loic-sharma added a commit that referenced this pull request Apr 14, 2020
The `db2azuresearch` and `auxiliary2azuresearch` jobs needs to get the latest popularity transfers from the database.

⚠ This change is not unit testable as it interacts with a database. This will be covered by end-to-end tests and monitoring.

Previous changes: #765 and #766.
Part of NuGet/NuGetGallery#7898
joelverhagen pushed a commit to NuGet/NuGet.Jobs that referenced this pull request Oct 26, 2020
The `auxiliary2azuresearch` job needs to know which popularity transfers have changed to properly update the search index.

Previous change: NuGet/NuGet.Services.Metadata#765
Part of NuGet/NuGetGallery#7898
joelverhagen pushed a commit to NuGet/NuGet.Jobs that referenced this pull request Oct 26, 2020
The `db2azuresearch` and `auxiliary2azuresearch` jobs needs to get the latest popularity transfers from the database.

⚠ This change is not unit testable as it interacts with a database. This will be covered by end-to-end tests and monitoring.

Previous changes: NuGet/NuGet.Services.Metadata#765 and NuGet/NuGet.Services.Metadata#766.
Part of NuGet/NuGetGallery#7898
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants