Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
000b327
started work
Gazizonoki Apr 18, 2025
2376c54
C API
Gazizonoki May 10, 2025
c992878
ODBC MVP
Gazizonoki May 16, 2025
64c8ace
Revert C API
Gazizonoki May 16, 2025
4f91688
Parameter bind
Gazizonoki May 26, 2025
51a187a
Add unit test
Gazizonoki May 26, 2025
7e23d5d
fix
Gazizonoki May 26, 2025
4b35fed
added tx support
Gazizonoki May 26, 2025
de5c2f0
step
Gazizonoki May 30, 2025
2d19bb3
step
Gazizonoki Jun 2, 2025
5483076
step
Gazizonoki Jun 3, 2025
4d46cc0
Error handlig
Gazizonoki Jul 11, 2025
cb780dd
some fixes
Apr 7, 2026
ca88140
env features
Apr 7, 2026
110b157
attributes
Apr 8, 2026
fcce7de
fix
Apr 9, 2026
8ffb1ed
driver pool
Ylonies Apr 17, 2026
ea68d71
conn attributes
Ylonies Apr 17, 2026
28e1ce3
stmt attr
Ylonies Apr 18, 2026
cbbd561
retry qyery for autocommit
Ylonies Apr 18, 2026
db1af14
getdiagfield + fixes
Ylonies Apr 27, 2026
00bef32
review fixes
Ylonies May 5, 2026
591f269
full core api tests
Ylonies May 6, 2026
528501d
some metadata functions
Ylonies May 7, 2026
c95604d
erlang odbc client
Ylonies May 7, 2026
c7591fd
fixes
Ylonies May 12, 2026
caa906a
fix odbc covert for chrono
Ylonies May 16, 2026
12de367
fix
Ylonies May 18, 2026
48b0493
review fixes
Ylonies May 20, 2026
785d520
refactor exec cursor prefetch and test CMake
Ylonies May 23, 2026
709787b
mv examples odbc
Ylonies May 23, 2026
c17df8b
odbcinst.ini on build and install
Ylonies May 24, 2026
3efaa7d
fix PIC for .so builds
Jun 8, 2026
978386b
fix odbc driver binding behaviour
Jun 10, 2026
59e5665
fix build
Jun 10, 2026
f8845f9
fix the bind param feature
Jun 11, 2026
051eecd
fix cmake pr regression
Jun 11, 2026
a96b292
remove useless driver pool
Jun 17, 2026
7d2a8ab
driver::Stop(true):)
Jun 17, 2026
c0f2582
fully core-odbc compliant driver
Jun 17, 2026
2a26a53
fix the tests
Jun 18, 2026
c0b2d01
fix odbc core conformance
Jul 14, 2026
0253e44
work in progress
Jul 28, 2026
abcba3e
performance is not an acceptance criteria
Jul 29, 2026
bb8f032
document actual odbc limitations
Jul 30, 2026
e3c81b7
create a doc with goals and restrictions
Jul 31, 2026
0e7879d
fix qt odbc
Jul 31, 2026
fbf6e0b
add odbc deb package
Jul 31, 2026
a7fe5e5
run tests for odbc pull requests
Jul 31, 2026
64aaf33
run only odbc tests for feature pull requests
Jul 31, 2026
19f100e
fix driver ownership
Aug 3, 2026
4fdae09
implemented connection string authentification
Aug 4, 2026
70a65e0
remove useless stats conditional
Aug 4, 2026
7c343f4
fix SQL_DIAG_ROW_COUNT
Aug 4, 2026
0da2830
fix issues and ci
Aug 4, 2026
c7e8878
Align ODBC packaging with CPack workflow
Aug 11, 2026
7b7fc0a
Fix ODBC integration runtime dependencies
Aug 12, 2026
6308ce7
add qt test
Aug 13, 2026
055c330
Simplify ODBC integration workflow
Aug 13, 2026
a019ded
Publish ODBC integration reports
Aug 13, 2026
8b15ca7
Publish ODBC Allure report on Pages
Aug 13, 2026
3df8693
Run upstream Qt ODBC integration suite
Aug 13, 2026
a7235a3
Preserve Qt errors in Allure reports
Aug 14, 2026
d715f81
Report expected Qt failures in Allure
Aug 14, 2026
90e92ce
Isolate upstream Qt ODBC conformance runs
Aug 14, 2026
617958d
Fix Qt fixture patching in CI
Aug 14, 2026
c1f57be
Stabilize Qt ODBC conformance results
Aug 14, 2026
c791f33
Reclassify Qt ODBC expected failures
Aug 17, 2026
dce37ab
Complete Qt ODBC integration coverage
Aug 17, 2026
94004e7
Fix ODBC compatibility across YDB versions
Aug 18, 2026
95de7d3
refactor driver
Aug 18, 2026
b0dad04
Refactor ODBC internals to reduce duplication
Aug 18, 2026
a280f64
Fix standalone ODBC unit build dependencies
Aug 19, 2026
4845a1f
Fix ODBC parser and API edge cases
Aug 20, 2026
8640796
Narrow ODBC binding proposal
Aug 20, 2026
bf22c1c
Define final ODBC result and concurrency contract
Aug 20, 2026
f482b9e
SQLNativeSql
Aug 20, 2026
6ef9f73
Implement static ODBC cursors
Aug 21, 2026
e1d6a58
Simplify static ODBC cursor storage
Aug 21, 2026
f469c57
Fix ODBC CI classification and cursor test build
Aug 21, 2026
b1d3828
Fix Qt static cursor navigation
Aug 21, 2026
a84607c
Classify remaining Qt limitations
Aug 24, 2026
4c77797
Fix qt untyped null to null conversions
Aug 24, 2026
088d73b
simplify rowset resolving
Aug 24, 2026
9ab48c3
fix review issues
Aug 24, 2026
4b3cd3e
more detailed errors
Aug 24, 2026
3ed0fa8
fix cursor state handling
Aug 24, 2026
8fc8402
Cap forward cursor rowset reservation
Shfdis Aug 24, 2026
b01048f
Fix ODBC interoperability and packaging
Aug 27, 2026
2b1e75c
Fix ODBC prepared metadata lifecycle
Aug 28, 2026
7307f32
Fix ODBC escape clause parsing
Aug 28, 2026
8b88c2c
Fix macOS registration and ODBC database identity
Aug 31, 2026
c4e5b84
Expose complete ODBC database identity
Aug 31, 2026
7fabbd5
Handle legacy YDB DBMS version metadata
Sep 1, 2026
fbec8db
YDBAPPTEAM-1843 implement ODBC catalog metadata
Sep 12, 2026
91b0e62
YDBAPPTEAM-1843 compact ODBC metadata implementation
Sep 12, 2026
c2e9c04
YDBAPPTEAM-1843 gate unique index integration coverage by server capa…
Sep 28, 2026
af8ff3f
YDBAPPTEAM-1843 address ODBC metadata review feedback
Shfdis Sep 29, 2026
1b731dc
YDBAPPTEAM-1843 address follow-up ODBC metadata review
Shfdis Sep 30, 2026
6be8183
odbc: support sequential result sets
Shfdis Oct 5, 2026
050218b
odbc: cover empty and nullable result sets in regression tests
Shfdis Oct 5, 2026
a7a9a79
odbc: avoid duplicate invalid-column diagnostics per rowset
Shfdis Oct 6, 2026
072b069
odbc: make handle lifetimes and concurrent execution safe
Oct 6, 2026
3c5b2d3
odbc: fix cancellation compatibility and allocation cleanup
Oct 6, 2026
edce45e
odbc: recover cancelled transactions already aborted by the server
Oct 6, 2026
e7d7f81
odbc: fix transaction recovery test for clang
Oct 6, 2026
795795e
odbc: recover abandoned transactions without reusing cancelled sessions
Oct 6, 2026
6542b3b
odbc: order cross-connection descriptor gates and await SDK lease cle…
Oct 6, 2026
e30694c
odbc: bind synchronization to handle and state owners
Oct 7, 2026
03a3590
Consolidate ODBC handle ownership and descriptor synchronization
Oct 7, 2026
ed14f8f
odbc: simplify cancellation and bindings
Oct 9, 2026
3004f25
odbc: fix cancel diagnostics and descriptor generations
Oct 9, 2026
06cdb39
odbc: simplify handle ownership
Oct 9, 2026
97b5e8c
odbc: make cancellation tests deterministic
Oct 12, 2026
bd80bf6
odbc: remove registry and preserve cancellation requests
Oct 15, 2026
33b6768
odbc: trim test additions
Oct 15, 2026
03b1a08
odbc: recover sessions after transaction failures
Oct 21, 2026
0c400f5
odbc: add consumer verification matrix
Oct 22, 2026
c971759
Remove Perl ODBC consumer
Shfdis Oct 22, 2026
5318342
Remove Erlang and Haskell ODBC consumers
Shfdis Oct 22, 2026
3c22e1f
Remove stale Erlang example and clarify source locks
Shfdis Oct 26, 2026
e475657
Fix ODBC parameter metadata, binding and SELECT arrays
Shfdis Oct 28, 2026
a454ec7
Fix PHP and Lua ODBC fetching (#686)
Shfdis Nov 2, 2026
219fd09
Fix ODBC catalog column sizes
Nov 2, 2026
3efcec7
Enable ODBC comma joins on latest YDB
Shfdis Nov 2, 2026
e158fa1
Preserve SQL lexer directives in ODBC
Nov 3, 2026
7772a6c
Fix R ODBC table roundtrips
Nov 5, 2026
087e843
Fix ODBC metadata and value binding
Nov 6, 2026
5da09e8
Fix binary fetches and unsigned precision
Nov 6, 2026
365e8ca
Fix ODBC consumer compatibility
Nov 6, 2026
b0381ec
Fix ODBC bindings without consumer patches
Nov 9, 2026
59de26e
Preserve wide temporal fixture types
Nov 9, 2026
85e4669
Return only relations from SQLTables
Nov 9, 2026
c2fa93b
Restore the stock append-to-new-table call
Nov 9, 2026
49d3e84
Support binary input for character parameters
Nov 9, 2026
b072494
Use YDB binary literals in binding fixtures
Nov 9, 2026
b22de4e
Preserve NULL binary fixture literals
Nov 9, 2026
b32719d
Describe floating arithmetic parameters
Nov 9, 2026
a8513d9
Describe system-view columns
Nov 9, 2026
6917434
Report reproduced upstream consumer failures
Nov 9, 2026
3bdd5cd
Preserve Qt binding calls in YDB fixtures
Nov 9, 2026
f0f9dd2
Fix ODBC metadata and complete consumer coverage
Nov 10, 2026
1a977aa
Fix PHP type-info fixture context
Nov 10, 2026
a71cd65
Support cursor-library statement allocation
Nov 11, 2026
ee48a10
Restore applicable consumer coverage
Nov 11, 2026
1fa3969
Fix ODBC test linkage and crash reporting
Nov 11, 2026
97b371d
Fix ODBC parameter limits and cursor docs
Nov 11, 2026
de8dfff
Use Ubuntu mirrors for CI dependencies
Nov 11, 2026
e466997
Restore CI dependency setup
Nov 11, 2026
c1a8015
Fix ODBC integration fixtures and runtime dependencies
Nov 11, 2026
708162c
Fix ODBC temporal bindings and metadata
Nov 12, 2026
22a0cf3
Wait for IAM storage readiness
Nov 12, 2026
c2450c3
Keep consumer health probes read-only
Shfdis Nov 12, 2026
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
5 changes: 3 additions & 2 deletions .github/actions/prepare_vm/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ runs:
if [[ '${{ inputs.mode }}' == 'build' ]]; then
sudo apt-get -y install \
ccache clang g++ gcc git libidn11-dev libssl-dev lld ninja-build \
pkg-config python3 ragel yasm
pkg-config python3 ragel unixodbc-dev yasm
ccache --set-config=base_dir="$(realpath ..)"
ccache --set-config=cache_dir="$HOME/.ccache"
ccache --zero-stats
else
sudo apt-get -y install libidn12 libssl3 libstdc++6
# unixODBC loads libodbccr.so through the development package's symlink.
sudo apt-get -y install libidn12 libodbc2 libodbcinst2 libssl3 libstdc++6 unixodbc-dev
fi
24 changes: 17 additions & 7 deletions .github/scripts/run_iam_integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euo pipefail

IAM_REGEX='^(DriverAuth|TMetadataFixture|TJwtIamFixture|TOAuthIamFixture|OAuth_WithFacility)\.'
IAM_REGEX='^(DriverAuth|TMetadataFixture|TJwtIamFixture|TOAuthIamFixture|OAuth_WithFacility|OdbcAuthentication)\.'
IAM_CONTAINER_NAME="${IAM_CONTAINER_NAME:-ydb-iam}"
IAM_CTEST_JOBS="${IAM_CTEST_JOBS:-2}"
IAM_READY_ATTEMPTS="${IAM_READY_ATTEMPTS:-60}"
Expand All @@ -15,10 +15,8 @@ cleanup_iam() {

wait_for_iam_ydb() {
for _ in $(seq 1 "${IAM_READY_ATTEMPTS}"); do
if docker exec -e "YDB_TOKEN=${IAM_TOKEN}" "${IAM_CONTAINER_NAME}" /ydb \
--endpoint grpc://localhost:2136 \
--database /local \
sql -s 'select 1' >/dev/null 2>&1; then
if docker exec -e "YDB_TOKEN=${IAM_TOKEN}" "${IAM_CONTAINER_NAME}" \
bash /health_check --readiness >/dev/null 2>&1; then
return 0
fi
sleep "${IAM_READY_SLEEP_SECONDS}"
Expand All @@ -29,19 +27,31 @@ wait_for_iam_ydb() {
return 1
}

provision_odbc_static_user() {
docker exec -e "YDB_TOKEN=${IAM_TOKEN}" "${IAM_CONTAINER_NAME}" /ydb \
--endpoint grpc://localhost:2236 \
--database /local \
sql -s "CREATE USER odbcauth PASSWORD '12345678'"
}

trap cleanup_iam EXIT
cleanup_iam

docker run -d --name "${IAM_CONTAINER_NAME}" --hostname localhost \
-p 2235:2135 -p 2236:2136 -p 28765:8765 \
-p 2235:2235 -p 2236:2236 -p 28765:28765 \
-v /tmp/ydb_iam_certs:/ydb_certs \
-e GRPC_TLS_PORT=2235 \
-e GRPC_PORT=2236 \
-e MON_PORT=28765 \
-e YDB_USE_IN_MEMORY_PDISKS=true \
-e YDB_TABLE_ENABLE_PREPARED_DDL=true \
-e YDB_ENFORCE_USER_TOKEN_REQUIREMENT=true \
-e YDB_DEFAULT_CLUSTERADMIN=root@builtin \
ghcr.io/ydb-platform/local-ydb:trunk
"${IAM_YDB_IMAGE:-ghcr.io/ydb-platform/local-ydb:trunk}"

wait_for_iam_ydb
provision_odbc_static_user

YDB_ENDPOINT=localhost:2236 YDB_DATABASE=/local \
YDB_ODBC_STATIC_USER=odbcauth YDB_ODBC_STATIC_PASSWORD=12345678 \
ctest -j"${IAM_CTEST_JOBS}" --test-dir build -R "${IAM_REGEX}" --output-on-failure
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
run: |
set -euo pipefail

IAM_REGEX='^(DriverAuth|TMetadataFixture|TJwtIamFixture|TOAuthIamFixture|OAuth_WithFacility)\.'
IAM_REGEX='^(DriverAuth|TMetadataFixture|TJwtIamFixture|TOAuthIamFixture|OAuth_WithFacility|OdbcAuthentication)\.'
FLAKY_REGEX='(ManyMessages|DiscoveryHang|DescribeHang)'
EXCLUDE_REGEX="${IAM_REGEX}|${FLAKY_REGEX}"

Expand Down
227 changes: 227 additions & 0 deletions .github/workflows/odbc-integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
name: ODBC consumer integration
on:
pull_request:
branches: [odbc-driver-feature]
types: [labeled, synchronize, reopened, ready_for_review, closed]
permissions: {contents: read}
concurrency: {group: "odbc-integration-${{ github.event.pull_request.number }}-${{ github.event.action == 'closed' && 'merged' || 'pr' }}", cancel-in-progress: true}
jobs:
build:
timeout-minutes: 60
name: Build and validate ydb-odbc package
if: >-
(github.event.action == 'closed' && github.event.pull_request.merged == true) ||
(github.event.action != 'closed' &&
contains(github.event.pull_request.labels.*.name, 'ODBC full matrix'))
runs-on: ubuntu-24.04
outputs:
matrix: ${{ steps.registry.outputs.matrix }}
config: ${{ steps.registry.outputs.config }}
target_sha: ${{ steps.target.outputs.sha }}
package_sha256: ${{ steps.package.outputs.sha256 }}
env:
CPM_SOURCE_CACHE: ${{ github.workspace }}/.cache/cpm
CCACHE_DIR: ${{ github.workspace }}/.cache/ccache
steps:
- name: Resolve tested commit
id: target
run: echo 'sha=${{ github.event.action == 'closed' && github.event.pull_request.merge_commit_sha || github.event.pull_request.head.sha }}' >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
with:
ref: ${{ steps.target.outputs.sha }}
- name: Validate harness and create matrix
id: registry
run: |
python3 -m pip install --user --break-system-packages 'PyYAML==6.0.2'
harness=odbc/tests/frameworks/harness.py
python3 "$harness" registry
python3 -m unittest odbc.tests.test_integration_harness
echo "matrix=$(python3 "$harness" registry --matrix)" >> "$GITHUB_OUTPUT"
echo "config=$(python3 "$harness" registry --config)" >> "$GITHUB_OUTPUT"
- name: Restore dependency and compiler caches
uses: actions/cache@v4
with:
path: |
.cache/cpm
.cache/ccache
key: deb-ubuntu-24.04-${{ hashFiles('cmake/CPM.cmake', 'cmake/dependencies.cmake') }}-${{ github.run_id }}
restore-keys: |
deb-ubuntu-24.04-${{ hashFiles('cmake/CPM.cmake', 'cmake/dependencies.cmake') }}-
- name: Build ODBC package component
env:
YDB_DEB_COMPONENTS: ydb-odbc
run: ./scripts/build_cpack_deb_packages.sh build-odbc/packages
- name: Validate and upload package
id: package
shell: bash
run: |
shopt -s nullglob
packages=(build-odbc/packages/ydb-odbc_*.deb)
test "${#packages[@]}" -eq 1
sha256sum "${packages[0]}" > build-odbc/packages/ydb-odbc.sha256
dpkg-deb -f "${packages[0]}" > build-odbc/packages/ydb-odbc.control
echo "sha256=$(sha256sum "${packages[0]}" | cut -d ' ' -f1)" >> "$GITHUB_OUTPUT"
- uses: actions/upload-artifact@v4
with:
name: ydb-odbc-package
path: build-odbc/packages/ydb-odbc*
if-no-files-found: error
retention-days: 3
- name: Run package contract
continue-on-error: true
env:
DRIVER_COMMIT: ${{ steps.target.outputs.sha }}
YDB_TEST_IMAGE: ${{ fromJSON(steps.registry.outputs.config).ydb.image }}
YDB_ENDPOINT: ${{ fromJSON(steps.registry.outputs.config).ydb.endpoint }}
YDB_DATABASE: ${{ fromJSON(steps.registry.outputs.config).ydb.database }}
run: >-
python3 odbc/tests/frameworks/harness.py launch --consumer package-contract
--runtime-image '${{ fromJSON(steps.registry.outputs.config).package_runtime_image }}'
--package build-odbc/packages/ydb-odbc_*.deb --results results/package-contract
- uses: actions/upload-artifact@v4
if: always()
with:
name: odbc-results-package-contract
path: results/package-contract
if-no-files-found: warn
retention-days: 14
consumers:
timeout-minutes: 40
name: ${{ matrix.display_name }} (${{ matrix.mode }})
needs: build
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.build.outputs.matrix) }}
services:
ydb:
image: ${{ fromJSON(needs.build.outputs.config).ydb.image }}
ports: [2136:2136]
env: {YDB_USE_IN_MEMORY_PDISKS: true, YDB_TABLE_ENABLE_PREPARED_DDL: true, YDB_READINESS_ENABLE_DDL: 'false'}
options: --hostname localhost
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.build.outputs.target_sha }}
- uses: actions/download-artifact@v4
with:
name: ydb-odbc-package
path: package
- name: Wait for YDB
shell: bash
run: |
for attempt in $(seq 1 60); do
docker exec -e YDB_READINESS_ENABLE_DDL=true '${{ job.services.ydb.id }}' \
bash /health_check --readiness >/dev/null 2>&1 && exit 0
sleep 2
done
docker logs '${{ job.services.ydb.id }}' || true
exit 1
- name: Run consumer
env:
DRIVER_COMMIT: ${{ needs.build.outputs.target_sha }}
YDB_TEST_IMAGE: ${{ fromJSON(needs.build.outputs.config).ydb.image }}
YDB_ENDPOINT: ${{ fromJSON(needs.build.outputs.config).ydb.endpoint }}
YDB_DATABASE: ${{ fromJSON(needs.build.outputs.config).ydb.database }}
run: >-
python3 odbc/tests/frameworks/harness.py launch --consumer '${{ matrix.consumer }}'
--mode '${{ matrix.mode }}'
--runtime-image '${{ matrix.runtime_image }}' --package package/ydb-odbc_*.deb
--results 'results/${{ matrix.run_id }}'
- uses: actions/upload-artifact@v4
if: always()
with:
name: odbc-results-${{ matrix.run_id }}
path: results/${{ matrix.run_id }}
if-no-files-found: warn
retention-days: 14
aggregate:
name: Aggregate ODBC reports
if: always() && needs.build.result == 'success'
needs: [build, consumers]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.build.outputs.target_sha }}
- run: python3 -m pip install --user --break-system-packages 'PyYAML==6.0.2'
- uses: actions/download-artifact@v4
continue-on-error: true
with:
pattern: odbc-results-*
path: collected-results
- name: Aggregate and validate results
env:
DRIVER_COMMIT: ${{ needs.build.outputs.target_sha }}
ODBC_PACKAGE_SHA256: ${{ needs.build.outputs.package_sha256 }}
id: aggregate
continue-on-error: true
run: >-
set -o pipefail; python3 odbc/tests/frameworks/harness.py aggregate --input collected-results
--output aggregated-results | tee -a "$GITHUB_STEP_SUMMARY"
- uses: actions/setup-node@v4
if: always()
with: {node-version: '22'}
- name: Generate browser report
id: allure
if: always()
continue-on-error: true
run: npx -y [email protected] generate aggregated-results/allure-results --output aggregated-results/html
- uses: actions/upload-artifact@v4
if: always()
with:
name: odbc-integration-report
path: aggregated-results
if-no-files-found: warn
retention-days: 14
- name: Enforce integration result
if: always()
run: test '${{ steps.aggregate.outcome }}' = success && test '${{ steps.allure.outcome }}' = success
publish:
name: Publish ODBC HTML report
if: always() && needs.build.result == 'success' && needs.aggregate.result != 'cancelled' && github.event.pull_request.head.repo.full_name == github.repository
needs: [build, aggregate]
runs-on: ubuntu-24.04
concurrency: {group: odbc-pages, cancel-in-progress: false}
permissions: {contents: write, pull-requests: write}
steps:
- uses: actions/checkout@v4
with: {ref: gh-pages, path: pages}
- uses: actions/download-artifact@v4
with: {name: odbc-integration-report, path: report}
- name: Publish report to GitHub Pages
id: pages
working-directory: pages
env: {DESTINATION: 'reports/odbc/pr-${{ github.event.pull_request.number }}'}
run: |
if test -d "$GITHUB_WORKSPACE/report/html"; then
rm -rf "$DESTINATION" && mkdir -p "$DESTINATION"
cp -a "$GITHUB_WORKSPACE/report/html/." "$DESTINATION/"
git add "$DESTINATION"
if ! git diff --cached --quiet; then
git -c user.name=github-actions[bot] -c user.email=41898282+github-actions[bot]@users.noreply.github.com commit -m "Publish ODBC report for PR #${{ github.event.pull_request.number }}"
git push
fi
echo available=true >> "$GITHUB_OUTPUT"
fi
- name: Add report link to pull request
continue-on-error: true
uses: actions/github-script@v7
env:
REPORT_URL: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/reports/odbc/pr-${{ github.event.pull_request.number }}/index.html
REPORT_RESULT: ${{ needs.aggregate.result }}
REPORT_SHA: ${{ needs.build.outputs.target_sha }}
REPORT_AVAILABLE: ${{ steps.pages.outputs.available }}
with:
script: |
const marker = '<!-- ydb-odbc-integration-report -->'
const artifacts = await github.paginate(github.rest.actions.listWorkflowRunArtifacts, {...context.repo, run_id: context.runId, per_page: 100})
const artifact = artifacts.find(item => item.name === 'odbc-integration-report')
const download = artifact ? `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}/artifacts/${artifact.id}` : `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`
const browser = process.env.REPORT_AVAILABLE === 'true' ? `✨ [Open the interactive Allure report](${process.env.REPORT_URL})` : '⚠️ The browser report could not be generated.'
const body = `${marker}\n### ODBC integration report\n${browser} · 📦 [Download the report bundle](${download})\n\nCommit: \`${process.env.REPORT_SHA}\`; result: **${process.env.REPORT_RESULT}**; updated by each run.`
const request = {...context.repo, issue_number: context.issue.number, per_page: 100}
const comments = await github.paginate(github.rest.issues.listComments, request)
const previous = comments.find(comment => comment.body?.includes(marker))
if (previous) await github.rest.issues.updateComment({...context.repo, comment_id: previous.id, body})
else await github.rest.issues.createComment({...context.repo, issue_number: context.issue.number, body})
24 changes: 22 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
- odbc-driver-feature
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
Expand Down Expand Up @@ -56,9 +57,15 @@ jobs:
with:
compiler: ${{ matrix.compiler }}
- name: Test
if: github.event_name != 'pull_request' || github.base_ref == 'main'
shell: bash
run: |
ctest -j$(nproc) --preset unit
- name: Test ODBC
if: github.event_name == 'pull_request' && github.base_ref == 'odbc-driver-feature'
shell: bash
run: |
ctest --test-dir build/odbc/tests/unit -j$(nproc) --output-on-failure
- name: Package integration build
shell: bash
run: |
Expand Down Expand Up @@ -88,7 +95,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ydb-version: [24.1, 24.2, 24.3, 24.4, 25.1, trunk]
ydb-version: ${{ fromJSON(github.event_name == 'pull_request' && github.base_ref == 'odbc-driver-feature' && '["latest"]' || '[24.1, 24.2, 24.3, 24.4, 25.1, "trunk"]') }}
compiler: [clang, gcc]
services:
ydb:
Expand Down Expand Up @@ -128,9 +135,10 @@ jobs:
mkdir -p build
tar -C build -xzf "integration-build-${{ matrix.compiler }}.tar.gz"
- name: Test
if: github.event_name != 'pull_request' || github.base_ref == 'main'
shell: bash
run: |
IAM_REGEX='^(DriverAuth|TMetadataFixture|TJwtIamFixture|TOAuthIamFixture|OAuth_WithFacility)\.'
IAM_REGEX='^(DriverAuth|TMetadataFixture|TJwtIamFixture|TOAuthIamFixture|OAuth_WithFacility|OdbcAuthentication)\.'

YDB_VERSION=${{ matrix.ydb-version }} ctest -j2 --preset integration \
-E "${IAM_REGEX}" --output-on-failure
Expand All @@ -140,8 +148,20 @@ jobs:
./.github/scripts/run_iam_integration_tests.sh
;;
esac
- name: Test ODBC
if: github.event_name == 'pull_request' && github.base_ref == 'odbc-driver-feature'
shell: bash
env:
IAM_YDB_IMAGE: ydbplatform/local-ydb:latest
run: |
YDB_VERSION=${{ matrix.ydb-version }} \
ctest --test-dir build/odbc/tests/integration -j2 \
-E '^OdbcAuthentication\.' --output-on-failure

./.github/scripts/run_iam_integration_tests.sh

test-install:
if: github.event_name != 'pull_request' || github.base_ref == 'main'
name: "Test CMake Install"
concurrency:
group: test-install-${{ github.ref }}-${{ matrix.compiler }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ _deps
!*/canondata/*
# Unignore all files inside .github dir
!*/.github/*
# Integration adapter entrypoints
!odbc/tests/frameworks/*/run-tests
# C libraries
*.so
*.a
Expand Down
Loading
Loading