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
5 changes: 4 additions & 1 deletion docs/CICD.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Summary:

- At present, PR checks, build and test are all performed through [.github/workflows/build.yml](/.github/workflows/build.yml).
- Releasing over various channels (website, homebrew, chocolatey...) is performed manually.
- ~~The strategic state is to split the functions: PR checks, build and test; into separate files, and migrate to use [goreleaser](https://goreleaser.com/).~~
- Docker Build and Push Jobs have scope for improvement.
- These are currently based loosely on patterns described in:
- https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners
Expand All @@ -18,6 +17,10 @@ Summary:
- **NOTE**: The QEMU build for linux/arm64 is **very slow**. On the order of 30 minutes. This is currently unavoidable.
- **TODO**: Migrate linux/arm64 docker build to native once GHA supports this platform as a first class citizen.
- **NOTE**. Be careful selecting from [the available github actions runners](https://github.com/actions/runner-images). Some runnner instances may be incompatible with assumed toolchain.
- Docker images:
- [production image at `stackql/stackql`](https://hub.docker.com/r/stackql/stackql/tags).
- [development (zero guarantees) image at `stackql/stackql-devel`](https://hub.docker.com/r/stackql/stackql-devel/tags).



## Secrets
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/jackc/pgx/v5 v5.0.4
github.com/lib/pq v1.10.4
github.com/magiconair/properties v1.8.6
github.com/mattn/go-sqlite3 v1.0.2-stackql
github.com/mattn/go-sqlite3 v1.0.3-stackql
github.com/olekukonko/tablewriter v0.0.0-20180130162743-b8a9be070da4
github.com/sirupsen/logrus v1.9.0
github.com/snowflakedb/gosnowflake v1.6.16
Expand Down Expand Up @@ -130,4 +130,4 @@ require (

replace github.com/chzyer/readline => github.com/stackql/readline v0.0.2-alpha05

replace github.com/mattn/go-sqlite3 => github.com/stackql/stackql-go-sqlite3 v1.0.2-stackql
replace github.com/mattn/go-sqlite3 => github.com/stackql/stackql-go-sqlite3 v1.0.3-stackql
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,8 @@ github.com/stackql/psql-wire v0.1.1-alpha07 h1:LQWVUlx4Bougk6dztDNG5tmXxpIVeeTSs
github.com/stackql/psql-wire v0.1.1-alpha07/go.mod h1:a44Wd8kDC3irFLpGutarKDBqhJ/aqXlj1aMzO5bVJYg=
github.com/stackql/readline v0.0.2-alpha05 h1:ID4QzGdplFBsrSnTuz8pvKzWw96JbrJg8fsLry2UriU=
github.com/stackql/readline v0.0.2-alpha05/go.mod h1:OFAYOdXk/X4+5GYiDXFfaGrk+bCN6Qv0SYY5HNzD2E0=
github.com/stackql/stackql-go-sqlite3 v1.0.2-stackql h1:HyctYfBzMth/fIs2Y+9c/SICsCvR/DEnzcI7VZgwGZo=
github.com/stackql/stackql-go-sqlite3 v1.0.2-stackql/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/stackql/stackql-go-sqlite3 v1.0.3-stackql h1:j0yt6T5thZuz5+HIr81PXz2AClAtCko0vzr5tm8C1g8=
github.com/stackql/stackql-go-sqlite3 v1.0.3-stackql/go.mod h1:HemqCrcMK2xyhMMMt6oZ7ERDtoSmyyDsw5LBBcTZ+Rk=
github.com/stackql/stackql-parser v0.0.14-alpha04 h1:CmZUDWf2jBbU+Zu3sdiuM5CwUBFGN/IFjzXPcu46xjs=
github.com/stackql/stackql-parser v0.0.14-alpha04/go.mod h1:iyB47SvRS+Fvpn7joF7mHAkeiWSq83TbUhglRmLzPLQ=
github.com/stackql/stackql-provider-registry v0.0.1-rc06 h1:MgroWOr0bSqjSTDGnXB0UoZGFXpW3SRtN0EFkzB8Rpo=
Expand Down

This file was deleted.

7 changes: 4 additions & 3 deletions internal/stackql/primitivegenerator/statement_analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/stackql/any-sdk/anysdk"
"github.com/stackql/any-sdk/pkg/constants"
"github.com/stackql/any-sdk/pkg/dto"
anysdk_internaldto "github.com/stackql/any-sdk/pkg/internaldto"
"github.com/stackql/any-sdk/pkg/logging"
"github.com/stackql/stackql/internal/stackql/astformat"
"github.com/stackql/stackql/internal/stackql/astindirect"
Expand Down Expand Up @@ -599,7 +600,7 @@ func (pb *standardPrimitiveGenerator) AnalyzeUnaryExec(
if err != nil && reqExists {
return nil, err
}
var execPayload internaldto.ExecPayload
var execPayload anysdk_internaldto.ExecPayload
if node.OptExecPayload != nil {
mediaType := "application/json" //nolint:goconst // acceptable for now
if reqExists && req.GetBodyMediaType() != "" {
Expand Down Expand Up @@ -711,7 +712,7 @@ func (pb *standardPrimitiveGenerator) sanitiseMediaType(mediaType string) string
func (pb *standardPrimitiveGenerator) parseExecPayload(
node *sqlparser.ExecVarDef,
payloadType string,
) (internaldto.ExecPayload, error) {
) (anysdk_internaldto.ExecPayload, error) {
var b []byte
m := make(map[string][]string)
var pm map[string]interface{}
Expand All @@ -732,7 +733,7 @@ func (pb *standardPrimitiveGenerator) parseExecPayload(
default:
return nil, fmt.Errorf("payload map of declared type = '%T' not allowed", payloadType)
}
return internaldto.NewExecPayload(
return anysdk_internaldto.NewExecPayload(
b,
m,
pm,
Expand Down
6 changes: 5 additions & 1 deletion test/python/flask/gcp/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
def log_request_info():
logger.info(f"Request: {request.method} {request.path} - Query: {request.args}")


@app.route('/b', methods=['GET'])
def v1_storage_buckets_list():
if request.args.get('project') == 'stackql-demo':
return render_template('buckets-list.json'), 200, {'Content-Type': 'application/json'}
return '{"msg": "Project Not Found"}', 404, {'Content-Type': 'application/json'}

@app.route('/v1/projects/testing-project-three/locations/global/keyRings/testing-three/cryptoKeys', methods=['GET'])
def v1_projects_testing_project_three_locations_global_keyRings_testing_three_cryptoKeys():
Expand Down
235 changes: 235 additions & 0 deletions test/python/flask/gcp/templates/buckets-list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
{
"kind": "storage#buckets",
"items": [
{
"kind": "storage#bucket",
"selfLink": "https://www.googleapis.com/storage/v1/b/demo-app-bucket1",
"id": "demo-app-bucket1",
"name": "demo-app-bucket1",
"projectNumber": "0000000003",
"generation": "0000000000001",
"metageneration": "1",
"location": "US",
"storageClass": "STANDARD",
"etag": "CAE=",
"timeCreated": "2023-02-17T05:33:56.248Z",
"updated": "2023-02-17T05:33:56.248Z",
"labels": {
"app": "stackql-demo-okta-app"
},
"softDeletePolicy": {
"retentionDurationSeconds": "604800",
"effectiveTime": "2024-03-01T08:00:00.000Z"
},
"iamConfiguration": {
"bucketPolicyOnly": {
"enabled": true,
"lockedTime": "2023-05-18T05:33:56.248Z"
},
"uniformBucketLevelAccess": {
"enabled": true,
"lockedTime": "2023-05-18T05:33:56.248Z"
},
"publicAccessPrevention": "enforced"
},
"locationType": "multi-region",
"rpo": "DEFAULT"
},
{
"kind": "storage#bucket",
"selfLink": "https://www.googleapis.com/storage/v1/b/demo-app-bucket2",
"id": "demo-app-bucket2",
"name": "demo-app-bucket2",
"projectNumber": "0000000003",
"generation": "0000000000001",
"metageneration": "1",
"location": "US",
"storageClass": "STANDARD",
"etag": "CAE=",
"timeCreated": "2023-02-17T05:34:26.958Z",
"updated": "2023-02-17T05:34:26.958Z",
"labels": {
"app": "stackql-demo-okta-app"
},
"softDeletePolicy": {
"retentionDurationSeconds": "604800",
"effectiveTime": "2024-03-01T08:00:00.000Z"
},
"iamConfiguration": {
"bucketPolicyOnly": {
"enabled": true,
"lockedTime": "2023-05-18T05:34:26.958Z"
},
"uniformBucketLevelAccess": {
"enabled": true,
"lockedTime": "2023-05-18T05:34:26.958Z"
},
"publicAccessPrevention": "enforced"
},
"locationType": "multi-region",
"rpo": "DEFAULT"
},
{
"kind": "storage#bucket",
"selfLink": "https://www.googleapis.com/storage/v1/b/stackql-demo-bucket",
"id": "stackql-demo-bucket",
"name": "stackql-demo-bucket",
"projectNumber": "0000000003",
"generation": "0000000000001",
"metageneration": "1",
"location": "US",
"storageClass": "STANDARD",
"etag": "CAE=",
"timeCreated": "2022-02-09T04:39:09.058Z",
"updated": "2022-02-09T04:39:09.058Z",
"softDeletePolicy": {
"retentionDurationSeconds": "604800",
"effectiveTime": "2024-03-01T08:00:00.000Z"
},
"iamConfiguration": {
"bucketPolicyOnly": {
"enabled": false
},
"uniformBucketLevelAccess": {
"enabled": false
},
"publicAccessPrevention": "inherited"
},
"locationType": "multi-region",
"rpo": "DEFAULT"
},
{
"kind": "storage#bucket",
"selfLink": "https://www.googleapis.com/storage/v1/b/stackql-demo-src-bucket",
"id": "stackql-demo-src-bucket",
"name": "stackql-demo-src-bucket",
"projectNumber": "0000000003",
"generation": "0000000000001",
"metageneration": "3",
"location": "US",
"storageClass": "STANDARD",
"etag": "CAM=",
"timeCreated": "2022-02-08T23:23:47.208Z",
"updated": "2023-03-27T03:06:27.204Z",
"softDeletePolicy": {
"retentionDurationSeconds": "604800",
"effectiveTime": "2024-03-01T08:00:00.000Z"
},
"iamConfiguration": {
"bucketPolicyOnly": {
"enabled": false
},
"uniformBucketLevelAccess": {
"enabled": false
},
"publicAccessPrevention": "inherited"
},
"locationType": "multi-region",
"rpo": "DEFAULT"
},
{
"kind": "storage#bucket",
"selfLink": "https://www.googleapis.com/storage/v1/b/stackql-demo.appspot.com",
"id": "stackql-demo.appspot.com",
"name": "stackql-demo.appspot.com",
"projectNumber": "0000000003",
"generation": "0000000000001",
"metageneration": "1",
"location": "US",
"storageClass": "STANDARD",
"etag": "CAE=",
"timeCreated": "2023-02-26T08:35:40.061Z",
"updated": "2023-02-26T08:35:40.061Z",
"softDeletePolicy": {
"retentionDurationSeconds": "604800",
"effectiveTime": "2024-03-01T08:00:00.000Z"
},
"iamConfiguration": {
"bucketPolicyOnly": {
"enabled": false
},
"uniformBucketLevelAccess": {
"enabled": false
},
"publicAccessPrevention": "inherited"
},
"locationType": "multi-region",
"rpo": "DEFAULT"
},
{
"kind": "storage#bucket",
"selfLink": "https://www.googleapis.com/storage/v1/b/stackql-encrypted-bucket-1",
"id": "stackql-encrypted-bucket-1",
"name": "stackql-encrypted-bucket-1",
"projectNumber": "0000000003",
"generation": "0000000000001",
"metageneration": "1",
"location": "US",
"storageClass": "STANDARD",
"etag": "CAE=",
"timeCreated": "2023-02-28T03:18:33.043Z",
"updated": "2023-02-28T03:18:33.043Z",
"encryption": {
"defaultKmsKeyName": "projects/stackql-demo/locations/us/keyRings/stackql-us/cryptoKeys/stackql-us-demo-key"
},
"softDeletePolicy": {
"retentionDurationSeconds": "604800",
"effectiveTime": "2024-03-01T08:00:00.000Z"
},
"iamConfiguration": {
"bucketPolicyOnly": {
"enabled": true,
"lockedTime": "2023-05-29T03:18:33.043Z"
},
"uniformBucketLevelAccess": {
"enabled": true,
"lockedTime": "2023-05-29T03:18:33.043Z"
},
"publicAccessPrevention": "enforced"
},
"locationType": "multi-region",
"rpo": "DEFAULT"
},
{
"kind": "storage#bucket",
"selfLink": "https://www.googleapis.com/storage/v1/b/staging.stackql-demo.appspot.com",
"id": "staging.stackql-demo.appspot.com",
"name": "staging.stackql-demo.appspot.com",
"projectNumber": "0000000003",
"generation": "0000000000001",
"metageneration": "1",
"location": "US",
"storageClass": "STANDARD",
"etag": "CAE=",
"timeCreated": "2023-02-26T08:35:40.223Z",
"updated": "2023-02-26T08:35:40.223Z",
"lifecycle": {
"rule": [
{
"action": {
"type": "Delete"
},
"condition": {
"age": 15
}
}
]
},
"softDeletePolicy": {
"retentionDurationSeconds": "604800",
"effectiveTime": "2024-03-01T08:00:00.000Z"
},
"iamConfiguration": {
"bucketPolicyOnly": {
"enabled": false
},
"uniformBucketLevelAccess": {
"enabled": false
},
"publicAccessPrevention": "inherited"
},
"locationType": "multi-region",
"rpo": "DEFAULT"
}
]
}
Loading
Loading