diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index 7d4534df76..c756d32f5e 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -958,22 +958,3 @@ jobs: ./ci/scripts/python_wheel_upload.sh upload-staging/adbc_*.tar.gz upload-staging/*.whl env: GEMFURY_PUSH_TOKEN: ${{ secrets.GEMFURY_PUSH_TOKEN }} - - clean-gemfury: - name: "Clean old releases" - runs-on: ubuntu-latest - if: ${{ !startsWith(github.ref, 'refs/tags/') }} - needs: - - upload-gemfury - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - persist-credentials: true - - - name: Clean old releases - run: | - gem install --user-install gemfury - ruby ./ci/scripts/gemfury_clean.rb - env: - GEMFURY_API_TOKEN: ${{ secrets.GEMFURY_API_TOKEN }} diff --git a/c/driver/postgresql/CMakeLists.txt b/c/driver/postgresql/CMakeLists.txt index 6deae291ae..bd1a68e217 100644 --- a/c/driver/postgresql/CMakeLists.txt +++ b/c/driver/postgresql/CMakeLists.txt @@ -51,14 +51,15 @@ add_arrow_lib(adbc_driver_postgresql adbc_driver_common nanoarrow ${LIBPQ_STATIC_LIBRARIES}) -include_directories(SYSTEM ${REPOSITORY_ROOT}) -include_directories(SYSTEM ${REPOSITORY_ROOT}/c/) -include_directories(SYSTEM ${LIBPQ_INCLUDE_DIRS}) -include_directories(SYSTEM ${REPOSITORY_ROOT}/c/vendor) -include_directories(SYSTEM ${REPOSITORY_ROOT}/c/driver) foreach(LIB_TARGET ${ADBC_LIBRARIES}) target_compile_definitions(${LIB_TARGET} PRIVATE ADBC_EXPORTING) + target_include_directories(${LIB_TARGET} SYSTEM + PRIVATE ${REPOSITORY_ROOT} + ${REPOSITORY_ROOT}/c/ + ${LIBPQ_INCLUDE_DIRS} + ${REPOSITORY_ROOT}/c/vendor + ${REPOSITORY_ROOT}/c/driver) endforeach() if(ADBC_TEST_LINKAGE STREQUAL "shared") @@ -83,5 +84,11 @@ if(ADBC_BUILD_TESTS) nanoarrow ${TEST_LINK_LIBS}) target_compile_features(adbc-driver-postgresql-test PRIVATE cxx_std_17) + target_include_directories(adbc-driver-postgresql-test SYSTEM + PRIVATE ${REPOSITORY_ROOT} + ${REPOSITORY_ROOT}/c/ + ${LIBPQ_INCLUDE_DIRS} + ${REPOSITORY_ROOT}/c/vendor + ${REPOSITORY_ROOT}/c/driver) adbc_configure_target(adbc-driver-postgresql-test) endif() diff --git a/ci/scripts/gemfury_clean.rb b/ci/scripts/gemfury_clean.rb deleted file mode 100755 index ad74883af7..0000000000 --- a/ci/scripts/gemfury_clean.rb +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env ruby -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you 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. - -# Clean old releases from Gemfury. - -require "gemfury" - -client = Gemfury::Client.new(user_api_key: ENV["GEMFURY_API_TOKEN"]) - -client.list.each do |artifact| - puts artifact["name"] - versions = client.versions(artifact["name"]) - versions.sort_by! { |v| v["created_at"] } - - # Keep all versions uploaded within 2 days of the last uploaded version - cutoff = DateTime.parse(versions.last['created_at']) - 2.0 - - versions.each do |version| - time = DateTime.parse(version['created_at']) - if time < cutoff - client.yank_version(artifact["name"], version["version"]) - puts "Yanked #{artifact['name']} #{version['version']} (created #{version['created_at']})" - else - puts "Kept #{artifact['name']} #{version['version']} (created #{version['created_at']})" - end - end -end diff --git a/go/adbc/driver/snowflake/statement.go b/go/adbc/driver/snowflake/statement.go index e8707bfdb4..a79d394b0b 100644 --- a/go/adbc/driver/snowflake/statement.go +++ b/go/adbc/driver/snowflake/statement.go @@ -144,8 +144,8 @@ func (st *statement) SetOption(key string, val string) error { return st.SetOptionInt(key, int64(concurrency)) default: return adbc.Error{ - Msg: fmt.Sprintf("invalid statement option %s=%s", key, val), - Code: adbc.StatusInvalidArgument, + Msg: fmt.Sprintf("[Snowflake] Unknown statement option '%s'", key), + Code: adbc.StatusNotImplemented, } } return nil diff --git a/go/adbc/drivermgr/wrapper.go b/go/adbc/drivermgr/wrapper.go index 161ff60832..9ff1720221 100644 --- a/go/adbc/drivermgr/wrapper.go +++ b/go/adbc/drivermgr/wrapper.go @@ -21,7 +21,9 @@ package drivermgr // #cgo windows CFLAGS: -DADBC_EXPORTING // #cgo windows CPPFLAGS: -DADBC_EXPORTING // #cgo CXXFLAGS: -std=c++11 +// #if !defined(ADBC_EXPORTING) // #define ADBC_EXPORTING +// #endif // #include "adbc.h" // #include // diff --git a/go/adbc/pkg/Makefile b/go/adbc/pkg/Makefile index 7fca0d01f4..b791c5b7da 100644 --- a/go/adbc/pkg/Makefile +++ b/go/adbc/pkg/Makefile @@ -15,10 +15,12 @@ # limitations under the License. GO_BUILD=go build +RM=rm ifeq ($(shell go env GOOS),linux) SUFFIX=so else ifeq ($(shell go env GOOS),windows) SUFFIX=dll + RM=del else SUFFIX=dylib endif @@ -33,7 +35,7 @@ all: $(DRIVERS) libadbc_driver_%.$(SUFFIX): % $(GO_BUILD) -tags driverlib -o $@ -buildmode=c-shared -ldflags "-s -w" ./$< - rm $(basename $@).h + $(RM) $(basename $@).h regenerate: go run gen/main.go -prefix FlightSQL -o ./flightsql/ -driver ../driver/flightsql @@ -41,4 +43,4 @@ regenerate: go run gen/main.go -prefix Snowflake -o ./snowflake/ -driver ../driver/snowflake clean: - rm $(DRIVERS) + $(RM) $(DRIVERS)