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
34 changes: 19 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ jobs:
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v4.1.1
uses: actions/checkout@v7
with:
repository: ${{ env.STACKQL_CORE_REPOSITORY }}
ref: ${{ env.STACKQL_CORE_REF }}
token: ${{ secrets.CI_STACKQL_PACKAGE_DOWNLOAD_TOKEN }}
path: stackql-core-pkg

- name: Setup Python
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v6
with:
cache: pip
python-version: '3.12'
Expand All @@ -64,7 +64,7 @@ jobs:
cicd/util/01-build-robot-lib.sh

- name: Upload python package artifact
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v7
with:
name: python-package-dist-folder
path: stackql-core-pkg/test/dist
Expand All @@ -74,17 +74,18 @@ jobs:
runs-on: windows-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v6
with:
go-version: ^${{ env.GOLANG_VERSION }}
cache: false
id: go

- name: Get rid of dissruptive line endings before checkout
run: |
git config --global core.autocrlf false

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v7

- name: Get dependencies
run: |
Expand Down Expand Up @@ -133,13 +134,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v6
with:
go-version: ^${{ env.GOLANG_VERSION }}
cache: false
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v7

- name: API sprawl check
run: |
Expand All @@ -156,7 +158,7 @@ jobs:
sudo apt-get install -y jq

- name: Setup Python
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v6
with:
# cache: pip # this requires requirements in source control
python-version: '3.12'
Expand All @@ -167,7 +169,7 @@ jobs:
pip3 install -r cicd/testing-requirements.txt

- name: Download python package dist folder
uses: actions/download-artifact@v4.1.2
uses: actions/download-artifact@v8
with:
name: python-package-dist-folder
path: test/dist
Expand Down Expand Up @@ -222,7 +224,7 @@ jobs:
fi

- name: Download core
uses: actions/checkout@v2
uses: actions/checkout@v7
with:
repository: ${{ env.STACKQL_CORE_REPOSITORY }}
ref: ${{ env.STACKQL_CORE_REF }}
Expand Down Expand Up @@ -407,7 +409,7 @@ jobs:

- name: upload mocked test results
if: always()
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v7
with:
name: mocked-robot-test-results
path: test/robot/reports/mocked
Expand Down Expand Up @@ -438,13 +440,14 @@ jobs:
runs-on: macos-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v6
with:
go-version: ^${{ env.GOLANG_VERSION }}
cache: false
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v7

- name: Get dependencies
run: |
Expand Down Expand Up @@ -484,13 +487,14 @@ jobs:
runs-on: macos-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v6
with:
go-version: ^${{ env.GOLANG_VERSION }}
cache: false
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v7

- name: Get dependencies
run: |
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/mock-experiment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,19 @@ jobs:
steps:

- name: Set up golang
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ^${{ env.GOLANG_VERSION }}
cache: false
id: go

- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Download core
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
repository: ${{ env.STACKQL_CORE_REPOSITORY }}
ref: ${{ env.STACKQL_CORE_REF }}
Expand All @@ -58,7 +59,7 @@ jobs:
python3 cicd/python/build.py --build

- name: Upload stackql binary
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: stackql_binary
path: stackql-core/build/stackql
Expand All @@ -72,18 +73,18 @@ jobs:
steps:

- name: Check out code
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install Flask
run: pip install flask

- name: Download stackql binary
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: stackql_binary
path: build
Expand Down Expand Up @@ -413,7 +414,7 @@ jobs:
PYEOF

- name: Upload Mock Test Results
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: always()
with:
name: mock-test-results
Expand Down
32 changes: 17 additions & 15 deletions .github/workflows/provider-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ jobs:
steps:

- name: Set up golang
uses: actions/setup-go@v2
uses: actions/setup-go@v6
with:
go-version: ^${{ env.GOLANG_VERSION }}
cache: false
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v7

- name: Get dependencies
run: |
Expand Down Expand Up @@ -70,7 +71,7 @@ jobs:
run: go test -timeout 240s -v ./...

- name: Upload any-sdk binary
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: anysdk_binary
path: build/anysdk
Expand All @@ -83,13 +84,14 @@ jobs:
steps:

- name: Set up golang
uses: actions/setup-go@v2
uses: actions/setup-go@v6
with:
go-version: ^${{ env.GOLANG_VERSION }}
cache: false
id: go

- name: Download core
uses: actions/checkout@v4.1.1
uses: actions/checkout@v7
with:
repository: ${{ env.STACKQL_CORE_REPOSITORY }}
ref: ${{ env.STACKQL_CORE_REF }}
Expand All @@ -103,7 +105,7 @@ jobs:
python3 cicd/python/build.py --build

- name: Upload stackql binary
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: stackql_binary
path: stackql-core/build/stackql
Expand All @@ -117,16 +119,16 @@ jobs:
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v7

- name: Download stackql binary
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: stackql_binary
path: build

- name: Download any-sdk binary
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: anysdk_binary
path: build
Expand All @@ -138,7 +140,7 @@ jobs:
chmod +x "${{ github.workspace }}/build/anysdk"

- name: Download core
uses: actions/checkout@v2
uses: actions/checkout@v7
with:
repository: ${{ env.STACKQL_CORE_REPOSITORY }}
ref: ${{ env.STACKQL_CORE_REF }}
Expand Down Expand Up @@ -205,35 +207,35 @@ jobs:
done

- name: Upload Provider Analysis results
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: always()
with:
name: provider-analysis-results
path: cicd/out/aot/

- name: Upload Auto Mocks
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: always()
with:
name: auto-mocks
path: cicd/out/auto-mocks/

- name: Upload Mock Expectations
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: always()
with:
name: mock-expectations
path: cicd/out/mock-expectations/

- name: Upload Mock Queries
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: always()
with:
name: mock-queries
path: cicd/out/mock-queries/

- name: Upload Closures
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: always()
with:
name: closures
Expand Down
7 changes: 7 additions & 0 deletions internal/anysdk/pagination.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ const (
// pagination strategy: termination is by comparing the current page number
// in the response against a page-count field (`responseTerminator`).
PaginationAlgorithmPageNumber = "page_number"
// PaginationAlgorithmODataNextLink identifies the OData v4 follow-the-link
// strategy: the `@odata.nextLink` value in the response body is used verbatim
// as the next request URL, and traversal terminates when it is absent/empty.
// Like page_number this is a registered identifier; the caller drives the loop
// using the public Pagination / TokenSemantic accessors (responseToken keyed at
// `@odata.nextLink`).
PaginationAlgorithmODataNextLink = "odata_next_link"
)

type Pagination interface {
Expand Down
6 changes: 6 additions & 0 deletions internal/anysdk/pagination_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,9 @@ responseToken:
func TestPaginationAlgorithmConstant(t *testing.T) {
assert.Equal(t, PaginationAlgorithmPageNumber, "page_number")
}

// TestPaginationODataNextLinkConstant pins the odata_next_link identifier so
// provider YAML and the downstream invoker switch match on this exact string.
func TestPaginationODataNextLinkConstant(t *testing.T) {
assert.Equal(t, PaginationAlgorithmODataNextLink, "odata_next_link")
}
Loading
Loading