Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
needs: validate-inputs
env:
PACKAGE_VERSION: ${{ needs.validate-inputs.outputs.version }}
API_NAME: insights-dotnet-client
API_NAME: analytics-dotnet-client
AWS_REGION: us-west-1
S3_BUCKET: docs.couchbase.com
steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ jobs:
cache: false

- name: Restore
run: dotnet restore Couchbase.OperationalInsights.sln
run: dotnet restore Couchbase.Analytics.sln

- name: Build (Release)
run: dotnet build Couchbase.OperationalInsights.sln --configuration Release --no-restore
run: dotnet build Couchbase.Analytics.sln --configuration Release --no-restore

- name: Test - Couchbase.OperationalInsights.UnitTests (${{ matrix.framework }})
run: dotnet test tests/Couchbase.OperationalInsights.UnitTests/Couchbase.OperationalInsights.UnitTests.csproj --configuration Release --framework ${{ matrix.framework }} --no-build --logger GitHubActions --logger "trx;LogFileName=unit-tests-${{ matrix.framework }}.trx" --results-directory "TestResults"
- name: Test - Couchbase.Analytics.UnitTests (${{ matrix.framework }})
run: dotnet test tests/Couchbase.Analytics.UnitTests/Couchbase.Analytics.UnitTests.csproj --configuration Release --framework ${{ matrix.framework }} --no-build --logger GitHubActions --logger "trx;LogFileName=unit-tests-${{ matrix.framework }}.trx" --results-directory "TestResults"

- name: Upload Test Results
if: always()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-fit-performer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
cache: false

- name: Restore
run: dotnet restore fit/Couchbase.OperationalInsights.Performer/Couchbase.OperationalInsights.Performer.csproj
run: dotnet restore fit/Couchbase.Analytics.Performer/Couchbase.Analytics.Performer.csproj

- name: Build (Release)
run: dotnet build fit/Couchbase.OperationalInsights.Performer/Couchbase.OperationalInsights.Performer.csproj --configuration Release --no-restore
run: dotnet build fit/Couchbase.Analytics.Performer/Couchbase.Analytics.Performer.csproj --configuration Release --no-restore
8 changes: 4 additions & 4 deletions .github/workflows/fit-testing-dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run FIT-CLI (OperationalInsights)
name: Run FIT-CLI (Analytics)

on:
schedule:
Expand All @@ -10,7 +10,7 @@ on:
description: FIT presets or preset groups to run, comma-separated. (`fit preset list`)
required: false
type: string
default: enterprise-insights-func-lite
default: enterprise-analytics-func-lite
collect_extra_diagnostics:
description: Collect additional diagnostics (includes cbcollect, is slower)
required: false
Expand All @@ -31,7 +31,7 @@ jobs:
fit:
uses: couchbaselabs/fit-cli/.github/workflows/fit-cli.yaml@main
with:
preset: ${{ vars.FIT_CLI_PRESET || inputs.preset || 'enterprise-insights-func-lite' }}
preset: ${{ vars.FIT_CLI_PRESET || inputs.preset || 'enterprise-analytics-func-lite' }}
collect_extra_diagnostics: ${{ inputs.collect_extra_diagnostics == '' && true || inputs.collect_extra_diagnostics }}
performer: 'insights-dotnet-fit-performer:main'
performer: 'analytics-dotnet-fit-performer:main'
channel: ${{ vars.FIT_CLI_CHANNEL || inputs.channel }}
22 changes: 11 additions & 11 deletions .github/workflows/functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
run: |
cbdinocluster -v init --auto

- name: Start Couchbase OperationalInsights cluster
- name: Start Couchbase Analytics cluster
id: start-cluster
env:
INPUT_TAG: ${{ github.event.inputs.version_tag }}
Expand Down Expand Up @@ -97,11 +97,11 @@ jobs:
CBDINO_CLUSTER_ID=$(cbdinocluster -v alloc --def="$(cat cluster.resolved.yml)")

# Connection string through the load balancer (used by most tests)
CBDINO_CONNSTR=$(cbdinocluster -v connstr --tls --insights "$CBDINO_CLUSTER_ID")
CBDINO_CONNSTR=$(cbdinocluster -v connstr --tls --analytics "$CBDINO_CLUSTER_ID")

