Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
/ NuGet.Jobs Public archive

Only test connection on first iteration #603

Merged
merged 1 commit into from
Nov 6, 2018
Merged

Conversation

chenriksson
Copy link
Member

@chenriksson chenriksson commented Oct 30, 2018

Tracking: https://github.com/NuGet/Engineering/issues/1618

Investigation: TestConnection login (SQL or AAD auth) seems to fail after a few iterations, seemingly only for validation DB. Intention here is to only test the connection once, then I'll see whether there are other connectivity issues. Testing on DEV from feature branch.

Logs show "Error Number:18456,State:1,Class:14" (login failure, error information not available due to permissions). I've checked sys.event_log connectivity failures, but don't see more specifics. The validation connection string seems to work fine if we test w/ ServerCommon tool from command line.

where TDbConfiguration : IDbConfiguration
{
var dbConfiguration = serviceProvider.GetRequiredService<IOptionsSnapshot<TDbConfiguration>>();
if (!string.IsNullOrEmpty(dbConfiguration.Value?.ConnectionString))
{
RegisterDatabase<TDbConfiguration>(serviceProvider);
RegisterDatabase<TDbConfiguration>(serviceProvider, testConnection);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any way to log in AI if the test connection was invoked ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Test connection results are logged to AI

@chenriksson chenriksson force-pushed the chenriks-testconnection branch from 036ffc1 to 20785fa Compare October 30, 2018 21:11
@chenriksson chenriksson merged commit 8cc84ca into dev Nov 6, 2018
@chenriksson chenriksson deleted the chenriks-testconnection branch November 6, 2018 17:16
joelverhagen added a commit that referenced this pull request Sep 27, 2019
This is necessary for hijack to work properly. Old search defaulted it to true.
Address NuGet/NuGetGallery#7360
joelverhagen added a commit that referenced this pull request Oct 26, 2020
This is necessary for hijack to work properly. Old search defaulted it to true.
Address NuGet/NuGetGallery#7360
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.

4 participants