diff --git a/amazon-timestream-odbc-driver/.github/ISSUE_TEMPLATE/bug-report.yml b/amazon-timestream-odbc-driver/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000000000..3d57ca810fda6 --- /dev/null +++ b/amazon-timestream-odbc-driver/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,84 @@ +--- +name: "🐛 Bug Report" +description: Report a bug +title: "(short issue description)" +labels: [bug, needs-triage] +assignees: [] +body: + - type: textarea + id: description + attributes: + label: Describe the bug + description: What is the problem? A clear and concise description of the bug. + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: | + What did you expect to happen? + validations: + required: true + - type: textarea + id: current + attributes: + label: Current Behavior + description: | + What actually happened? + + Please include full errors, uncaught exceptions, stack traces, and relevant logs. + If service responses are relevant, please include wire logs. + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Reproduction Steps + description: | + Provide a self-contained, concise snippet of code that can be used to reproduce the issue. + For more complex issues provide a repo with the smallest sample that reproduces the bug. + + Avoid including business logic or unrelated code, it makes diagnosis more difficult. + The code sample should be an SSCCE. See http://sscce.org/ for details. In short, please provide a code sample that we can copy/paste, run and reproduce. + validations: + required: true + - type: textarea + id: solution + attributes: + label: Possible Solution + description: | + Suggest a fix/reason for the bug + validations: + required: false + - type: textarea + id: context + attributes: + label: Additional Information/Context + description: | + Anything else that might be relevant for troubleshooting this bug. Providing context helps us come up with a solution that is most useful in the real world. + validations: + required: false + + - type: textarea + id: odbc-log + attributes: + label: Timestream ODBC Driver Log + description: | + Timestream ODBC driver log could be helpful for root cause analysis. + validations: + required: false + + - type: input + id: odbc-version + attributes: + label: Timestream ODBC Driver version + validations: + required: true + + - type: input + id: operating-system + attributes: + label: Host Operating System and version + validations: + required: true diff --git a/amazon-timestream-odbc-driver/.github/ISSUE_TEMPLATE/documentation.yml b/amazon-timestream-odbc-driver/.github/ISSUE_TEMPLATE/documentation.yml new file mode 100644 index 0000000000000..62ce15ef46007 --- /dev/null +++ b/amazon-timestream-odbc-driver/.github/ISSUE_TEMPLATE/documentation.yml @@ -0,0 +1,23 @@ +--- +name: "📕 Documentation Issue" +description: Report an issue in the Timestream ODBC documentation or Developer Guide +title: "(short issue description)" +labels: [documentation, needs-triage] +assignees: [] +body: + - type: textarea + id: description + attributes: + label: Describe the issue + description: A clear and concise description of the issue. + validations: + required: true + + - type: textarea + id: links + attributes: + label: Links + description: | + Include links to affected documentation page(s). + validations: + required: true diff --git a/amazon-timestream-odbc-driver/.github/ISSUE_TEMPLATE/feature-request.yml b/amazon-timestream-odbc-driver/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 0000000000000..11d667d87f8eb --- /dev/null +++ b/amazon-timestream-odbc-driver/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,47 @@ +--- +name: 🚀 Feature Request +description: Suggest an idea for this project +title: "(short issue description)" +labels: [feature-request, needs-triage] +assignees: [] +body: + - type: textarea + id: description + attributes: + label: Describe the feature + description: A clear and concise description of the feature you are proposing. + validations: + required: true + - type: textarea + id: use-case + attributes: + label: Use Case + description: | + Why do you need this feature? For example: "I'm always frustrated when..." + validations: + required: true + - type: textarea + id: solution + attributes: + label: Proposed Solution + description: | + Suggest how to implement the addition or change. Please include prototype/workaround/sketch/reference implementation. + validations: + required: false + - type: textarea + id: other + attributes: + label: Other Information + description: | + Any alternative solutions or features you considered, a more detailed explanation, stack traces, related issues, links for context, etc. + validations: + required: false + - type: checkboxes + id: ack + attributes: + label: Acknowledgements + options: + - label: I may be able to implement this feature request + required: false + - label: This feature might incur a breaking change + required: false diff --git a/amazon-timestream-odbc-driver/.github/PULL_REQUEST_TEMPLATE.md b/amazon-timestream-odbc-driver/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..8972c34d69454 --- /dev/null +++ b/amazon-timestream-odbc-driver/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ + +### Summary + + + +### Description + + + +### Related Issue + + + +### Additional Reviewers + + diff --git a/amazon-timestream-odbc-driver/.github/workflows/linux-build.yml b/amazon-timestream-odbc-driver/.github/workflows/linux-build.yml new file mode 100644 index 0000000000000..8598a10b93239 --- /dev/null +++ b/amazon-timestream-odbc-driver/.github/workflows/linux-build.yml @@ -0,0 +1,280 @@ +name: ODBC Driver for Linux + +on: + push: + branches: + - main + pull_request: + branches: + - main + +env: + CI_OUTPUT_PATH: "ci-output" + ODBC_LIB_PATH: "${{github.workspace}}/build/odbc/lib" + ODBC_BIN_PATH: "${{github.workspace}}/build/odbc/bin" + ODBC_BUILD_PATH: "${{github.workspace}}/build/odbc/build" + TIMESTREAM_LOG_PATH: "${{github.workspace}}/build/odbc/logs" + TIMESTREAM_LOG_LEVEL: "4" + BIG_TABLE_PAGINATION_TEST_ENABLE: "TRUE" + + # # AAD Test environment variables. Uncomment out to use GitHub secrets to enable AAD integration tests + # ENABLE_AAD_TEST: "TRUE" + # AAD_APP_ID: ${{secrets.AAD_APP_ID}} + # AAD_ROLE_ARN: ${{secrets.AAD_ROLE_ARN}} + # AAD_IDP_ARN: ${{secrets.AAD_IDP_ARN}} + # AAD_TENANT: ${{secrets.AAD_TENANT}} + # AAD_USER: ${{secrets.AAD_USER}} + # AAD_USER_PWD: ${{secrets.AAD_USER_PWD}} + # AAD_CLIENT_SECRET: ${{secrets.AAD_CLIENT_SECRET}} + + # # OKTA Test environment variables. Uncomment out to use GitHub secrets to enable AAD integration tests + # ENABLE_OKTA_TEST: "TRUE" + # OKTA_HOST: ${{secrets.OKTA_HOST}} + # OKTA_USER: ${{secrets.OKTA_USER}} + # OKTA_USER_PWD: ${{secrets.OKTA_USER_PWD}} + # OKTA_APP_ID: ${{secrets.OKTA_APP_ID}} + # OKTA_ROLE_ARN: ${{secrets.OKTA_ROLE_ARN}} + # OKTA_IDP_ARN: ${{secrets.OKTA_IDP_ARN}} + +jobs: + build-linux64: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + + - name: Get latest version of CMake + uses: lukka/get-cmake@latest + + - name: run-cppcheck + run: | + sudo apt install cppcheck + sh run_cppcheck.sh + + - name: upload-cppcheck-results + if: failure() + uses: actions/upload-artifact@v2 + with: + name: cppcheck-results + path: cppcheck-results.log + + - name: get-dependencies + if: success() + run: | + sudo apt update + sudo apt install libcurl4-openssl-dev libssl-dev uuid-dev zlib1g-dev libpulse-dev linux-headers-$(uname -r) gcc gcc-multilib g++ g++-multilib linux-headers-$(uname -r) build-essential valgrind libboost-all-dev libsasl2-dev lcov + + - name: configure-and-build-driver + run: | + ./build_linux_release64_deb.sh + + - name: update-environment-with-ODBC_DRIVER_VERSION + run: | + read -r ODBC_DRIVER_VERSION < ./src/ODBC_DRIVER_VERSION.txt + echo "ODBC_DRIVER_VERSION=$ODBC_DRIVER_VERSION" >> $GITHUB_ENV + + - name: upload-package + uses: actions/upload-artifact@v3 + with: + name: AmazonTimestreamODBC_${{env.ODBC_DRIVER_VERSION}}_RELEASE_x86_64 + path: cmake-build64/AmazonTimestreamODBC_${{env.ODBC_DRIVER_VERSION}}_RELEASE_x86_64.deb + + - name: register-odbc-driver + run: | + chmod +r -R ${{env.ODBC_LIB_PATH}} + chmod +x scripts/register_driver_unix.sh + sudo bash scripts/register_driver_unix.sh + + - name: configure-aws-credentials-for-tests + if: success() + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + + # run unit tests + - name: run-unit-tests + id: rununittests + run: | + mkdir -p "${{env.TIMESTREAM_LOG_PATH}}" + ./build/odbc/bin/timestream-odbc-unit-tests --catch_system_errors=false + + - name: upload-unit-test-report + if: always() + uses: EnricoMi/publish-unit-test-result-action/composite@v2.7.0 + with: + check_name: "Ubuntu 20.04 Build Unit Test Results Check" + comment_title: "Ubuntu 20.04 Build Unit Test Results" + files: ./odbc_unit_test_result.xml + + - name: upload-odbc-unit-test-file + if: always() && (steps.rununittests.outcome == 'failure') + uses: actions/upload-artifact@v2 + with: + name: odbc-unit-test-results + path: | + ./odbc_unit_test_result.xml + ./build/odbc/logs/timestream_odbc_*.log + ./aws_sdk_*.log + + # run odbc tests + - name: run-odbc-tests + id: runodbctests + run: | + ./build/odbc/bin/timestream-odbc-integration-tests --catch_system_errors=false + + - name: upload-odbc-test-report + if: always() + uses: EnricoMi/publish-unit-test-result-action/composite@v2.7.0 + with: + check_name: "Ubuntu 20.04 Build Integration Test Results Check" + comment_title: "Ubuntu 20.04 Build Integration Test Results" + files: ./odbc_test_result.xml + + - name: upload-odbc-test-file + if: always() && (steps.runodbctests.outcome == 'failure') + uses: actions/upload-artifact@v2 + with: + name: odbc-test-results + path: | + ./odbc_test_result.xml + ./build/odbc/logs/timestream_odbc_*.log + ./aws_sdk_*.log + + build-linux64-debug: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + + - name: Get gcovr + run: | + pip install gcovr + + - name: Get latest version of CMake + uses: lukka/get-cmake@latest + + - name: run-cppcheck + run: | + sudo apt install cppcheck + sh run_cppcheck.sh + + - name: upload-cppcheck-results + if: failure() + uses: actions/upload-artifact@v2 + with: + name: cppcheck-results + path: cppcheck-results.log + + - name: get-dependencies + if: success() + run: | + sudo apt update + sudo apt install libcurl4-openssl-dev libssl-dev uuid-dev zlib1g-dev libpulse-dev linux-headers-$(uname -r) gcc gcc-multilib g++ g++-multilib linux-headers-$(uname -r) build-essential valgrind libboost-all-dev libsasl2-dev lcov + + - name: configure-and-build-driver + run: | + ./build_linux_debug64_deb.sh + + - name: update-environment-with-ODBC_DRIVER_VERSION + run: | + read -r ODBC_DRIVER_VERSION < ./src/ODBC_DRIVER_VERSION.txt + echo "ODBC_DRIVER_VERSION=$ODBC_DRIVER_VERSION" >> $GITHUB_ENV + + - name: upload-package + uses: actions/upload-artifact@v3 + with: + name: AmazonTimestreamODBC_${{env.ODBC_DRIVER_VERSION}}_DEBUG_x86_64 + path: cmake-build64/AmazonTimestreamODBC_${{env.ODBC_DRIVER_VERSION}}_DEBUG_x86_64.deb + + - name: register-odbc-driver + run: | + chmod +r -R ${{env.ODBC_LIB_PATH}} + chmod +x scripts/register_driver_unix.sh + sudo bash scripts/register_driver_unix.sh + + - name: configure-aws-credentials-for-tests + if: success() + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + + # run unit tests + - name: run-unit-tests + id: rununittests + run: | + mkdir -p "${{env.TIMESTREAM_LOG_PATH}}" + ./build/odbc/bin/timestream-odbc-unit-tests --catch_system_errors=false + + - name: upload-test-report + if: always() + uses: EnricoMi/publish-unit-test-result-action/composite@v2.7.0 + with: + check_name: "Ubuntu 20.04 Debug Build Unit Test Results Check" + comment_title: "Ubuntu 20.04 Debug Build Unit Test Results" + files: ./odbc_unit_test_result.xml + + - name: upload-unit-test-file + if: always() && (steps.rununittests.outcome == 'failure') + uses: actions/upload-artifact@v3 + with: + name: odbc-unit-test-results-linux-debug + path: | + ./odbc_unit_test_result.xml + ./build/odbc/logs/timestream_odbc_*.log + ./aws_sdk_*.log + + # run odbc tests + - name: run-odbc-tests + id: runodbctests + run: | + ./build/odbc/bin/timestream-odbc-integration-tests --catch_system_errors=false + gcovr --exclude-directories=cmake-build64/tests/integration-test/CMakeFiles/timestream-odbc-integration-tests.dir$ --exclude-directories=cmake-build64/tests/unit-test/CMakeFiles/timestream-odbc-unit-tests.dir$ --cobertura --output coverage.cobertura.xml + + - name: Code Coverage Summary Report + uses: irongut/CodeCoverageSummary@v1.2.0 + with: + filename: coverage.cobertura.xml + badge: true + format: markdown + indicators: true + output: both + + - name: Add Header for Code Coverage Summary Report + run: | + echo "## Ubuntu 20.04 Debug Build Test Results Check" > coverage-cobertura.md + cat code-coverage-results.md >> coverage-cobertura.md + + - name: Add Coverage PR Comment + uses: marocchino/sticky-pull-request-comment@v2 + if: github.event_name == 'pull_request' + with: + header: linux + recreate: true + path: coverage-cobertura.md + + - name: upload-odbc-test-report + if: always() + uses: EnricoMi/publish-unit-test-result-action/composite@v2.7.0 + with: + check_name: "Ubuntu 20.04 Debug Build Integration Test Results Check" + comment_title: "Ubuntu 20.04 Debug Build Integration Test Results" + files: ./odbc_test_result.xml + + - name: upload-odbc-test-file + if: always() && (steps.runodbctests.outcome == 'failure') + uses: actions/upload-artifact@v3 + with: + name: odbc-test-results-linux-debug + path: | + ./odbc_test_result.xml + ./build/odbc/logs/timestream_odbc_*.log + ./aws_sdk_*.log + + - name: upload-coverage + if: always() + uses: actions/upload-artifact@v3 + with: + name: code-coverage-Linux + path: cmake-build64/ccov/all-merged diff --git a/amazon-timestream-odbc-driver/.github/workflows/mac-build.yml b/amazon-timestream-odbc-driver/.github/workflows/mac-build.yml new file mode 100644 index 0000000000000..17c238ed4cdc3 --- /dev/null +++ b/amazon-timestream-odbc-driver/.github/workflows/mac-build.yml @@ -0,0 +1,140 @@ +name: ODBC Driver for Mac + +on: + push: + branches: + - main + pull_request: + branches: + - main + +env: + CI_OUTPUT_PATH: "ci-output" + ODBC_LIB_PATH: "${{github.workspace}}/build/odbc/lib" + ODBC_BIN_PATH: "${{github.workspace}}/build/odbc/bin" + ODBC_BUILD_PATH: "${{github.workspace}}/build/odbc/build" + TIMESTREAM_LOG_PATH: "${{github.workspace}}/build/odbc/logs" + TIMESTREAM_LOG_LEVEL: "4" + ODBCINSTINI: "${{github.workspace}}/build/odbc/lib/timestream-odbc-install.ini" + ODBCINI: "${{github.workspace}}/odbc.ini" + BIG_TABLE_PAGINATION_TEST_ENABLE: "TRUE" + + # # AAD Test environment variables. Uncomment out to use GitHub secrets to enable AAD integration tests + # ENABLE_AAD_TEST: "TRUE" + # AAD_APP_ID: ${{secrets.AAD_APP_ID}} + # AAD_ROLE_ARN: ${{secrets.AAD_ROLE_ARN}} + # AAD_IDP_ARN: ${{secrets.AAD_IDP_ARN}} + # AAD_TENANT: ${{secrets.AAD_TENANT}} + # AAD_USER: ${{secrets.AAD_USER}} + # AAD_USER_PWD: ${{secrets.AAD_USER_PWD}} + # AAD_CLIENT_SECRET: ${{secrets.AAD_CLIENT_SECRET}} + + # # OKTA Test environment variables. Uncomment out to use GitHub secrets to enable AAD integration tests + # ENABLE_OKTA_TEST: "TRUE" + # OKTA_HOST: ${{secrets.OKTA_HOST}} + # OKTA_USER: ${{secrets.OKTA_USER}} + # OKTA_USER_PWD: ${{secrets.OKTA_USER_PWD}} + # OKTA_APP_ID: ${{secrets.OKTA_APP_ID}} + # OKTA_ROLE_ARN: ${{secrets.OKTA_ROLE_ARN}} + # OKTA_IDP_ARN: ${{secrets.OKTA_IDP_ARN}} + +jobs: + build-mac: + runs-on: macos-11 + steps: + - uses: actions/checkout@v2 + + - name: run-cppcheck + run: | + brew install cppcheck + sh run_cppcheck.sh + - name: upload-cppcheck-results + if: failure() + uses: actions/upload-artifact@v3 + with: + name: cppcheck-results + path: cppcheck-results.log + + - name: get-dependencies + run: | + brew tap homebrew/services + brew unlink unixodbc + brew install libiodbc + brew link --overwrite --force libiodbc + brew install cmake + brew install boost + + - name: configure-and-build-driver + run: | + ./build_mac_release64.sh + + - name: update-environment-with-ODBC_DRIVER_VERSION + run: | + read -r ODBC_DRIVER_VERSION < ./src/ODBC_DRIVER_VERSION.txt + echo "ODBC_DRIVER_VERSION=$ODBC_DRIVER_VERSION" >> $GITHUB_ENV + + - name: upload-package + uses: actions/upload-artifact@v3 + with: + name: AmazonTimestreamODBC-${{env.ODBC_DRIVER_VERSION}}.pkg + path: ./cmake-build64/AmazonTimestreamODBC-${{env.ODBC_DRIVER_VERSION}}.pkg + + - name: register-odbc-driver + run: | + chmod +x scripts/register_driver_unix.sh + ./scripts/register_driver_unix.sh + + - name: configure-aws-credentials-for-tests + if: success() + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + + - name: run-unit-tests + id: rununittests + run: | + mkdir -p "${{env.TIMESTREAM_LOG_PATH}}" + export DYLD_LIBRARY_PATH=${{env.ODBC_LIB_PATH}}:$DYLD_LIBRARY_PATH + ./build/odbc/bin/timestream-odbc-unit-tests --catch_system_errors=false + + - name: upload-unit-test-report + if: always() + uses: EnricoMi/publish-unit-test-result-action/composite@v1.30 + with: + check_name: "MacOS Big Sur 11 Build Unit Test Results Check" + comment_title: "MacOS Big Sur 11 Build Unit Test Results" + files: ./odbc_unit_test_result.xml + + - name: upload-unit-test-file + if: always() && (steps.rununittests.outcome == 'failure') + uses: actions/upload-artifact@v3 + with: + name: odbc-unit-test-results + path: | + ./odbc_unit_test_result.xml + ./build/odbc/logs/timestream_odbc_*.log + + - name: run-integration-tests + id: runintegrationtests + run: | + export DYLD_LIBRARY_PATH=${{env.ODBC_LIB_PATH}}:$DYLD_LIBRARY_PATH + ./build/odbc/bin/timestream-odbc-integration-tests --catch_system_errors=false + + - name: upload-integration-test-report + if: always() + uses: EnricoMi/publish-unit-test-result-action/composite@v1.30 + with: + check_name: "MacOS Big Sur 11 Build Integration Test Results Check" + comment_title: "MacOS Big Sur 11 Build Integration Test Results" + files: ./odbc_test_result.xml + + - name: upload-integration-test-file + if: always() && (steps.runintegrationtests.outcome == 'failure') + uses: actions/upload-artifact@v3 + with: + name: odbc-integration-test-results + path: | + ./odbc_test_result.xml + ./build/odbc/logs/timestream_odbc_*.log diff --git a/amazon-timestream-odbc-driver/.github/workflows/mac-debug-build.yml b/amazon-timestream-odbc-driver/.github/workflows/mac-debug-build.yml new file mode 100644 index 0000000000000..8d0c7ad865218 --- /dev/null +++ b/amazon-timestream-odbc-driver/.github/workflows/mac-debug-build.yml @@ -0,0 +1,186 @@ +name: ODBC Driver for Mac (Debug) + +on: + push: + branches: + - main + pull_request: + branches: + - main + +env: + CI_OUTPUT_PATH: "ci-output" + ODBC_LIB_PATH: "${{github.workspace}}/build/odbc/lib" + ODBC_BIN_PATH: "${{github.workspace}}/build/odbc/bin" + ODBC_BUILD_PATH: "${{github.workspace}}/build/odbc/build" + TIMESTREAM_LOG_PATH: "${{github.workspace}}/build/odbc/logs" + TIMESTREAM_LOG_LEVEL: "4" + ODBCINSTINI: "${{github.workspace}}/build/odbc/lib/timestream-odbc-install.ini" + ODBCINI: "${{github.workspace}}/odbc.ini" + BIG_TABLE_PAGINATION_TEST_ENABLE: "TRUE" + + # # AAD Test environment variables. Uncomment out to use GitHub secrets to enable AAD integration tests + # ENABLE_AAD_TEST: "TRUE" + # AAD_APP_ID: ${{secrets.AAD_APP_ID}} + # AAD_ROLE_ARN: ${{secrets.AAD_ROLE_ARN}} + # AAD_IDP_ARN: ${{secrets.AAD_IDP_ARN}} + # AAD_TENANT: ${{secrets.AAD_TENANT}} + # AAD_USER: ${{secrets.AAD_USER}} + # AAD_USER_PWD: ${{secrets.AAD_USER_PWD}} + # AAD_CLIENT_SECRET: ${{secrets.AAD_CLIENT_SECRET}} + + # # OKTA Test environment variables. Uncomment out to use GitHub secrets to enable AAD integration tests + # ENABLE_OKTA_TEST: "TRUE" + # OKTA_HOST: ${{secrets.OKTA_HOST}} + # OKTA_USER: ${{secrets.OKTA_USER}} + # OKTA_USER_PWD: ${{secrets.OKTA_USER_PWD}} + # OKTA_APP_ID: ${{secrets.OKTA_APP_ID}} + # OKTA_ROLE_ARN: ${{secrets.OKTA_ROLE_ARN}} + # OKTA_IDP_ARN: ${{secrets.OKTA_IDP_ARN}} + +jobs: + build-mac-debug: + runs-on: macos-11 + steps: + - uses: actions/checkout@v2 + + - name: run-cppcheck + run: | + brew install cppcheck + sh run_cppcheck.sh + - name: upload-cppcheck-results + if: failure() + uses: actions/upload-artifact@v3 + with: + name: cppcheck-results + path: cppcheck-results.log + + - name: get-dependencies + run: | + brew tap homebrew/services + brew unlink unixodbc + brew install libiodbc + brew link --overwrite --force libiodbc + brew install cmake + brew install boost + pip3 install gcovr + +# if action `EnricoMi/publish-unit-test-result-action/composite@v1.30` +# recognizes Python in Library/Developer/CommandLineTools instead of in /usr/local/bin/, then errors would occur + - name: set-PATH + run: | + echo "/Library/Developer/CommandLineTools/usr/bin" >> $GITHUB_PATH + echo "/usr/local/bin/" >> $GITHUB_PATH + + - name: configure-and-build-driver + run: | + ./build_mac_debug64.sh + + - name: update-environment-with-ODBC_DRIVER_VERSION + run: | + read -r ODBC_DRIVER_VERSION < ./src/ODBC_DRIVER_VERSION.txt + echo "ODBC_DRIVER_VERSION=$ODBC_DRIVER_VERSION" >> $GITHUB_ENV + + - name: upload-package + uses: actions/upload-artifact@v3 + with: + name: AmazonTimestreamODBC-${{env.ODBC_DRIVER_VERSION}}.pkg + path: ./cmake-build64/AmazonTimestreamODBC-${{env.ODBC_DRIVER_VERSION}}.pkg + + - name: register-odbc-driver + run: | + chmod +x scripts/register_driver_unix.sh + ./scripts/register_driver_unix.sh + + env: + RUN_CODE_COVERAGE: ${{ true }} + BOOST_TEST_CATCH_SYSTEM_ERRORS: no + + - name: configure-aws-credentials-for-tests + if: success() + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + + - name: run-unit-tests + id: rununittests + run: | + mkdir -p "${{env.TIMESTREAM_LOG_PATH}}" + export DYLD_LIBRARY_PATH=${{env.ODBC_LIB_PATH}}:$DYLD_LIBRARY_PATH + ./build/odbc/bin/timestream-odbc-unit-tests --catch_system_errors=false + + - name: upload-unit-test-report + if: always() + uses: EnricoMi/publish-unit-test-result-action/composite@v1.30 + with: + check_name: "MacOS Big Sur 11 Debug Build Unit Test Results Check" + comment_title: "MacOS Big Sur 11 Debug Build Unit Test Results" + files: ./odbc_unit_test_result.xml + + - name: run-integration-tests + id: runintegrationtests + run: | + export DYLD_LIBRARY_PATH=${{env.ODBC_LIB_PATH}}:$DYLD_LIBRARY_PATH + ./build/odbc/bin/timestream-odbc-integration-tests --catch_system_errors=false + gcovr -r .. --exclude-directories=cmake-build64/tests/integration-test/CMakeFiles/timestream-odbc-integration-tests.dir$ --exclude-directories=cmake-build64/tests/unit-test/CMakeFiles/timestream-odbc-unit-tests.dir$ --cobertura --output coverage.cobertura.xml + + - name: upload-coverage + if: always() + uses: actions/upload-artifact@v3 + with: + name: code-coverage + path: coverage.cobertura.xml + + - name: upload-integration-test-report + if: always() + uses: EnricoMi/publish-unit-test-result-action/composite@v1.30 + with: + check_name: "MacOS Big Sur 11 Debug Build Integration Test Results Check" + comment_title: "MacOS Big Sur 11 Debug Build Integration Test Results" + files: ./odbc_test_result.xml + + - name: upload-test-file + if: always() && ((steps.runintegrationtests.outcome == 'failure') || (steps.rununittests.outcome == 'failure')) + uses: actions/upload-artifact@v3 + with: + name: odbc-test-results + path: | + ./odbc_unit_test_result.xml + ./odbc_test_result.xml + ./build/odbc/logs/timestream_odbc_*.log + + comment_PR_mac_coverage: + runs-on: ubuntu-latest + needs: build-mac-debug + steps: + - uses: actions/checkout@v2 + + - name: Retrieve coverage + uses: actions/download-artifact@v2 + with: + name: code-coverage + + - name: Code Coverage Summary Report + uses: irongut/CodeCoverageSummary@v1.2.0 + with: + filename: coverage.cobertura.xml + badge: true + format: markdown + indicators: true + output: both + + - name: Add Header for Code Coverage Summary Report + run: | + echo "## MacOS Big Sur 11 Debug Build Code Coverage Unit and Integration Test Result" > coverage-cobertura.md + cat code-coverage-results.md >> coverage-cobertura.md + + - name: Add Coverage PR Comment + uses: marocchino/sticky-pull-request-comment@v2 + if: github.event_name == 'pull_request' + with: + header: macOS + recreate: true + path: coverage-cobertura.md + diff --git a/amazon-timestream-odbc-driver/.github/workflows/remove-old-artifacts.yml b/amazon-timestream-odbc-driver/.github/workflows/remove-old-artifacts.yml new file mode 100644 index 0000000000000..11e098e37c075 --- /dev/null +++ b/amazon-timestream-odbc-driver/.github/workflows/remove-old-artifacts.yml @@ -0,0 +1,34 @@ +# Copyright <2022> Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). +# You may not use this file except in compliance with the License. +# A copy of the License is located at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# or in the "license" file accompanying this file. This file is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +# express or implied. See the License for the specific language governing +# permissions and limitations under the License. + +# Adapted from https://github.com/marketplace/actions/remove-artifacts (available under MIT license) + +name: Remove Old Artifacts + +on: + schedule: + # Every day at 1am + - cron: '0 1 * * *' + +jobs: + remove-old-artifacts: + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - name: Remove Old Artifacts + uses: c-hive/gha-remove-artifacts@v1 + with: + age: '1 week' + # skip-tags will prevent tags (i.e releases) from being deleted. + skip-tags: true diff --git a/amazon-timestream-odbc-driver/.github/workflows/win-build.yml b/amazon-timestream-odbc-driver/.github/workflows/win-build.yml new file mode 100644 index 0000000000000..0c5deb3732d04 --- /dev/null +++ b/amazon-timestream-odbc-driver/.github/workflows/win-build.yml @@ -0,0 +1,430 @@ +name: ODBC Driver for Windows + +on: + push: + branches: + - main + pull_request: + branches: + - main + +env: + SIGNING_ENABLED: ${{ github.event.inputs.sign }} + CI_OUTPUT_PATH: "ci-output" + ODBC_LIB_PATH: "${{github.workspace}}/build/odbc/lib" + ODBC_BIN_PATH: "${{github.workspace}}/build/odbc/bin/Release" + ODBC_DEBUG_PATH: "${{github.workspace}}/build/odbc/bin/Debug" + ODBC_BUILD_PATH: "${{github.workspace}}/build/odbc/cmake" + VCPKG_ROOT: "c:/vcpkg" + TIMESTREAM_LOG_PATH: "${{github.workspace}}/build/odbc/logs" + TIMESTREAM_LOG_LEVEL: "4" + BIG_TABLE_PAGINATION_TEST_ENABLE: "TRUE" + + # # AAD Test environment variables. Uncomment out to use GitHub secrets to enable AAD integration tests + # ENABLE_AAD_TEST: "TRUE" + # AAD_APP_ID: ${{secrets.AAD_APP_ID}} + # AAD_ROLE_ARN: ${{secrets.AAD_ROLE_ARN}} + # AAD_IDP_ARN: ${{secrets.AAD_IDP_ARN}} + # AAD_TENANT: ${{secrets.AAD_TENANT}} + # AAD_USER: ${{secrets.AAD_USER}} + # AAD_USER_PWD: ${{secrets.AAD_USER_PWD}} + # AAD_CLIENT_SECRET: ${{secrets.AAD_CLIENT_SECRET}} + + # # OKTA Test environment variables. Uncomment out to use GitHub secrets to enable AAD integration tests + # ENABLE_OKTA_TEST: "TRUE" + # OKTA_HOST: ${{secrets.OKTA_HOST}} + # OKTA_USER: ${{secrets.OKTA_USER}} + # OKTA_USER_PWD: ${{secrets.OKTA_USER_PWD}} + # OKTA_APP_ID: ${{secrets.OKTA_APP_ID}} + # OKTA_ROLE_ARN: ${{secrets.OKTA_ROLE_ARN}} + # OKTA_IDP_ARN: ${{secrets.OKTA_IDP_ARN}} + +jobs: + build-windows32: + runs-on: windows-2022 + steps: + - uses: actions/checkout@v2 + + - name: Install Chocolatey + run: | + Set-ExecutionPolicy Bypass -Scope Process -Force + [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 + iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) + + - name: "Update path for WIX Toolset" + run: | + echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + + - name: Get latest version of CMake + uses: lukka/get-cmake@latest + + - name: add-msbuild-to-path + uses: microsoft/setup-msbuild@v1.0.2 + + - name: Cache dependencies Windows 32 + id: cache-dependencies-windows-32 + uses: actions/cache@v3 + with: + path: | + ${{ env.VCPKG_ROOT }} + key: ${{ runner.os }}-cache-dependencies-windows-32-v1 + + - name: Install dependencies Windows + run: vcpkg integrate install; vcpkg install boost-test:x86-windows boost-asio:x86-windows boost-chrono:x86-windows boost-interprocess:x86-windows boost-regex:x86-windows boost-system:x86-windows boost-thread:x86-windows --recurse + env: + VCPKG_ROOT: ${{ env.VCPKG_ROOT }} + + - name: configure-and-build-driver + run: | + .\build_win_release32.ps1 + + - name: Build PowerBI connector + run: | + cd src/PowerBIConnector + .\AmazonTimestreamConnector.ps1 + cd ${{github.workspace}} + + - name: Upload ODBC connector build + uses: actions/upload-artifact@v3 + with: + name: AmazonTimestreamConnector.mez + path: ./src/PowerBIConnector/AmazonTimestreamConnector.mez + + - name: register-driver + run: | + .\src\odbc\install\install_amd64.cmd ${{env.ODBC_BIN_PATH}}\timestream.odbc.dll ${{env.ODBC_BIN_PATH}}\timestream.odbc.dll + + - name: configure-aws-credentials-for-tests + if: success() + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + + - name: run-unit-tests + id: rununittests + run: | + mkdir -p "${{env.TIMESTREAM_LOG_PATH}}" + ${{env.ODBC_BIN_PATH}}/timestream-odbc-unit-tests.exe + + - name: upload-unit-test-report + if: always() + uses: EnricoMi/publish-unit-test-result-action/composite@v2.7.0 + with: + check_name: "Windows x32 Build Unit Test Results Check" + comment_title: "Windows 2022 (x32) Build Unit Test Results" + files: ./odbc_unit_test_result.xml + + - name: upload-unit-test-file + if: always() + uses: actions/upload-artifact@v3 + with: + name: odbc-unit-test-results + path: | + ./odbc_unit_test_result.xml + ./build/odbc/logs/timestream_odbc_*.log + + - name: run-integration-tests + id: runintegrationtests + run: | + ${{env.ODBC_BIN_PATH}}/timestream-odbc-integration-tests.exe + + - name: upload-integration-test-report + if: always() + uses: EnricoMi/publish-unit-test-result-action/composite@v2.7.0 + with: + check_name: "Windows x32 Build Integration Test Results Check" + comment_title: "Windows 2022 (x32) Build Integration Test Results" + files: ./odbc_test_result.xml + + - name: upload-integration-test-file + if: always() + uses: actions/upload-artifact@v3 + with: + name: odbc-test-results + path: | + ./odbc_test_result.xml + ./build/odbc/logs/timestream_odbc_*.log + + - name: Read VERSION file + if: ${{ env.SIGNING_ENABLED == 'true' }} + id: getversion + run: echo "::set-output name=version::$(cat src/ODBC_DRIVER_VERSION.txt)" + + - name: "Configure AWS credentials" + if: ${{ env.SIGNING_ENABLED == 'true' }} + uses: aws-actions/configure-aws-credentials@v2 + with: + role-skip-session-tagging: true + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} + role-external-id: ${{ secrets.AWS_ROLE_EXTERNAL_ID }} + role-duration-seconds: 3600 + + # Name of signed executable is same as unsigned exeuctable + - name: Sign executables + if: ${{ env.SIGNING_ENABLED == 'true' }} + id: sign-executables-32 + shell: pwsh + run: | + . ./scripts/sign_installer.ps1 + choco install jq -y + Invoke-SignInstaller build\odbc\cmake\Release x86 ${{ steps.getversion.outputs.version }} ${{ secrets.AWS_UNSIGNED_BUCKET }} ${{ secrets.AWS_SIGNED_BUCKET }} ${{ secrets.AWS_KEY }} + + - name: Upload ODBC driver build + uses: actions/upload-artifact@v3 + with: + name: timestream-odbc-driver-32 + path: build/odbc/cmake/Release + + build-windows64: + runs-on: windows-2022 + steps: + - uses: actions/checkout@v2 + + - name: Install Chocolatey + run: | + Set-ExecutionPolicy Bypass -Scope Process -Force + [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 + iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) + + - name: "Update path for WIX Toolset" + run: | + echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + + - name: Get latest version of CMake + uses: lukka/get-cmake@latest + + - name: add-msbuild-to-path + uses: microsoft/setup-msbuild@v1.0.2 + + - name: Cache dependencies Windows 64 + id: cache-dependencies-windows-64 + uses: actions/cache@v3 + with: + path: | + ${{ env.VCPKG_ROOT }} + key: ${{ runner.os }}-cache-dependencies-windows-64-v1 + + - name: Install dependencies Windows + run: vcpkg integrate install; vcpkg install boost-test:x64-windows boost-asio:x64-windows boost-chrono:x64-windows boost-interprocess:x64-windows boost-regex:x64-windows boost-system:x64-windows boost-thread:x64-windows --recurse + env: + VCPKG_ROOT: ${{env.VCPKG_ROOT}} + + - name: configure-and-build-driver + run: | + .\build_win_release64.ps1 + + - name: Build PowerBI connector + run: | + cd src/PowerBIConnector + .\AmazonTimestreamConnector.ps1 + cd ${{github.workspace}} + + - name: Upload ODBC connector build + uses: actions/upload-artifact@v3 + with: + name: AmazonTimestreamConnector.mez + path: ./src/PowerBIConnector/AmazonTimestreamConnector.mez + + - name: register-driver + run: | + .\src\odbc\install\install_amd64.cmd ${{env.ODBC_BIN_PATH}}\timestream.odbc.dll + + - name: configure-aws-credentials-for-tests + if: success() + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + + - name: run-unit-tests + id: rununittests + run: | + mkdir -p "${{env.TIMESTREAM_LOG_PATH}}" + ${{env.ODBC_BIN_PATH}}/timestream-odbc-unit-tests.exe + + - name: upload-unit-test-report + if: always() + uses: EnricoMi/publish-unit-test-result-action/composite@v2.7.0 + with: + check_name: "Windows 2022 (x64) Build Unit Test Results Check" + comment_title: "Windows 2022 (x64) Build Unit Test Results" + files: ./odbc_unit_test_result.xml + + - name: upload-unit-test-file + if: always() + uses: actions/upload-artifact@v3 + with: + name: odbc-unit-test-results + path: | + ./odbc_unit_test_result.xml + ./build/odbc/logs/timestream_odbc_*.log + + - name: run-integration-tests + id: runintegrationtests + run: | + ${{env.ODBC_BIN_PATH}}/timestream-odbc-integration-tests.exe + + - name: upload-integration-test-report + if: always() + uses: EnricoMi/publish-unit-test-result-action/composite@v2.7.0 + with: + check_name: "Windows 2022 (x64) Build Integration Test Results Check" + comment_title: "Windows 2022 (x64) Build Integration Test Results" + files: ./odbc_test_result.xml + + - name: upload-integration-test-file + if: always() + uses: actions/upload-artifact@v3 + with: + name: odbc-test-results + path: | + ./odbc_test_result.xml + ./build/odbc/logs/timestream_odbc_*.log + + - name: Read VERSION file + if: ${{ env.SIGNING_ENABLED == 'true' }} + id: getversion + run: echo "::set-output name=version::$(cat src/ODBC_DRIVER_VERSION.txt)" + + - name: "Configure AWS credentials" + if: ${{ env.SIGNING_ENABLED == 'true' }} + uses: aws-actions/configure-aws-credentials@v2 + with: + role-skip-session-tagging: true + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} + role-external-id: ${{ secrets.AWS_ROLE_EXTERNAL_ID }} + role-duration-seconds: 3600 + + # Name of signed executable is same as unsigned exeuctable + - name: Sign executables + if: ${{ env.SIGNING_ENABLED == 'true' }} + id: sign-executables-64 + shell: pwsh + run: | + . ./scripts/sign_installer.ps1 + choco install jq -y + Invoke-SignInstaller build\odbc\cmake\Release x64 ${{ steps.getversion.outputs.version }} ${{ secrets.AWS_UNSIGNED_BUCKET }} ${{ secrets.AWS_SIGNED_BUCKET }} ${{ secrets.AWS_KEY }} + + - name: Upload ODBC driver build + uses: actions/upload-artifact@v3 + with: + name: timestream-odbc-driver-64 + path: build/odbc/cmake/Release + + build-windows64_coverage: + runs-on: windows-2022 + steps: + - uses: actions/checkout@v2 + + - name: Install Chocolatey + run: | + Set-ExecutionPolicy Bypass -Scope Process -Force + [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 + iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) + + - name: "Update path for WIX Toolset" + run: | + echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + + - name: Get latest version of CMake + uses: lukka/get-cmake@latest + + - name: add-msbuild-to-path + uses: microsoft/setup-msbuild@v1.0.2 + + - name: setup-opencppcoverage-and-add-to-path + id: setup_opencppcoverage + run: | + choco install OpenCppCoverage -y + echo "C:\Program Files\OpenCppCoverage" >> $env:GITHUB_PATH + + - name: Cache dependencies Windows 64 + id: cache-dependencies-windows-64 + uses: actions/cache@v3 + with: + path: | + ${{ env.VCPKG_ROOT }} + key: ${{ runner.os }}-cache-dependencies-windows-64-v1 + + - name: Install dependencies Windows + run: vcpkg integrate install; vcpkg install boost-test:x64-windows boost-asio:x64-windows boost-chrono:x64-windows boost-interprocess:x64-windows boost-regex:x64-windows boost-system:x64-windows boost-thread:x64-windows --recurse + env: + VCPKG_ROOT: ${{env.VCPKG_ROOT}} + + - name: configure-and-build-driver + run: | + .\build_win_debug64.ps1 + + - name: Build PowerBI connector + run: | + cd src/PowerBIConnector + .\AmazonTimestreamConnector.ps1 + cd ${{github.workspace}} + + - name: register-driver + run: | + .\src\odbc\install\install_amd64.cmd ${{env.ODBC_DEBUG_PATH}}\timestream.odbc.dll + + - name: configure-aws-credentials-for-tests + if: success() + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + + - name: run-tests + run: | + # run code coverage against unit test first + opencppcoverage --sources src\odbc\src --sources src\odbc\include --export_type binary:unit.test.cov --excluded_modules boost_unit_test_framework --excluded_modules timestream-odbc-integration-tests --excluded_modules zlib --excluded_modules aws --excluded_modules boost --excluded_sources src\odbc\src\ignite --excluded_sources src\odbc\include\ignite -- ${{env.ODBC_DEBUG_PATH}}/timestream-odbc-unit-tests.exe + # run code coverage against integration test and merge the result with the unit test one + opencppcoverage --sources src\odbc\src --sources src\odbc\include --input_coverage unit.test.cov --export_type cobertura:coverage.cobertura.xml --excluded_modules boost_unit_test_framework --excluded_modules timestream-odbc-integration-tests --excluded_modules zlib --excluded_modules aws --excluded_modules boost --excluded_sources src\odbc\src\ignite --excluded_sources src\odbc\include\ignite -- ${{env.ODBC_DEBUG_PATH}}/timestream-odbc-integration-tests.exe + + - name: upload-coverage + if: always() + uses: actions/upload-artifact@v3 + with: + name: code-coverage + path: coverage.cobertura.xml + + comment_PR_coverage: + runs-on: ubuntu-latest + needs: build-windows64_coverage + steps: + - uses: actions/checkout@v2 + + - name: Retrieve coverage + uses: actions/download-artifact@v2 + with: + name: code-coverage + + - name: Code Coverage Summary Report + uses: irongut/CodeCoverageSummary@v1.2.0 + with: + filename: coverage.cobertura.xml + badge: true + format: markdown + indicators: true + output: both + + - name: Add Header for Code Coverage Summary Report + run: | + echo "## Windows 2022 (x64) Debug Build Code Coverage Test Results Check" > coverage-cobertura.md + cat code-coverage-results.md >> coverage-cobertura.md + + - name: Add Coverage PR Comment + uses: marocchino/sticky-pull-request-comment@v2 + if: github.event_name == 'pull_request' + with: + header: windows + recreate: true + path: coverage-cobertura.md diff --git a/amazon-timestream-odbc-driver/CONTRIBUTING.md b/amazon-timestream-odbc-driver/CONTRIBUTING.md index c4b6a1c5081ad..1b01e69e9bdd9 100644 --- a/amazon-timestream-odbc-driver/CONTRIBUTING.md +++ b/amazon-timestream-odbc-driver/CONTRIBUTING.md @@ -11,7 +11,8 @@ information to effectively respond to your bug report or contribution. We welcome you to use the GitHub issue tracker to report bugs or suggest features. -When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already +When filing an issue, please check [existing open](fake-link), +or [recently closed](fake-link), issues to make sure somebody else hasn't already reported the issue. Please try to include as much information as you can. Details like these are incredibly useful: * A reproducible test case or series of steps diff --git a/amazon-timestream-odbc-driver/LICENSE b/amazon-timestream-odbc-driver/LICENSE index 67db8588217f2..261eeb9e9f8b2 100644 --- a/amazon-timestream-odbc-driver/LICENSE +++ b/amazon-timestream-odbc-driver/LICENSE @@ -1,4 +1,3 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -173,3 +172,30 @@ defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/amazon-timestream-odbc-driver/LICENSE.rtf b/amazon-timestream-odbc-driver/LICENSE.rtf new file mode 100644 index 0000000000000..537f12d34c3c8 --- /dev/null +++ b/amazon-timestream-odbc-driver/LICENSE.rtf @@ -0,0 +1,275 @@ +{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Courier New;}} + +{\*\generator Msftedit 5.41.21.2500;} + +\f0\fs20 Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\par + +\par + +The Amazon Timestream ODBC Driver utilizes and modifies Apache Ignite source code.\par + +The utilized Apache Ignite source code comes from the directories modules/platforms/cpp/common, modules/platforms/cpp/odbc, and modules/platforms/cpp/common/odbc-test of Ignite 2.11.1. Not all source code from the listed directories is used, only a small part of them is used. The utilized Ignite source files are changed and cut down based on need.\par + +\par + +1) License Notice for the Boost library \par + +---------------------------------------\par + +\par + +Copyright (c) 2003 - 2021 Boost Software\par + +\par + +Distributed under the Boost Software License, Version 1.0.\par + +See http://www.boost.org/LICENSE_1_0.txt\par + +\par + +2) License Notice for Apache Ignite\par + +-----------------------------------------\par + +\par + +Apache Ignite\par + +Copyright 2021 The Apache Software Foundation\par + +\par + +This product includes software developed at\par + +The Apache Software Foundation (http://www.apache.org/).\par + +\par + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.\par + +You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\par + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,\par + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\par + +See the License for the specific language governing permissions and limitations under the License.\par + +\par + +3) License Notice for AWS SDK for C++\par + +---------------------------------------\par + +\par + +AWS SDK for C++\par + +\par + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\par + +\par + +This product includes software developed by Amazon Technologies, Inc (http://www.amazon.com/).\par + +======================================================\par + +\par + +\viewkind4\uc1\pard\qc\lang1033\ Apache License\par + +Version 2.0, January 2004\par + +http://www.apache.org/licenses/\par + +\pard\par + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\par + +\par + +1. Definitions.\par + +\par + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.\par + +\par + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.\par + +\par + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.\par + +\par + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.\par + +\par + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation, source, and configuration files.\par + +\par + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.\par + +\par + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).\par + +\par + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.\par + +\par + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."\par + +\par + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.\par + +\par + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.\par + +\par + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license plies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.\par + +\par + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:\par + +\par + + (a) You must give any other recipients of the Work or\par + + Derivative Works a copy of this License; and\par + +\par + + (b) You must cause any modified files to carry prominent notices\par + + stating that You changed the files; and\par + +\par + + (c) You must retain, in the Source form of any Derivative Works\par + + that You distribute, all copyright, patent, trademark, and\par + + attribution notices from the Source form of the Work,\par + + excluding those notices that do not pertain to any part of\par + + the Derivative Works; and\par + +\par + + (d) If the Work includes a "NOTICE" text file as part of its\par + + distribution, then any Derivative Works that You distribute\par + + must include a readable copy of the attribution notices\par + + contained within such NOTICE file, excluding those notices\par + + that do not pertain to any part of the Derivative Works, in\par + + at least one of the following places: within a NOTICE text\par + + file distributed as part of the Derivative Works; within the\par + + Source form or documentation, if provided along with the\par + + Derivative Works; or, within a display generated by the\par + + Derivative Works, if and wherever such third-party notices\par + + normally appear. The contents of the NOTICE file are for\par + + informational purposes only and do not modify the License.\par + + You may add Your own attribution notices within Derivative\par + + Works that You distribute, alongside or as an addendum to the\par + + NOTICE text from the Work, provided that such additional\par + + attribution notices cannot be construed as modifying the\par + + License.\par + +\par + +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.\par + +\par + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.\par + +\par + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.\par + +\par + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.\par + +\par + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.\par + +\par + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.\par + +\par + +END OF TERMS AND CONDITIONS\par + +\par + +APPENDIX: How to apply the Apache License to your work.\par + +\par + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\par + +\par + + Copyright [yyyy] [name of copyright owner]\par + +\par + + Licensed under the Apache License, Version 2.0 (the "License");\par + + you may not use this file except in compliance with the License.\par + + You may obtain a copy of the License at\par + +\par + + http://www.apache.org/licenses/LICENSE-2.0\par + +\par + + Unless required by applicable law or agreed to in writing, software\par + + distributed under the License is distributed on an "AS IS" BASIS,\par + + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\par + + implied. See the License for the specific language governing\par + + permissions and limitations under the License.\par + +\par + +} + + diff --git a/amazon-timestream-odbc-driver/NOTICE b/amazon-timestream-odbc-driver/NOTICE index 616fc58894518..4d801a85d0388 100644 --- a/amazon-timestream-odbc-driver/NOTICE +++ b/amazon-timestream-odbc-driver/NOTICE @@ -1 +1,46 @@ +Amazon Timestream ODBC Driver Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + +The Amazon Timestream ODBC Driver utilizes and modifies Apache Ignite +source code. The utilized Apache Ignite source code comes from the directories +modules/platforms/cpp/common, modules/platforms/cpp/odbc and, +modules/platforms/cpp/common/odbc-test of Ignite 2.11.1. Not all +source code from the listed directories is used, only a small part +of them is used. The utilized Ignite source files are changed and +cut down based on need. + +1) License Notice for the Boost library +--------------------------------------- + +Copyright (c) 2003 - 2021 Boost Software + +Distributed under the Boost Software License, Version 1.0. +See http://www.boost.org/LICENSE_1_0.txt + +2) License Notice for Apache Ignite +--------------------------------------- + +Apache Ignite +Copyright 2021 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + +Licensed under the Apache License, Version 2.0 (the "License"); you may not +use this software except in compliance with the License. You may obtain a +copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +License for the specific language governing permissions and limitations +under the License. + +3) License Notice for AWS SDK for C++ +--------------------------------------- + +AWS SDK for C++ +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + +This product includes software developed by +Amazon Technologies, Inc (http://www.amazon.com/). diff --git a/amazon-timestream-odbc-driver/README.md b/amazon-timestream-odbc-driver/README.md index 847260ca5152a..c8f502dd3c373 100644 --- a/amazon-timestream-odbc-driver/README.md +++ b/amazon-timestream-odbc-driver/README.md @@ -1,11 +1,15 @@ -## My Project +# Amazon Timestream ODBC Driver -TODO: Fill this README out! +## Overview -Be sure to: +The ODBC driver for the Amazon Timestream serverless time series database provides an +SQL-relational interface for developers and BI tool users. -* Change the title in this README -* Edit your repository description on GitHub +Full source code is provided. Users should be able build the library for intended platform. + +For build instructions please refer to [developer guide](docs/markdown/setup/developer-guide.md). + +For details on ODBC driver installation and usage please refer to rest of this document. ## Security @@ -15,3 +19,37 @@ See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more inform This project is licensed under the Apache-2.0 License. +## Documentation + +See the [product documentation](docs/markdown/index.md) for more detailed information about this driver, such as setup and configuration. + +## Setup and Usage + +To setup and use the Timestream ODBC driver, follow [these directions](docs/markdown/setup/setup.md). + +See [Azure Active Directory set-up guide](/docs/markdown/setup/aad-saml-setup.md) for setting up Azure AD account and connecting to Timestream. See [Okta set-up guide](/docs/markdown/setup/Okta-setup.md) for setting up Okta account and connecting to Timestream. + +See [PowerBI oveview](/docs/markdown/setup/powerbi-connector-setup/powerbi_overview.md) for using PowerBI with Timestream ODBC driver and connector. + +See [performance testing setup](performance/README.md) for setting up and running performance tests. + +## Connection String Syntax + +``` +DRIVER={Amazon Timestream ODBC Driver};DSN={Timestream DSN};