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

Merge ServerCommon repository into NuGetGallery #10109

Merged
merged 413 commits into from
Aug 3, 2024
Merged

Conversation

joelverhagen
Copy link
Member

@joelverhagen joelverhagen commented Aug 3, 2024

Much like #10091, but for ServerCommon.

This brings ServerCommon git tree into NuGetGallery. This is another step in merging our OSS repositories to ease development.

Since the diff is so large, I don't expect you to review it all. Instead, I'll describe my process:

  1. Clean up the files for NuGetGallery and ServerCommon to reduce conflicts (already done).
  2. Merge ServerCommon main into NuGetGallery dev, allowing unrelated histories.

Description of each additional commit:

Commit 71c6f67

Purpose: merge the two Git histories into one, handling merge conflicts of overlapping files

  • Update .gitignore to no longer ignore the build tools (they are in the same repo now, rather than fetched by build.ps1
  • Update .pipelines/Release-trigger.yml to trigger the ServerCommon release also
  • Merge ServerCommon build steps in build.ps1, add assembly version and package version parameters
  • Merge ServerCommon test step in test.ps1
  • Merge version entries in Directory.Packages.props (simple union)
  • Merge package source mappings in NuGet.config (simple union)
  • Merge cred scan suppressions in CredScanSuppressions.json (simple union)
  • Rename ServerCommon README.md to README.common.md, for a subsequent README fix

Commit a1bdaf5

Purpose: merge contents of README.common.md into README.md

  • Update README.md with a new shared libraries section
  • Delete README.common.md

Commit 7feec13

Purpose: clean up builds scripts to allow common tests to be skip, little clean up

  • Add -SkipArtifacts and -SkipCommon to build.ps1
  • Add -SkipCommon to test.ps1
  • Enhance NuGetGallery-CI.yaml to use the new switches, with a new stage for building artifacts
  • Add a comment to mark the signing block, since it's copy pasta

Commit e1e4b64

Purpose: change package reference to project reference for projects that now exist in the same repo

All of the projects in ServerCommon src are used by NuGetGallery.sln and NuGet.Jobs.sln. These are most of the NuGet.Services.* projects in our codebase (although not all like NuGet.Services.Entities which is already in NuGetGallery repo).

In some cases I needed to add a System.Web reference because this was coming from a transitive package reference previously.

Commit 04a00d5

Purpose: make friend assembly (InternalsVisibleTo) declarations in AssemblyInfo.cs not in MSBuild. The MSBuild method was only done in NuGetGallery.Services. I switched it so we are consistent.

Commit e4f95ca

Purpose: clean up init.ps1 to just be better

  • Add a group block for Azure DevOps builds (if ($env:TF_BUILD) condition), better log viewing in AzDO
  • No-op better when build tools are already up to date
  • Only fetch 7za build tool, not other random things in the tools directory
  • Only checkout specific folders in the clone, rather than the whole tree (a bit faster)

Repositories will need to switch away from ServerCommon's init.ps1 in their own build scripts.

Commit 082cd37

Change NuGetGalleryBranch parameter to Branch for the NuGetGallery packages release build. This is just for consistency. I will fix the related pipeline in a separate PR.

chenriksson and others added 30 commits May 2, 2018 13:16
Added migration to add new column to appropriate table in DB.
Add the table that will track what packages have been revalidated/repository signed. 

Generates the following migration:

```
CREATE TABLE [dbo].[PackageRevalidations] (
    [Key] [bigint] NOT NULL IDENTITY,
    [PackageId] [nvarchar](128) NOT NULL,
    [PackageNormalizedVersion] [nvarchar](64) NOT NULL,
    [Enqueued] [datetime2](7),
    [ValidationTrackingId] [uniqueidentifier],
    [Completed] [bit] NOT NULL,
    [RowVersion] rowversion NOT NULL,
    CONSTRAINT [PK_dbo.PackageRevalidations] PRIMARY KEY ([Key])
)
CREATE INDEX [IX_PackageRevalidations_PackageId_PackageNormalizedVersion]
ON [dbo].[PackageRevalidations]([PackageId], [PackageNormalizedVersion])

CREATE INDEX [IX_PackageRevalidations_Enqueued]
ON [dbo].[PackageRevalidations]([Enqueued])

CREATE UNIQUE INDEX [IX_PackageRevalidations_ValidationTrackingId]
ON [dbo].[PackageRevalidations]([ValidationTrackingId])
```

For more information, see this [technical spec](https://microsoft.sharepoint.com/teams/NuGet/_layouts/OneNote.aspx?id=%2Fteams%2FNuGet%2FTeam%2FNugetServer%2FNugetServerTeamNote&wd=target%28Specs.one%7C910181C5-8695-4A1C-9792-A56DBB86F1C3%2FPersistence%7C92D53BF1-7B51-4E3B-A77D-1FA4F591D967%2F%29onenote:https://microsoft.sharepoint.com/teams/NuGet/Team/NugetServer/NugetServerTeamNote/Specs.one#Persistence&section-id={910181C5-8695-4A1C-9792-A56DBB86F1C3}&page-id={92D53BF1-7B51-4E3B-A77D-1FA4F591D967}&end).

Fixes https://github.com/NuGet/Engineering/issues/1436
 Add PackageNormalizedVersion property to the PackageMessageData
Moved logging scope to contain "try .. catch" so exceptions logged have CallGuid in their scope.
* Added service bus message delivery related lag tracking.

* comments on usage

* Test to ensure new metrics are sent.

* PR comments addressed.

* Argument documentation
Add the ValidatingType to the PackageValidationSet, ValidationStatus and ValidationMessage
…Processor (#171)

* Adding the ability to specify MaxConcurrentCalls for the SubscriptionProcessor.

* Common logging
* Add symbol error codes
Few changes were missed when adding the symbol error codes.
This will used by monitoring for metrics like: "how many author signatures are valid?"
Add the VSTSSymbolServerRequest entity.
*  remove DatabaseGenerated(DatabaseGeneratedOption.Computed) on SybolServerRequest.Created

* Add the Migration for dropping the database create option on SymbolServerRequest.Create column
erdembayar and others added 25 commits March 22, 2024 15:53
* Initial attempt.

* Variable fix.

* Unofficial

* Not publishing unsigned artifacts.
* update azure identity version & identity client

----
* Start update to new SDK

* Move most of the storage to new SDK.

* migrate transfer management in AzureStorage

* Update Queue Implmentation to v12 SDK

* Migrate to v12 SDK

* Migrate Tables to new SDK

* Switch to generic Blob isntead of BlockBlob

* Temporarily disable emu tests and add new interface ones.

* Adding Save tests.

* Point Transfermanager to temp directory.

* Potential fix for incorrect container Uri.

* Added some explciit typing.

* Add lease adapters to storage SDK types

* Update List to use metadata bool. Clean up some comments

* Update language version. Add async list

* Update StorageExtension to new c# syntax.

* Remove unneeded underlying TableEntity.

* remove some unclear var usage.

* Start update to new SDK

* Move most of the storage to new SDK.

* migrate transfer management in AzureStorage

* Update Queue Implmentation to v12 SDK

* Migrate to v12 SDK

* Migrate Tables to new SDK

* Switch to generic Blob isntead of BlockBlob

* Temporarily disable emu tests and add new interface ones.

* Adding Save tests.

* Point Transfermanager to temp directory.

* Potential fix for incorrect container Uri.

* Added some explciit typing.

* Add lease adapters to storage SDK types

* Update List to use metadata bool. Clean up some comments

* Update language version. Add async list

* Update StorageExtension to new c# syntax.

* Remove unneeded underlying TableEntity.

* remove some unclear var usage.

* BlobClient -> blockBlobClient for perf.

* Cleaning up some duplicated messages. Fix setting headers AFTER upload.

* Trivially implement ListAsync for other Storages.

* Update tests for new changes.

* Clean up old tests.

---------

Co-authored-by: Drew Gillies <[email protected]>
This is part of an effort to standardize build files across all NuGet Server OSS repos. This can help with a future repository merge effort.

* Clean up build files
* Fix AssemblyInfo generation
* Align solution deps
* Move to Package Source Mapping
* Move to Central Package Management
* Move packages.config to root for better visibility
* Add NeutralLanguage from NuGet.Jobs
* Add SdkProjects.props to be consistent with other repos
* Move to latest SDK as min
* Move to latest on packages that vary between repos
* Move to latest xunit and fix warnings and errors (messy tests)
* Remove version from MicroBuild path
* Fix async void in xunit
* Delete .editorconfig now that we are clean
…steps (#439)

* Move to newer publish test results
* Fail on test failure
* Pack all projects
* Qualify common in more places
* Assign PK and RK on ChildEntity
* Remove unnecessary TableEntity field
Add helper method to work around Azure/azure-sdk-for-net#44373
Add missing ListAsync to interface
* Fetch and copy HTTP headers if they are being updated in the copy method
* Don't do this in OnSaveAsync, this breaks since the Content-MD5 is set
# Conflicts:
#	.gitignore
#	.pipelines/Release-trigger.yml
#	CONTRIBUTING.md
#	CredScanSuppressions.json
#	Directory.Build.props
#	Directory.Packages.props
#	NuGet.config
#	README.md
#	SdkProjects.props
#	build.ps1
#	test.ps1
Add -SkipArtifacts for further parallelism
This is for consistent with other projects
@joelverhagen joelverhagen requested a review from a team as a code owner August 3, 2024 01:44
@joelverhagen joelverhagen merged commit 9684321 into dev Aug 3, 2024
2 checks passed
@joelverhagen joelverhagen deleted the jver-merge-common branch August 3, 2024 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.