Skip to content

Commit

Permalink
Fixes #1526 - If provider connection string is specified use it. (#1540)
Browse files Browse the repository at this point in the history
* Fixes #1526 - If provider connection string is specified use it.

* Attempt to fix the pr branch builds

* Attempt to fix the build workflow

* make sure the finished build status runs

* Removed finished

* Update build.yaml

* Updates to build workflow

* Update build.yaml

---------

Co-authored-by: Eric J. Smith <[email protected]>
  • Loading branch information
niemyjski and ejsmith authored Apr 7, 2024
1 parent c148973 commit 5033f18
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 23 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Build
on: [push, pull_request]

on:
push:
branches: [main]
pull_request:

env:
TERM: xterm
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: true
Expand Down Expand Up @@ -144,7 +149,7 @@ jobs:
- name: Run Integration Tests
run: echo "npm run test:integration"

build-docker:
build-and-push-docker:

runs-on: ubuntu-latest
needs: [version]
Expand Down Expand Up @@ -206,7 +211,7 @@ jobs:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Wait for test jobs
- name: Wait for test jobs # doing it this way so we don't have to copy artifacts between jobs
uses: yogeshlonkar/wait-for-jobs@v0
with:
jobs: 'test-api,test-client'
Expand Down Expand Up @@ -245,7 +250,7 @@ jobs:
deploy:
if: "${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && github.event_name != 'pull_request' }}"
needs: [version,build-docker]
needs: [version,build-and-push-docker]
runs-on: ubuntu-latest
timeout-minutes: 30
env:
Expand All @@ -260,9 +265,7 @@ jobs:

- name: Install Helm
if: "${{ env.DOCKER_USERNAME != '' && github.event_name != 'pull_request' }}"
uses: azure/setup-helm@v3
with:
version: v3.13.0
uses: azure/setup-helm@v4

- name: Deploy Changes to Development Environment
if: "${{ env.DOCKER_USERNAME != '' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }}"
Expand Down
5 changes: 1 addition & 4 deletions src/Exceptionless.Core/Configuration/MessageBusOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ public static MessageBusOptions ReadFromConfiguration(IConfiguration config, App
options.Provider = options.Data.GetString(nameof(options.Provider));

string? providerConnectionString = !String.IsNullOrEmpty(options.Provider) ? config.GetConnectionString(options.Provider) : null;
if (!String.IsNullOrEmpty(providerConnectionString))
options.Data.AddRange(providerConnectionString.ParseConnectionString());

options.ConnectionString = options.Data.BuildConnectionString(new HashSet<string> { nameof(options.Provider) });
options.ConnectionString = !String.IsNullOrEmpty(providerConnectionString) ? providerConnectionString : options.Data.BuildConnectionString(new HashSet<string> { nameof(options.Provider) });

return options;
}
Expand Down
5 changes: 1 addition & 4 deletions src/Exceptionless.Core/Configuration/MetricOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ public static MetricOptions ReadFromConfiguration(IConfiguration config)
options.Provider = options.Data.GetString(nameof(options.Provider));

string? providerConnectionString = !String.IsNullOrEmpty(options.Provider) ? config.GetConnectionString(options.Provider) : null;
if (!String.IsNullOrEmpty(providerConnectionString))
options.Data.AddRange(providerConnectionString.ParseConnectionString());

options.ConnectionString = options.Data.BuildConnectionString(new HashSet<string> { nameof(options.Provider) });
options.ConnectionString = !String.IsNullOrEmpty(providerConnectionString) ? providerConnectionString : options.Data.BuildConnectionString(new HashSet<string> { nameof(options.Provider) });

return options;
}
Expand Down
5 changes: 1 addition & 4 deletions src/Exceptionless.Core/Configuration/QueueOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ public static QueueOptions ReadFromConfiguration(IConfiguration config, AppOptio
options.Provider = options.Data.GetString(nameof(options.Provider));

string? providerConnectionString = !String.IsNullOrEmpty(options.Provider) ? config.GetConnectionString(options.Provider) : null;
if (!String.IsNullOrEmpty(providerConnectionString))
options.Data.AddRange(providerConnectionString.ParseConnectionString());

options.ConnectionString = options.Data.BuildConnectionString(new HashSet<string> { nameof(options.Provider) });
options.ConnectionString = !String.IsNullOrEmpty(providerConnectionString) ? providerConnectionString : options.Data.BuildConnectionString(new HashSet<string> { nameof(options.Provider) });

return options;
}
Expand Down
5 changes: 1 addition & 4 deletions src/Exceptionless.Core/Configuration/StorageOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ public static StorageOptions ReadFromConfiguration(IConfiguration config, AppOpt
options.Provider = options.Data.GetString(nameof(options.Provider));

string? providerConnectionString = !String.IsNullOrEmpty(options.Provider) ? config.GetConnectionString(options.Provider) : null;
if (!String.IsNullOrEmpty(providerConnectionString))
options.Data.AddRange(providerConnectionString.ParseConnectionString());

options.ConnectionString = options.Data.BuildConnectionString(new HashSet<string> { nameof(options.Provider) });
options.ConnectionString = !String.IsNullOrEmpty(providerConnectionString) ? providerConnectionString : options.Data.BuildConnectionString(new HashSet<string> { nameof(options.Provider) });

return options;
}
Expand Down

0 comments on commit 5033f18

Please sign in to comment.