# Direct-to-node connection string (required for mTLS tests because
# the nginx passive load balancer terminates TLS at L7, so client
# certificates are not forwarded to the insights service).
# certificates are not forwarded to the analytics service).
# Extract the first cluster node IP from cbdinocluster ps --json.
NODE_IP=$(cbdinocluster ps --json 2>/dev/null \
| python3 -c "import sys,json; data=json.load(sys.stdin); [print(n['ip_address']) or sys.exit(0) for c in data for n in c.get('nodes',[]) if n.get('is_cluster_node')]" 2>/dev/null \
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
- name: Prepare Functional Test settings.json
run: |
echo "Writing functional test settings.json with cluster connection string"
cat > tests/Couchbase.OperationalInsights.FunctionalTests/settings.json <<EOF
cat > tests/Couchbase.Analytics.FunctionalTests/settings.json <<EOF
{
"TestSettings": {
"ConnectionString": "${CBDINO_CONNSTR}",
Expand All @@ -173,26 +173,26 @@ jobs:
}
}
EOF
echo "settings.json written:" && cat tests/Couchbase.OperationalInsights.FunctionalTests/settings.json
echo "settings.json written:" && cat tests/Couchbase.Analytics.FunctionalTests/settings.json

- name: Wait for insights service to be ready
- name: Wait for analytics service to be ready
run: |
echo "Polling insights service until it accepts queries..."
echo "Polling analytics service until it accepts queries..."
for i in $(seq 1 60); do
HTTP_CODE=$(curl -sS -o /dev/null -w "%{http_code}" -k \
-u "${CBDINO_USER}:${CBDINO_PASS}" \
-H "Content-Type: application/json" \
-d '{"statement": "SELECT 1;"}' \
"${CBDINO_CONNSTR}/api/v1/request" 2>/dev/null || echo "000")
if [ "$HTTP_CODE" = "200" ]; then
echo "OperationalInsights service is ready (attempt $i)"
echo "Analytics service is ready (attempt $i)"
break
fi
echo "Attempt $i/60: HTTP $HTTP_CODE — waiting 5s..."
sleep 5
done
if [ "$HTTP_CODE" != "200" ]; then
echo "ERROR: OperationalInsights service did not become ready after 5 minutes"
echo "ERROR: Analytics service did not become ready after 5 minutes"
exit 1
fi

Expand All @@ -215,7 +215,7 @@ jobs:

- name: Build and Run Functional Tests (net8.0)
run: |
dotnet test tests/Couchbase.OperationalInsights.FunctionalTests/Couchbase.OperationalInsights.FunctionalTests.csproj \
dotnet test tests/Couchbase.Analytics.FunctionalTests/Couchbase.Analytics.FunctionalTests.csproj \
--configuration Release \
--framework net8.0 \
--logger GitHubActions \
Expand All @@ -225,7 +225,7 @@ jobs:
- name: Build and Run Functional Tests (net10.0)
if: ${{ !cancelled() }}
run: |
dotnet test tests/Couchbase.OperationalInsights.FunctionalTests/Couchbase.OperationalInsights.FunctionalTests.csproj \
dotnet test tests/Couchbase.Analytics.FunctionalTests/Couchbase.Analytics.FunctionalTests.csproj \
--configuration Release \
--framework net10.0 \
--logger GitHubActions \
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish-fit-performer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ name: Publish FIT Performer Image
# default title) for push/tag triggers, which fit-cli never inspects.
run-name: ${{ inputs.ref }}

# Builds the OperationalInsights .NET FIT performer (together with the SDK it is built
# Builds the Analytics .NET FIT performer (together with the SDK it is built
# against) as a Docker image and publishes it to
# ghcr.io/couchbase/insights-dotnet-fit-performer.
# ghcr.io/couchbase/analytics-dotnet-fit-performer.
#
# The image is tagged with the SDK version: a push of a release tag like `1.0.0`
# produces `ghcr.io/couchbase/insights-dotnet-fit-performer:1.0.0`, and the
# produces `ghcr.io/couchbase/analytics-dotnet-fit-performer:1.0.0`, and the
# master branch publishes `:main`. It can also be run manually for an arbitrary
# branch, tag, commit, or PR ref.
#
Expand All @@ -32,7 +32,7 @@ on:

jobs:
# Job id `publish` + a one-entry matrix makes GitHub name the job
# `publish (insights-dotnet)`. fit-cli's `fit performer build` parses that
# `publish (analytics-dotnet)`. fit-cli's `fit performer build` parses that
# `publish (<sdk>)` shape to map the built image back to an SDK (see
# summariseBuildJobs/parseMatrixJobSdk in fit-cli); mirrors couchbase-jvm-clients'
# build-fit-performer.yml. Do not add an explicit `name:` — it would override the
Expand All @@ -45,7 +45,7 @@ jobs:
strategy:
fail-fast: false
matrix:
sdk: [insights-dotnet]
sdk: [analytics-dotnet]
steps:
- name: Build and publish performer image
uses: couchbaselabs/sdk-docker-build-action@v1
Expand All @@ -54,6 +54,6 @@ jobs:
# Blank on a tag push (the action then uses the pushed tag as the
# version); supplied explicitly for manual runs.
ref: ${{ inputs.ref }}
dockerfile: fit/Couchbase.OperationalInsights.Performer/Dockerfile
dockerfile: fit/Couchbase.Analytics.Performer/Dockerfile
env:
DOCKER_BUILD_SUMMARY: false
24 changes: 12 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,17 @@ jobs:
yum -y install tar gzip ca-certificates krb5-libs libicu zlib openssl

- name: Restore
run: dotnet restore src/Couchbase.OperationalInsights/Couchbase.OperationalInsights.csproj
run: dotnet restore src/Couchbase.Analytics/Couchbase.Analytics.csproj

- name: Build (Release)
run: dotnet build src/Couchbase.OperationalInsights/Couchbase.OperationalInsights.csproj --configuration Release --no-restore
run: dotnet build src/Couchbase.Analytics/Couchbase.Analytics.csproj --configuration Release --no-restore

- name: Test - Couchbase.OperationalInsights.UnitTests (net8.0)
run: dotnet test tests/Couchbase.OperationalInsights.UnitTests/Couchbase.OperationalInsights.UnitTests.csproj --configuration Release --framework net8.0 --logger GitHubActions --logger "trx;LogFileName=unit-tests-net8.0.trx" --results-directory "TestResults"
- name: Test - Couchbase.Analytics.UnitTests (net8.0)
run: dotnet test tests/Couchbase.Analytics.UnitTests/Couchbase.Analytics.UnitTests.csproj --configuration Release --framework net8.0 --logger GitHubActions --logger "trx;LogFileName=unit-tests-net8.0.trx" --results-directory "TestResults"

- name: Test - Couchbase.OperationalInsights.UnitTests (net10.0)
- name: Test - Couchbase.Analytics.UnitTests (net10.0)
if: ${{ !cancelled() }}
run: dotnet test tests/Couchbase.OperationalInsights.UnitTests/Couchbase.OperationalInsights.UnitTests.csproj --configuration Release --framework net10.0 --logger GitHubActions --logger "trx;LogFileName=unit-tests-net10.0.trx" --results-directory "TestResults"
run: dotnet test tests/Couchbase.Analytics.UnitTests/Couchbase.Analytics.UnitTests.csproj --configuration Release --framework net10.0 --logger GitHubActions --logger "trx;LogFileName=unit-tests-net10.0.trx" --results-directory "TestResults"

- name: Upload Test Results
if: always()
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
cache: false

- name: Restore
run: dotnet restore src/Couchbase.OperationalInsights/Couchbase.OperationalInsights.csproj
run: dotnet restore src/Couchbase.Analytics/Couchbase.Analytics.csproj

- name: Prepare strong-name key (SNK)
shell: pwsh
Expand All @@ -162,14 +162,14 @@ jobs:
- name: Build andPack (Release, signed)
shell: pwsh
run: |
dotnet build src/Couchbase.OperationalInsights/Couchbase.OperationalInsights.csproj -c Release --no-restore /p:ContinuousIntegrationBuild=true /p:Version="${{ needs.validate-inputs.outputs.tag }}" /p:IncludeSymbols=true /p:IncludeSource=true /p:SourceLinkCreate=true /p:SignAssembly=true /p:AssemblyOriginatorKeyFile="$env:SIGNKEY_PATH"
dotnet pack src/Couchbase.OperationalInsights/Couchbase.OperationalInsights.csproj -c Release /p:ContinuousIntegrationBuild=true /p:Version="${{ needs.validate-inputs.outputs.tag }}" /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:IncludeSource=true /p:SourceLinkCreate=true /p:SignAssembly=true /p:AssemblyOriginatorKeyFile="$env:SIGNKEY_PATH"
dotnet build src/Couchbase.Analytics/Couchbase.Analytics.csproj -c Release --no-restore /p:ContinuousIntegrationBuild=true /p:Version="${{ needs.validate-inputs.outputs.tag }}" /p:IncludeSymbols=true /p:IncludeSource=true /p:SourceLinkCreate=true /p:SignAssembly=true /p:AssemblyOriginatorKeyFile="$env:SIGNKEY_PATH"
dotnet pack src/Couchbase.Analytics/Couchbase.Analytics.csproj -c Release /p:ContinuousIntegrationBuild=true /p:Version="${{ needs.validate-inputs.outputs.tag }}" /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:IncludeSource=true /p:SourceLinkCreate=true /p:SignAssembly=true /p:AssemblyOriginatorKeyFile="$env:SIGNKEY_PATH"

- name: Verify package contents (DLL <-> PDB parity)
shell: pwsh
run: |
$ver = "${{ needs.validate-inputs.outputs.tag }}"
$packDir = "src/Couchbase.OperationalInsights/bin/Release"
$packDir = "src/Couchbase.Analytics/bin/Release"
$nupkg = Get-ChildItem -Path $packDir -Filter "*.$ver.nupkg" | Where-Object { $_.Name -notlike "*.symbols.nupkg" } | Select-Object -First 1
$snupkg = Get-ChildItem -Path $packDir -Filter "*.$ver.snupkg" | Select-Object -First 1
if (-not $nupkg) { Write-Error "No .nupkg matching version $ver found in $packDir"; exit 1 }
Expand Down Expand Up @@ -213,8 +213,8 @@ jobs:
with:
name: nuget-packages
path: |
src/Couchbase.OperationalInsights/bin/Release/*.nupkg
src/Couchbase.OperationalInsights/bin/Release/*.snupkg
src/Couchbase.Analytics/bin/Release/*.nupkg
src/Couchbase.Analytics/bin/Release/*.snupkg


publish:
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ __pycache__/
# OpenCover UI analysis results
OpenCover/

# Azure Stream OperationalInsights local run output
# Azure Stream Analytics local run output
ASALocalRun/

# MSBuild Binary and Structured Log
Expand Down Expand Up @@ -406,7 +406,7 @@ FodyWeavers.xsd
*.sln.iml

# test config
tests/Couchbase.OperationalInsights.FunctionalTests/settings.json
tests/Couchbase.Analytics.FunctionalTests/settings.json

#generated api docs
docs/_site/
Expand Down
8 changes: 4 additions & 4 deletions Couchbase.OperationalInsights.sln → Couchbase.Analytics.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{50354FD0-1B8
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{98962587-231C-4D1F-AC3D-4C21302C331B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Couchbase.OperationalInsights", "src\Couchbase.OperationalInsights\Couchbase.OperationalInsights.csproj", "{700EC51C-9F32-4C1A-826E-9252522E953F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Couchbase.Analytics", "src\Couchbase.Analytics\Couchbase.Analytics.csproj", "{700EC51C-9F32-4C1A-826E-9252522E953F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Couchbase.OperationalInsights.FunctionalTests", "tests\Couchbase.OperationalInsights.FunctionalTests\Couchbase.OperationalInsights.FunctionalTests.csproj", "{3E0EE6AE-0579-4AFE-B4A1-14C6C72DF5F5}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Couchbase.Analytics.FunctionalTests", "tests\Couchbase.Analytics.FunctionalTests\Couchbase.Analytics.FunctionalTests.csproj", "{3E0EE6AE-0579-4AFE-B4A1-14C6C72DF5F5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Couchbase.OperationalInsights.UnitTests", "tests\Couchbase.OperationalInsights.UnitTests\Couchbase.OperationalInsights.UnitTests.csproj", "{890378AD-7F74-4C86-923B-24DB7539574F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Couchbase.Analytics.UnitTests", "tests\Couchbase.Analytics.UnitTests\Couchbase.Analytics.UnitTests.csproj", "{890378AD-7F74-4C86-923B-24DB7539574F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D7E5390F-CFF1-42D7-A36C-D8E4FBE38918}"
ProjectSection(SolutionItems) = preProject
Directory.Packages.props = Directory.Packages.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Couchbase.OperationalInsights.Performer", "fit\Couchbase.OperationalInsights.Performer\Couchbase.OperationalInsights.Performer.csproj", "{04159D2F-74A8-4200-818F-B279DBCBBC5A}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Couchbase.Analytics.Performer", "fit\Couchbase.Analytics.Performer\Couchbase.Analytics.Performer.csproj", "{04159D2F-74A8-4200-818F-B279DBCBBC5A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fit", "fit", "{A58FEC0E-429F-460F-AF40-52DC21C93576}"
EndProject
Expand Down
Loading
Loading