instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
GoogleCloudPlatform__DataflowTemplates__3748
GoogleCloudPlatform/DataflowTemplates
3,748
defect
d55a9b66dea392d1cee86135a5ce14da5adc3927
427f650d17d1a20ac22c6374f48e99092b992d5b
Fix batch failures and excessive retries for permanent errors in MongoDB to Firestore template
This Pull Request addresses suboptimal error handling in the **Datastream MongoDB to Firestore** template, specifically regarding permanent Firestore limitations such as the 20-level nesting limit. These changes prevent valid data from being delayed by invalid documents and reduce operational costs by suppressing futil...
diff --git a/v2/datastream-mongodb-to-firestore/src/main/java/com/google/cloud/teleport/v2/templates/DataStreamMongoDBToFirestore.java b/v2/datastream-mongodb-to-firestore/src/main/java/com/google/cloud/teleport/v2/templates/DataStreamMongoDBToFirestore.java index 9cdd1a50f2..84fce03427 100644 --- a/v2/datastream-mongo...
3
3
1
[{"id": "G0", "claim": "ProcessBackfillEventFn routes all bulk write errors to the standard failedWriteTag and should also detect permanent error codes (e.g. code 2) and route them to a severeFailedWriteTag like ProcessChangeEventFn does, otherwise permanent errors during backfill remain subject to futile retries by th...
null
GoogleCloudPlatform__DataflowTemplates__3751
GoogleCloudPlatform/DataflowTemplates
3,751
defect
0af55a0205deb0f0e99526962a95a24d753b4fe0
66e34c7fcf86eb9b9c431cb228a99f925d8beddb
feat(datastream): support more _id types in Datastream to Firestore template
- Update MongoDbChangeEventContext.java to support Double, Integer, and complex BSON types like Binary. - Remove restriction on 0L values. - Add comprehensive unit tests covering valid, invalid, and unsupported types.
diff --git a/v2/datastream-mongodb-to-firestore/src/main/java/com/google/cloud/teleport/v2/templates/datastream/MongoDbChangeEventContext.java b/v2/datastream-mongodb-to-firestore/src/main/java/com/google/cloud/teleport/v2/templates/datastream/MongoDbChangeEventContext.java index 63e1da8582..49736be628 100644 --- a/v2/...
3
1
1
[{"id": "G0", "claim": "Using asLong() and asDouble() for all integral and floating-point _id values can lose precision or truncate when the MongoDB _id is a BigInteger or BigDecimal exceeding the range or precision of those types.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introdu...
null
GoogleCloudPlatform__DataflowTemplates__3762
GoogleCloudPlatform/DataflowTemplates
3,762
defect
5874e81ddea50304152ed9750425bd737686c84d
74d5796ae8de688603025c300e8aaa9d633ebeea
Adding mutation batcher and row assembler in cdc data generator
## 📝 Description This PR introduces the `MutationBatcher` and `RowAssembler` components into the `v2/cdc-data-generator` module, separating row synthesis from transient buffering logic. It accumulates and chunks mutations in worker memory based on size limits partitioned per table, shard, and operation type (`INSERT`...
diff --git a/v2/cdc-data-generator/src/main/java/com/google/cloud/teleport/v2/templates/dofn/MutationBatcher.java b/v2/cdc-data-generator/src/main/java/com/google/cloud/teleport/v2/templates/dofn/MutationBatcher.java new file mode 100644 index 0000000000..d793f8c9e7 --- /dev/null +++ b/v2/cdc-data-generator/src/main/ja...
5
5
0
[{"id": "G0", "claim": "MutationBatcher should not implement Serializable (a general design comment the reviewer says they had discussed before).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The mixed usage of boxed and primitive data types (e.g. int b...
null
GoogleCloudPlatform__DataflowTemplates__3763
GoogleCloudPlatform/DataflowTemplates
3,763
defect
d31570bcee4a9fa306e0947d573d96359b1eae7a
77fba05a37d3298494553556354b8238b0c17b35
ci: create workflow for Spanner failure injection tests
This PR creates Spanner failure injection tests CI/CD workflow. It includes formatting improvements for readability for the CDC correctness test files and updates the Maven profiles used for running these tests to ensure they are properly isolated and executed. This workflow will be used for Failure injection tests...
diff --git a/.github/workflows/spanner-failure-injection-tests.yml b/.github/workflows/spanner-failure-injection-tests.yml new file mode 100644 index 0000000000..9865658111 --- /dev/null +++ b/.github/workflows/spanner-failure-injection-tests.yml @@ -0,0 +1,73 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Ap...
3
2
0
[{"id": "G0", "claim": "The call to flags.CloudProxyPassword() is duplicated in the runner's argument list and the redundant second call should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The hardcoded 10-minute Thread.sleep(60000...
null
GoogleCloudPlatform__DataflowTemplates__3766
GoogleCloudPlatform/DataflowTemplates
3,766
defect
5874e81ddea50304152ed9750425bd737686c84d
6ec31d4900eddbb7b289029f503ef8f7a30a7cbe
Observability enhancement of DataStreamMongoDBToFirestore template
Added counters for successful write and retry breakdown. * `totalProcessedDocuments` counts all documents being processed, include those being skipped or being written. * `successfulWrites` counts all the real writes that went through in the execution so far, the skipped ones are not counted. * `outOfOrderSkips` c...
diff --git a/v2/datastream-mongodb-to-firestore/src/main/java/com/google/cloud/teleport/v2/templates/DataStreamMongoDBToFirestore.java b/v2/datastream-mongodb-to-firestore/src/main/java/com/google/cloud/teleport/v2/templates/DataStreamMongoDBToFirestore.java index 4362df9d2b..46a2429908 100644 --- a/v2/datastream-mongo...
3
2
1
[{"id": "G0", "claim": "The errorIdentifier determination logic is duplicated at two places in ProcessChangeEventFn; extract it into a private helper method for maintainability and consistent implementation.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", ...
null
GoogleCloudPlatform__DataflowTemplates__3767
GoogleCloudPlatform/DataflowTemplates
3,767
defect
18260733adffbab5db323cd2ec760414dafacd67
25979468cc11547805644cfe1d9ddade5abb1306
[bug-fix] Skip scanning internal index options from information schema
Fix a production issue b/508672290 where Import/Export does not work with vector index now. Successfully export and import to https://pantheon.corp.google.com/spanner/instances/test-instance-nehadjoshi-prod/databases/ziyue-ann-gsql-imported/details/query?project=span-cloud-testing&chat= for gsql and https://pantheon.co...
diff --git a/v1/src/main/java/com/google/cloud/teleport/spanner/ddl/InformationSchemaScanner.java b/v1/src/main/java/com/google/cloud/teleport/spanner/ddl/InformationSchemaScanner.java index 5c5e393113a..b35c3cde612 100644 --- a/v1/src/main/java/com/google/cloud/teleport/spanner/ddl/InformationSchemaScanner.java +++ b/...
3
2
0
[{"id": "G0", "claim": "listIndexOptions does not qualify indexName for GoogleSQL (unlike listIndexes), so index options are lost for indexes in named schemas; the reviewer suggests qualifying the name when the dialect is not POSTGRESQL.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "p...
null
GoogleCloudPlatform__DataflowTemplates__3769
GoogleCloudPlatform/DataflowTemplates
3,769
defect
a00bc9e9c828e33fb5d5902bd4580012ea533908
731188d8f15a98f56641766796cf593a8f8c8cc1
[spanner-to-sourcedb] 1 billion row backlog accumulation load test
[b/496066723](https://b.corp.google.com/issues/496066723) This load test is to check the usecase where a customer pauses and resumes a reverse replication pipeline. In that case, there might be a massive backlog accumulated from a certain start timestamp that needs to be processed by the pipeline. This test simulate...
diff --git a/.github/workflows/spanner-load-tests.yml b/.github/workflows/spanner-load-tests.yml index bca53402e2..fc3d1f82e1 100644 --- a/.github/workflows/spanner-load-tests.yml +++ b/.github/workflows/spanner-load-tests.yml @@ -32,7 +32,7 @@ permissions: write-all jobs: load_tests: name: Spanner Dataflow Te...
7
6
2
[{"id": "G0", "claim": "The Cloud SQL instance tier in createPhysicalInstance should be parameter driven instead of being hard-coded per database type.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new load test class SpannerToSourceDbBacklogLT shou...
null
GoogleCloudPlatform__DataflowTemplates__3777
GoogleCloudPlatform/DataflowTemplates
3,777
defect
c45964877271c1ad58cb10030a072e81ec9ae869
60fbcfb37e802c3ec78f963f85f729679cbf87e0
Update UDF pipeline to only process the data field of an event
This PR adds JavaScript UDF support to the DataStreamMongoDBToFirestore template. Instead of a single stage applying the UDF to the full event, we use a 3-stage approach to simplify UDF creation and protect metadata. ## The 3-Stage UDF Transform To avoid requiring users to parse full event JSON in their UDFs, we sp...
diff --git a/v2/datastream-mongodb-to-firestore/src/main/java/com/google/cloud/teleport/v2/templates/DataStreamMongoDBToFirestore.java b/v2/datastream-mongodb-to-firestore/src/main/java/com/google/cloud/teleport/v2/templates/DataStreamMongoDBToFirestore.java index 46a2429908..3d434953b0 100644 --- a/v2/datastream-mongo...
3
1
1
[{"id": "G0", "claim": "The condition `transformedData.equals(fullEventJson)` compares the UDF output (just the data field) with the original full event JSON, so it will never be equal in a standard scenario, making the check ineffective; it should be removed.", "category": "correctness", "verdict": "supported", "prior...
null
GoogleCloudPlatform__DataflowTemplates__3781
GoogleCloudPlatform/DataflowTemplates
3,781
defect
00cd31f870ff8a75f247da2293da4f86469a12f1
0c88827646a1e64263dbeda18f257a0fc7ee89d9
ci: Fixing Spanner CDC correctness tests and correcting the Failure injection tests workflow
Successful runs: 1. https://github.com/GoogleCloudPlatform/DataflowTemplates/actions/runs/25712969377/job/75496883229 2. https://github.com/GoogleCloudPlatform/DataflowTemplates/actions/runs/25712980265/job/75496919206 3. https://github.com/GoogleCloudPlatform/DataflowTemplates/actions/runs/25712990317/job/754969495...
diff --git a/cicd/cmd/run-failure-injection-tests/main.go b/cicd/cmd/run-failure-injection-tests/main.go index 60aecfc7dd..23c3bce4ef 100644 --- a/cicd/cmd/run-failure-injection-tests/main.go +++ b/cicd/cmd/run-failure-injection-tests/main.go @@ -33,6 +33,7 @@ func main() { mvnFlags := workflows.NewMavenFlags() err...
3
2
0
[{"id": "G0", "claim": "The value of JOB_START_TIME_FIELD is retrieved multiple times from inputParameter; the result of asText() should be stored in a local variable for efficiency and readability.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "B...
null
GoogleCloudPlatform__DataflowTemplates__3800
GoogleCloudPlatform/DataflowTemplates
3,800
defect
4d5e0274b757a39ffab14ae440d872526ef56eb2
72aae702f46404bcf70914d02203bc0bb48900eb
Skip UPDATE events with null data field in PrepareUdfInputFn and bypass DELETEs
Skip UPDATE events with null data in PrepareUdfInputFn to handle cases where an updated document is later deleted. Bypass UDF transformation for DELETE events since they lack a data field. Combine bypassed and successfully transformed results to the next step.
diff --git a/v2/datastream-mongodb-to-firestore/src/main/java/com/google/cloud/teleport/v2/templates/DataStreamMongoDBToFirestore.java b/v2/datastream-mongodb-to-firestore/src/main/java/com/google/cloud/teleport/v2/templates/DataStreamMongoDBToFirestore.java index 25873a73fca..809dd51cdce 100644 --- a/v2/datastream-mon...
2
2
1
[{"id": "G0", "claim": "PrepareUdfInputFn does not handle events wrapped in a changeEvent field (common for DLQ-reconsumed records), so the change type and data field nested in the wrapper are missed, leading to incorrect bypassing or unexpected IllegalArgumentException failures; the logic should check for the wrapper,...
null
GoogleCloudPlatform__DataflowTemplates__3803
GoogleCloudPlatform/DataflowTemplates
3,803
defect
68a375e63575f82700fb81d4ffb3b6751903a3d7
af628d445aeb79f7727ea42ab8f7aa4abfac8c93
fix excessive logging issues in spanner resource manager
- **[SpannerResourceManager.java](file:///usr/local/google/home/iamsandeep/DataflowTemplates/it/google-cloud-platform/src/main/java/org/apache/beam/it/gcp/spanner/SpannerResourceManager.java)**: Added a `suppressVerboseLogs` flag to skip logging full lists of DDL statements and query results, preventing CI/CD hangs. -...
diff --git a/it/google-cloud-platform/src/main/java/org/apache/beam/it/gcp/spanner/SpannerResourceManager.java b/it/google-cloud-platform/src/main/java/org/apache/beam/it/gcp/spanner/SpannerResourceManager.java index 8f9f4a1ba9..eff57f982d 100644 --- a/it/google-cloud-platform/src/main/java/org/apache/beam/it/gcp/spann...
3
2
1
[{"id": "G0", "claim": "When suppressVerboseLogs is enabled, runQuery should still log a summary message (rows loaded) instead of suppressing the log entirely, for consistency with executeDdlStatements and to maintain observability.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"},...
null
GoogleCloudPlatform__DataflowTemplates__3808
GoogleCloudPlatform/DataflowTemplates
3,808
defect
a292e17f2b03444205931f7d3c749665e723ae97
d3fd6f1b2892ad7b87477a9a8bed22951191cc68
Ensure that failed events sent to the DLQ can be successfully reconsumed.
Updated MongoDbEventDeadLetterQueueSanitizer to store the original, unmodified event in the DLQ (under a changeEvent wrapper), ensuring that retry attempts have access to the initial event. MongoDbChangeEventContext changed to accept and track both current and original payloads. Updated PrepareUdfInputFn to extra...
diff --git a/v2/datastream-mongodb-to-firestore/src/main/java/com/google/cloud/teleport/v2/templates/DataStreamMongoDBToFirestore.java b/v2/datastream-mongodb-to-firestore/src/main/java/com/google/cloud/teleport/v2/templates/DataStreamMongoDBToFirestore.java index 82ebdc6b438..fadd6e0e6c4 100644 --- a/v2/datastream-mon...
1
1
0
[{"id": "G0", "claim": "The new inline ternary that extracts the inner event from a potentially wrapped DLQ payload should reuse the existing Utils.extractInnerEvent helper instead, for maintainability and consistency.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleCloudPlatform__DataflowTemplates__3814
GoogleCloudPlatform/DataflowTemplates
3,814
defect
3b2def51ffa570b85169aeeac6f861c9cc4b91df
48451846b49c6276aa3358eeebe391a4fb2328d0
Some minor bug fixes in the cdc data generator template
# Pull Request Description ## Overview This pull request consolidates critical bug fixes and performance optimizations for the `cdc-data-generator` template ## Issues Fixed - **Select Table Ratio Calculation**: Updated `SelectTableFn.java` to use the root table's `insertQps` directly rather than accumulating ...
diff --git a/v2/cdc-data-generator/pom.xml b/v2/cdc-data-generator/pom.xml index 14546ffc99..5bd0b95f46 100644 --- a/v2/cdc-data-generator/pom.xml +++ b/v2/cdc-data-generator/pom.xml @@ -46,7 +46,7 @@ <dependency> <groupId>net.datafaker</groupId> <artifactId>datafaker</artifactId> - ...
2
1
1
[{"id": "G0", "claim": "The primary key validation should require all declared primary key columns to be present in the column list (returning false on any missing one) instead of proceeding with a partial primary key, and the log messages should say the whole table is being skipped rather than just PK generation.", "c...
null
GoogleCloudPlatform__DataflowTemplates__3815
GoogleCloudPlatform/DataflowTemplates
3,815
defect
f8472fe181e249dc062271ef1beed85939b87ac4
6e0f31d5a4927268a2161982c04df27354a4a28a
[sourcedb-to-spanner] Add Support for UUID-based Partitioning
https://b.corp.google.com/issues/512087945 ## 1. Feature Request **Goal**: Enable uniform range partitioning on `UUID` primary keys or unique index columns within the Uniform Splitter framework for bulk data migration from PostgreSQL to Cloud Spanner. ## 2. TL;DR of Changes - **Map to BINARY Index**: Discover...
diff --git a/v2/sourcedb-to-spanner/src/main/java/com/google/cloud/teleport/v2/source/reader/io/jdbc/dialectadapter/postgresql/PostgreSQLDialectAdapter.java b/v2/sourcedb-to-spanner/src/main/java/com/google/cloud/teleport/v2/source/reader/io/jdbc/dialectadapter/postgresql/PostgreSQLDialectAdapter.java index 6f23a63bf9....
14
9
0
[{"id": "G0", "claim": "The getCallerInfo() stack-trace instrumentation used only to decorate log messages should be removed from Boundary.java, BoundaryExtractorFactory.java and BoundarySplitterFactory.java.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1",...
null
GoogleCloudPlatform__DataflowTemplates__3827
GoogleCloudPlatform/DataflowTemplates
3,827
defect
166246a5ccbf0f63eb7c31f0b3e9f248dfc1277f
a02823834aa907649dae9d4d1d8a8f7c1e51933b
Parsing sink config in the pipeline code rather than individual transforms
This PR refactors the configuration handling inside the cdc-data-generator module. It shifts the responsibility of parsing sink configuration settings (for Spanner and MySQL sinks) from individual runtime transforms (DoFns) to the main pipeline driver during initialization.
diff --git a/v2/cdc-data-generator/src/main/java/com/google/cloud/teleport/v2/templates/dofn/BatchAndWriteFn.java b/v2/cdc-data-generator/src/main/java/com/google/cloud/teleport/v2/templates/dofn/BatchAndWriteFn.java index e74e991f1a..cc6a65b6f3 100644 --- a/v2/cdc-data-generator/src/main/java/com/google/cloud/teleport...
4
3
2
[{"id": "G0", "claim": "The SpannerAccessor created in SinkConfigParser.parse is never closed and should be (e.g. via try-with-resources) to avoid leaking the underlying Spanner client and its connection pool.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "c...
null
GoogleCloudPlatform__DataflowTemplates__3845
GoogleCloudPlatform/DataflowTemplates
3,845
defect
f66b2800692d4b98ec6e96d1412b287d2e6adcb0
3c973669f00c20fb9e81435c186dd387e8dac822
[sourcedb-to-spanner] Fix GCS Avro Export flow
https://b.corp.google.com/issues/515646503 ## 1. Issues When migrating data using the `Sourcedb_to_Spanner_Flex` batch Dataflow template with the optional GCS export feature enabled (`gcsOutputDirectory` parameter specified), the Dataflow job fails with two distinct serialization errors depending on the shard confi...
diff --git a/v2/sourcedb-to-spanner/src/main/java/com/google/cloud/teleport/v2/templates/MigrateTableTransform.java b/v2/sourcedb-to-spanner/src/main/java/com/google/cloud/teleport/v2/templates/MigrateTableTransform.java index b5f562740b..c64604b4c0 100644 --- a/v2/sourcedb-to-spanner/src/main/java/com/google/cloud/tel...
2
2
1
[{"id": "G0", "claim": "The new testWriteToGCS method should use Google Truth (assertThat) assertions instead of JUnit's Assert, for consistency with the existing tests and the project's preferred assertion style.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": ...
null
GoogleCloudPlatform__alloydb-auth-proxy__135
GoogleCloudPlatform/alloydb-auth-proxy
135
defect
1a3d46be799fd2c791d0a40f4c75b8846d356ca9
1dfa96f9289b0614a18ca430f41ed6d7db6fabd6
feat: add support for FUSE
This is a port of https://github.com/GoogleCloudPlatform/cloud-sql-proxy/pull/1381. Fixes #132.
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 5d3b2b22..94a64d4b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -25,7 +25,7 @@ on: jobs: integration: - # run job on proper workflow event triggers (skip job for pull_request event from forks and o...
3
3
2
[{"id": "G0", "claim": "The double-check-lock pattern in Client.Close() reads c.fuseServer without holding c.fuseServerMu, so the FUSE server should be unmounted (and c.fuseServer reset to nil) under the mutex — for example with a single-check lock around Unmount.", "category": "correctness", "verdict": "supported", "p...
null
GoogleCloudPlatform__alloydb-auth-proxy__192
GoogleCloudPlatform/alloydb-auth-proxy
192
defect
c53f14e2f56492d277aa8a2966c20b5455c38042
426b126bc902d26e089719ff5e49fb1bbbf9c5a1
feat: add support for service account impersonation
This is a port of https://github.com/GoogleCloudPlatform/cloud-sql-proxy/pull/1460.
diff --git a/.envrc.example b/.envrc.example index 63468994..0f425b08 100644 --- a/.envrc.example +++ b/.envrc.example @@ -4,3 +4,7 @@ export ALLOYDB_PASS="postgres-password" export ALLOYDB_DB="postgres-db-name" export GOOGLE_APPLICATION_CREDENTIALS="path/to/credentials" + +# Requires the impersonating IAM principa...
2
2
0
[{"id": "G0", "claim": "The new ImpersonateTarget and ImpersonateDelegates fields should be placed above StructuredLogs, matching the field ordering used in the Cloud SQL connector PR.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The credentials switch...
null
GoogleCloudPlatform__alloydb-auth-proxy__251
GoogleCloudPlatform/alloydb-auth-proxy
251
defect
d76a3346307640b5e3a81f3d5bbefcdf55e94e5b
f0c34f5a1cce5db320aaa0ee0b86b37bef5db486
feat: add support for unix-socket-path instance parameter.
## Change Description This adds a new parameter unix-socket-path to instances to specify the precise unix socket path. For example, this command line: $ alloydb-auth-proxy projects/proj/locations/region/clusters/clust/instances/inst?unix-socket-path=/var/cloudsql/mydb Will open a unix socket to the database at...
diff --git a/cmd/root.go b/cmd/root.go index 0fe94b6b..0f4806c5 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -175,6 +175,16 @@ Instance Level Configuration 'projects/PROJECT/locations/REGION/clusters/CLUSTER/instances/INSTANCE1' \ 'projects/PROJECT/locations/REGION/clusters/CLUSTER/instances/...
1
1
0
[{"id": "G0", "claim": "The UnixSocketPath docstring's conditional \"If this is a Postgres database...\" wording is wrong because it is always a Postgres database for AlloyDB, and should be reworded as a minor docstring fix.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}...
null
GoogleCloudPlatform__alloydb-auth-proxy__353
GoogleCloudPlatform/alloydb-auth-proxy
353
defect
a4845b0632ff5c701c7439d5dd02b9a047fc68d0
aebd7000f436383cca6a06cd67c9f5b3192fe080
chore: test through proxy not connector
Fixes #254.
diff --git a/go.mod b/go.mod index 18ec6128..a0ca9ba2 100644 --- a/go.mod +++ b/go.mod @@ -8,6 +8,7 @@ require ( contrib.go.opencensus.io/exporter/stackdriver v0.13.14 github.com/google/go-cmp v0.5.9 github.com/hanwen/go-fuse/v2 v2.3.0 + github.com/jackc/pgx/v5 v5.3.1 github.com/spf13/cobra v1.7.0 github.com/...
1
1
0
[{"id": "G0", "claim": "The flag usage string should describe the instance connection name in URI form (project:region:instance seems wrong for what the test passes).", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleCloudPlatform__alloydb-auth-proxy__566
GoogleCloudPlatform/alloydb-auth-proxy
566
defect
6cbe84f0491908925bdc5ce8ba285aa2d460fed6
ed76ba00f29190885db9f2a537a8a6ca9787c009
feat: add support for public IP connections
Add support for `--public-ip` flag and public IP query option to allow connections to AlloyDB over public IP. - [X] Add support for flag and query params - [x] Get current tests to pass - [x] Add integration test for public IP - [x] Update README with sample
diff --git a/cmd/root.go b/cmd/root.go index 2178300b..803a2369 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -562,7 +562,8 @@ status code.`) `(*) Enables Unix sockets for all listeners using the provided directory.`) pflags.BoolVarP(&c.conf.AutoIAMAuthN, "auto-iam-authn", "i", false, "(*) Enables Automatic IAM...
3
3
2
[{"id": "G0", "claim": "go.mod pins cloud.google.com/go/alloydbconn to a pre-release pseudo-version of the upstream public-IP PR, and the pin should be removed (updated to a released version) once the Go Connector dependency bump merges.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope"...
null
GoogleCloudPlatform__alloydb-auth-proxy__67
GoogleCloudPlatform/alloydb-auth-proxy
67
defect
5a1e8e8352b3e8734731adab4c3e57ec92a61e0f
884fd01d871f6a18da72a6bb8d1465053b303e36
feat: add flag to specify API endpoint
## Change Description Adds a flag to allow users to specify an API endpoint when starting up the proxy. ## Relevant issues: - Fixes #51
diff --git a/cmd/root.go b/cmd/root.go index 75e8dd2c..d6e4f8c3 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -169,6 +169,8 @@ When this flag is not set, there is no limit.`) to close after receiving a TERM signal. The proxy will shut down when the number of open connections reaches 0 or when the maximum time has pa...
4
4
1
[{"id": "G0", "claim": "Delete the duplicated \"Example: https://alloydb.googleapis.com/v1beta\" from the flag help text since the output already shows the default.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Rename the config field to APIEndpo...
null
GoogleCloudPlatform__alloydb-auth-proxy__726
GoogleCloudPlatform/alloydb-auth-proxy
726
defect
281c9e301d0d51a92241562a7963cffec5320af1
baf67fd1fb692717581d453cacc8219dd4a02edf
feat: accept GET method at /quitquitquit
Fix the issue https://github.com/GoogleCloudPlatform/alloydb-auth-proxy/issues/725
diff --git a/cmd/root.go b/cmd/root.go index 2ffe801c..2ae5718a 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1194,7 +1194,7 @@ func runSignalWrapper(cmd *Command) (err error) { func quitquitquit(quitOnce *sync.Once, shutdownCh chan<- error) http.HandlerFunc { return http.HandlerFunc(func(rw http.ResponseWriter, ...
2
2
2
[{"id": "G0", "claim": "Add unit test coverage for a request method that is neither GET nor POST (the 400 rejection path of /quitquitquit).", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The pull request leaves unit tests failing, so they should be fixe...
null
GoogleCloudPlatform__alloydb-auth-proxy__85
GoogleCloudPlatform/alloydb-auth-proxy
85
defect
1e7b33ec22d3d3bccd766125d78cd6ea9b35497b
dab33d01c16cc08f1697f73d64f5d4c57a94f70e
feat: add support for health-check flag
This is an adaptation of https://github.com/GoogleCloudPlatform/cloudsql-proxy/pull/1271.
diff --git a/cmd/root.go b/cmd/root.go index cb5ef182..44ded702 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -32,6 +32,7 @@ import ( "contrib.go.opencensus.io/exporter/prometheus" "contrib.go.opencensus.io/exporter/stackdriver" "github.com/GoogleCloudPlatform/alloydb-auth-proxy/alloydb" + "github.com/GoogleCloud...
2
2
0
[{"id": "G0", "claim": "The comment line break is wrong (nit): the comment in cmd/root.go is awkwardly wrapped across lines.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Comments left over from the Cloud SQL proxy fork still say \"Cloud SQL\" ...
null
GoogleCloudPlatform__alloydb-auth-proxy__919
GoogleCloudPlatform/alloydb-auth-proxy
919
defect
65d2c90fddfeb56f300140534679aa9d3bf46952
fec91832730c8f960905a2d3901bf2238b481024
feat: add check to verify backend connection in readiness probe
This PR adds an optional flag to set that will continuously check that a connection can be established to the server before returning a ready status in the health probe. Fixes https://github.com/GoogleCloudPlatform/alloydb-auth-proxy/issues/909.
diff --git a/cmd/root.go b/cmd/root.go index 05d3b31c..b5ef0cd3 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -675,6 +675,8 @@ the maximum time has passed. Defaults to 0s.`) `Enables HTTP endpoints /startup, /liveness, and /readiness that report on the proxy's health. Endpoints are available on localhost only. Use...
5
4
1
[{"id": "G0", "claim": "The readiness handler should skip the retry for-loop, since Cloud Run (or Kubernetes) already invokes the endpoint at a regular interval, and these looping checks result in prematurely closed database connections.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introd...
null
GoogleCloudPlatform__appengine-plugins__106
GoogleCloudPlatform/appengine-plugins
106
defect
f55c929a3d00671662fa21b6b078e74300caffa0
a28d0c9bfeab2dd97fb738a1704af148ee7a1985
Add directory copy for docker flexible staging
The pkg might be weird, but otherwise trying to enable us to copy directories without commons-io. Only enabled the change on the flexible staging step
diff --git a/src/main/java/com/google/cloud/tools/app/api/deploy/StageFlexibleConfiguration.java b/src/main/java/com/google/cloud/tools/app/api/deploy/StageFlexibleConfiguration.java index b79f46a2a..ee53c99d1 100644 --- a/src/main/java/com/google/cloud/tools/app/api/deploy/StageFlexibleConfiguration.java +++ b/src/mai...
4
2
1
[{"id": "G0", "claim": "Staging should check that the docker directory actually contains a Dockerfile, since otherwise it is probably a user error.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "copyDirectory should not be hand-rolled if an existing...
null
GoogleCloudPlatform__appengine-plugins__307
GoogleCloudPlatform/appengine-plugins
307
defect
9a2b7581e8bb0f4fe132f802ff6a25395067dcc7
c3600db9d07c7e46b99907591fdc056dcec30a47
Add AppEngineDescriptor class
@chanseokoh Copied from CT4E Also suppresses outdated import order rules
diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml index 8ff4d8dbc..5dcff7e69 100644 --- a/checkstyle-suppressions.xml +++ b/checkstyle-suppressions.xml @@ -21,4 +21,5 @@ limitations under the License. <!-- Suppress paragraph validation in copyright header --> <suppress files=".*\.java" checks...
4
3
2
[{"id": "G0", "claim": "The document field should be initialized in the constructor and declared final.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The getters' javadoc should consistently add @throws AppEngineException if parsing the value fails, lik...
null
GoogleCloudPlatform__appengine-plugins__343
GoogleCloudPlatform/appengine-plugins
343
defect
6b9a2114394a6fc87be830f4cecd24d363c5cf61
35ae18c54b310c65cabdfc3ea68865bd7060eb52
Add param verifier to tests
- This helps us ensure we're using all the params we create at testing time or we handle them with warnings - Update Mockito to a modern version - Remove DevServerTest1 which already exists as DevServer1Test and wasn't getting run anyway - Remove stubs that Mockito complained about
diff --git a/pom.xml b/pom.xml index 2adae2388..67412fe4f 100644 --- a/pom.xml +++ b/pom.xml @@ -108,8 +108,8 @@ </dependency> <dependency> <groupId>org.mockito</groupId> - <artifactId>mockito-all</artifactId> - <version>2.0.2-beta</version> + <artifactId>mockito-core</artifactId> + ...
3
1
0
[{"id": "G0", "claim": "The new verifyDeclaredGetters methods declare the blanket 'throws Exception' rather than the specific exceptions they can throw, apparently to avoid declaring four different exceptions.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim"...
null
GoogleCloudPlatform__appengine-plugins__378
GoogleCloudPlatform/appengine-plugins
378
defect
814aca98ce22a63bffe966aed4150bcafb159fe5
c4c341bcdc3e6578731bde624029380791e8bad9
Extract environment settings from appengine-web.xml and set them for devappserver1 runs
What do you think of this approach? If ok, I'll go ahead and add unit tests. I tested this with devappserver1 and IntelliJ.
diff --git a/src/main/java/com/google/cloud/tools/appengine/AppEngineDescriptor.java b/src/main/java/com/google/cloud/tools/appengine/AppEngineDescriptor.java index e2180b57a..594f973ed 100644 --- a/src/main/java/com/google/cloud/tools/appengine/AppEngineDescriptor.java +++ b/src/main/java/com/google/cloud/tools/appeng...
14
9
5
[{"id": "G0", "claim": "The new environment-variable collection code duplicates logic already in isJava8 and the author intends to refactor it a little.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Environment variables can clash between servi...
null
GoogleCloudPlatform__appengine-plugins__426
GoogleCloudPlatform/appengine-plugins
426
defect
f2941d053d005af5c27b9ec7b664f51d333000db
04ecfbdcc4de0090d3784d74af789072c06ac406
Adds CloudSdk parameter for setting structured logs value
fixes #425 This new parameter mimics the new gcloud configuration for providing the structured error logs environment variable setting `CLOUDSDK_CORE_SHOW_STRUCTURED_LOGS`. gcloud accepts a string value for this: `terminal`, `log`, `always`, `never` Setting this to terminal, or always, produces json output for...
diff --git a/src/main/java/com/google/cloud/tools/appengine/cloudsdk/CloudSdk.java b/src/main/java/com/google/cloud/tools/appengine/cloudsdk/CloudSdk.java index bad8413ea..6332d2823 100644 --- a/src/main/java/com/google/cloud/tools/appengine/cloudsdk/CloudSdk.java +++ b/src/main/java/com/google/cloud/tools/appengine/cl...
4
3
2
[{"id": "G0", "claim": "The minimum Cloud SDK version should be updated, because the new CLOUDSDK_CORE_SHOW_STRUCTURED_LOGS variable only exists since SDK 159, and on earlier SDK versions the parameter would silently have no effect.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introd...
null
GoogleCloudPlatform__appengine-plugins__452
GoogleCloudPlatform/appengine-plugins
452
defect
d86701f6cfdf144fc021cb1d8d585989efc83cf0
3bb04bfd705d30c366f2a1f056b62b606923e107
Adds GAE_ENV and GAE_RUNTIME environment variables for local development.
Fixes #444 . Does this for CloudSdkAppEngineDevServer1. Will write the tests if this is the way we want to do it.
diff --git a/src/main/java/com/google/cloud/tools/appengine/cloudsdk/CloudSdkAppEngineDevServer1.java b/src/main/java/com/google/cloud/tools/appengine/cloudsdk/CloudSdkAppEngineDevServer1.java index 6bccab806..4138288b6 100644 --- a/src/main/java/com/google/cloud/tools/appengine/cloudsdk/CloudSdkAppEngineDevServer1.jav...
4
3
2
[{"id": "G0", "claim": "Tests should be added for the new GAE_ENV/GAE_RUNTIME environment variables before the PR goes in.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The tests CloudSdkAppEngineDevServer1Test#testPrepareCommand_booleanFlags and Cloud...
null
GoogleCloudPlatform__appengine-plugins__454
GoogleCloudPlatform/appengine-plugins
454
defect
63353de0851228240c53da3964fb67aca804b0e6
31928988be8ccf0c55f7f5ffc243b25f6e4236a8
Downloader component of Managed Cloud SDK.
First part of the Cloud SDK manager code is the downloader. The first few PRs will all just be generic functionality to keep commits small. Once that's done, we'll stitch it all together.
diff --git a/pom.xml b/pom.xml index 5694b0b45..6d0f0ea30 100644 --- a/pom.xml +++ b/pom.xml @@ -103,6 +103,12 @@ <artifactId>javax.json</artifactId> <version>1.0.4</version> </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-compress</artifactId> ...
25
22
2
[{"id": "G0", "claim": "Block javadoc tags should not have terminating punctuation when no statements follow, applied here and everywhere else.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "DownloaderFactory, and likewise StandardDownloader, shou...
null
GoogleCloudPlatform__appengine-plugins__477
GoogleCloudPlatform/appengine-plugins
477
defect
1fb602d26a1a40bbc2d8553db1287b8672e85e68
2016a9c3dd104a0b3db8fb85336bfadf4b3535e0
Adds utility classes around the libraries.json file
This will either be here, next to the `libraries.json` file and synchronized with the changes made to the JSON, or it would need to live independently in the IntelliJ plugin, so I opted to place it here. Feel free to suggest different approaches as well.
diff --git a/src/main/java/com/google/cloud/tools/libraries/CloudLibraries.java b/src/main/java/com/google/cloud/tools/libraries/CloudLibraries.java new file mode 100644 index 000000000..a9e58a0ea --- /dev/null +++ b/src/main/java/com/google/cloud/tools/libraries/CloudLibraries.java @@ -0,0 +1,65 @@ +/* + * Copyright 2...
6
2
0
[{"id": "G0", "claim": "The public CloudLibrary.parse(String) method has no clear use in practice, since given the JSON file a user would first parse it into a List<CloudLibrary>; the reviewer questions what the method is for.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"i...
null
GoogleCloudPlatform__appengine-plugins__533
GoogleCloudPlatform/appengine-plugins
533
defect
4ba5670a0dd29b26bcffa76bf639ebdb62aff3f0
92de46122be5d67bcfca164820209c4b09bdf3f0
Add child progress listener and UNKNOWN const
fixed #529 #528 Provides a default implementation of a child progress listener. Implementers of progress listener should be able to just delegate to it for "newChild".
diff --git a/src/main/java/com/google/cloud/tools/managedcloudsdk/ChildProgressListener.java b/src/main/java/com/google/cloud/tools/managedcloudsdk/ChildProgressListener.java new file mode 100644 index 000000000..f0eb37fec --- /dev/null +++ b/src/main/java/com/google/cloud/tools/managedcloudsdk/ChildProgressListener.ja...
5
3
0
[{"id": "G0", "claim": "The new progressListener.start calls should pass the UNKNOWN constant instead of the literal -1.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The test should use @RunWith(MockitoJUnitRunner.class) instead of the Mockito...
null
GoogleCloudPlatform__appengine-plugins__536
GoogleCloudPlatform/appengine-plugins
536
defect
1cf446b75cfeb14494cc71fafdedda85446c4a23
46fa328cc379188d67271ec723604486263f0cb3
Use OS specific conventions for managed cloud sdk home
fixes #534
diff --git a/src/main/java/com/google/cloud/tools/managedcloudsdk/InvalidOsStateException.java b/src/main/java/com/google/cloud/tools/managedcloudsdk/InvalidOsStateException.java new file mode 100644 index 000000000..af6fdd57d --- /dev/null +++ b/src/main/java/com/google/cloud/tools/managedcloudsdk/InvalidOsStateExcept...
10
7
2
[{"id": "G0", "claim": "The new exception should be named something like CannotFindManagedSdkHomeException instead of InvalidOsStateException.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Delete the words \"Exception for when\" from the class ...
null
GoogleCloudPlatform__appengine-plugins__552
GoogleCloudPlatform/appengine-plugins
552
defect
cd6bcbc89bc6310102e9a7adc65fc5caca861f45
363a7a7e9b4de1b3bf1fb7f7bd596b95232014a3
Update windows sdk download path to use bundled python
Fixes #551.
diff --git a/src/main/java/com/google/cloud/tools/managedcloudsdk/ManagedCloudSdk.java b/src/main/java/com/google/cloud/tools/managedcloudsdk/ManagedCloudSdk.java index 848a83121..49869703f 100644 --- a/src/main/java/com/google/cloud/tools/managedcloudsdk/ManagedCloudSdk.java +++ b/src/main/java/com/google/cloud/tools/...
12
9
4
[{"id": "G0", "claim": "A test fails on Kokoro Windows with this pull request applied.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "Verify that the SDK actually installs on Windows with python removed from PATH and CLOUDSDK_PYTHON unset, e.g. via ...
null
GoogleCloudPlatform__appengine-plugins__556
GoogleCloudPlatform/appengine-plugins
556
defect
83681110d489e8e2798062c0dd8ad3705237bc31
9fe6b0fb0a1d057dca4f5f057f5a0a4129a411ea
Delete copied bundled python
Fixes #554. Looks like `Files.deleteRecursively()` is still not available in Guava 21. I reused `FileDeleteVisitor`. To my surprise, there was no good way to remove a last segment in a `Path` or `File`. Using `..` did not work. `Path.subpath()` returns a relative path, and I have no confidence in correctly conver...
diff --git a/src/main/java/com/google/cloud/tools/managedcloudsdk/install/FileDeleteVisitor.java b/src/main/java/com/google/cloud/tools/io/FileDeleteVisitor.java similarity index 92% rename from src/main/java/com/google/cloud/tools/managedcloudsdk/install/FileDeleteVisitor.java rename to src/main/java/com/google/cloud/...
3
3
1
[{"id": "G0", "claim": "Simplify the shutdown-hook registration to `new Thread(() -> deleteCopiedPython(tempPythonLocation))` instead of an anonymous Thread subclass.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Add a comment describing what t...
null
GoogleCloudPlatform__appengine-plugins__582
GoogleCloudPlatform/appengine-plugins
582
defect
ac33366e02d1a4ac51a0e864adb7f51bc9666e0e
75c06ba194dff360fe6800e472b88be43e65db7d
Update AppCfg/Gcloud/DevAppServer based command API
This is the inclusion of the major API changes as described in this comment : https://github.com/GoogleCloudPlatform/appengine-plugins-core/pull/579#issuecomment-380243084
diff --git a/src/main/java/com/google/cloud/tools/appengine/cloudsdk/AppCfg.java b/src/main/java/com/google/cloud/tools/appengine/cloudsdk/AppCfg.java new file mode 100644 index 000000000..0a921fc54 --- /dev/null +++ b/src/main/java/com/google/cloud/tools/appengine/cloudsdk/AppCfg.java @@ -0,0 +1,45 @@ +/* + * Copyrigh...
13
8
3
[{"id": "G0", "claim": "The local variable pb in GcloudRunner.run should be renamed to a descriptive name such as processBuilder.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The local variable pb in AppCfgRunner.run should be renamed to a des...
null
GoogleCloudPlatform__appengine-plugins__592
GoogleCloudPlatform/appengine-plugins
592
defect
cdace0fc87ba4abdd9c6a9fd03220898d5c538c5
5c4dd4bc207e9233e1f32bcd98e2a29b00cd0380
clarify which SDK path getSdkPath returns
@loosebazooka fix #171
diff --git a/src/main/java/com/google/cloud/tools/appengine/cloudsdk/CloudSdk.java b/src/main/java/com/google/cloud/tools/appengine/cloudsdk/CloudSdk.java index 561d47876..3ae5ad8d4 100644 --- a/src/main/java/com/google/cloud/tools/appengine/cloudsdk/CloudSdk.java +++ b/src/main/java/com/google/cloud/tools/appengine/cl...
2
2
1
[{"id": "G0", "claim": "The rename of getJavaAppEngineSdkPath() to getJarPath() is not helpful because there are a number of directories in the SDK that contain .jar files.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G2", "claim": "Kokoro tests are failing ...
null
GoogleCloudPlatform__appengine-plugins__605
GoogleCloudPlatform/appengine-plugins
605
defect
541bbd03c947d14b7108fb449ee6bc8261cabfb8
5a9486c60e38d5433a23d8e72bee7a4336eea22f
Reduce managed SDK install path length
About #595. Reduces SDK home path length. With 20 more characters, I think we can practically get away from #595. New: `Users\<user name>\AppData\Local\google\ct4j-cloud-sdk\LATEST\google-cloud-sdk` Old: `Users\<user name>\AppData\Local\google-cloud-tools-java\managed-cloud-sdk\LATEST\google-cloud-sdk` I also...
diff --git a/src/main/java/com/google/cloud/tools/managedcloudsdk/ManagedCloudSdk.java b/src/main/java/com/google/cloud/tools/managedcloudsdk/ManagedCloudSdk.java index 49869703f..838ef62db 100644 --- a/src/main/java/com/google/cloud/tools/managedcloudsdk/ManagedCloudSdk.java +++ b/src/main/java/com/google/cloud/tools/...
1
1
0
[{"id": "G0", "claim": "Shortening the managed SDK install path on every platform helps but is not a complete fix; the install-path-length problem needs to be addressed at the root.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleCloudPlatform__appengine-plugins__653
GoogleCloudPlatform/appengine-plugins
653
defect
b7d592af292efb049ea02d937db983d26c8abcc9
931fcb653b2f0c8eb0d4a412f6f866156d57d763
Set root as working directory when updating Cloud SDK
Fixes #651. This is like executing the `gcloud` binary from the root directory.
diff --git a/src/main/java/com/google/cloud/tools/managedcloudsdk/components/SdkComponentInstaller.java b/src/main/java/com/google/cloud/tools/managedcloudsdk/components/SdkComponentInstaller.java index 7221326e2..eb81a4997 100644 --- a/src/main/java/com/google/cloud/tools/managedcloudsdk/components/SdkComponentInstall...
3
2
1
[{"id": "G0", "claim": "gcloud.getRoot() can return null (the method can return null), and the result is passed as the working directory without a null check.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The variable `gcloud` is hard to read becau...
null
GoogleCloudPlatform__appengine-plugins__693
GoogleCloudPlatform/appengine-plugins
693
defect
e8179db284e45e0343f3253877966062ad8c67c4
07a0e14d434830d857da602752e09bbeb5243b59
Passes --application flag to devappserver1 and 2.
Fixes #567 Next steps are to release a new version of `appengine-plugins-core` and use the new release in `app-maven-plugin` and `app-gradle-plugin`.
diff --git a/src/main/java/com/google/cloud/tools/appengine/api/devserver/DefaultRunConfiguration.java b/src/main/java/com/google/cloud/tools/appengine/api/devserver/DefaultRunConfiguration.java index 83d7155ec..a252e3cc1 100644 --- a/src/main/java/com/google/cloud/tools/appengine/api/devserver/DefaultRunConfiguration....
3
3
1
[{"id": "G0", "claim": "The new project getter/setter methods added to RunConfiguration and DefaultRunConfiguration need Javadoc explaining what they are.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new property's naming is ambiguous — 'app...
null
GoogleCloudPlatform__appengine-plugins__727
GoogleCloudPlatform/appengine-plugins
727
defect
38b9211fd8996ed3cf6c8061071168a44c24773b
fb05e3fbdc02642118bb26a24dafa600e828b102
Update more deployment configs
depends on #724, needs to be rebased on that when merged. part of #723
diff --git a/src/main/java/com/google/cloud/tools/appengine/api/deploy/DefaultDeployProjectConfigurationConfiguration.java b/src/main/java/com/google/cloud/tools/appengine/api/deploy/DefaultDeployProjectConfigurationConfiguration.java deleted file mode 100644 index 6dac8940d..000000000 --- a/src/main/java/com/google/cl...
1
1
0
[{"id": "G0", "claim": "The new configuration classes should use Path instead of File for the appEngineDirectory field (and related path-typed fields).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleCloudPlatform__appengine-plugins__770
GoogleCloudPlatform/appengine-plugins
770
defect
b13bcb3b925366e9850a058dbbd6d7653a00af20
c3ca6c823a64db6794cd2ff93a7007a1e9af5507
Allow empty services
Continuing from #767 fix #766
diff --git a/pom.xml b/pom.xml index d9615a9d4..ce7ec39f3 100644 --- a/pom.xml +++ b/pom.xml @@ -149,7 +149,7 @@ </annotationProcessorPaths> <compilerArgs> <arg>-XDcompilePolicy=simple</arg> - <arg>-Xplugin:ErrorProne -Xep:NullAway:ERROR -XepOpt:NullAway:AnnotatedPackages=c...
11
7
1
[{"id": "G0", "claim": "The getJvmFlags Javadoc should be reworded (suggested: 'Returns JVM flags as a mutable list that exposes the internal state') because the reviewer believes the implementation no longer exposes the mutable internal state.", "category": "documentation", "verdict": "supported", "priority": "P2", "s...
null
GoogleCloudPlatform__appengine-plugins__807
GoogleCloudPlatform/appengine-plugins
807
defect
955b5fcd1ba50c02d65e8e5c378f72556c61914a
d23deef7ea6a8766cdae7154afe65356e86646e3
no args constructors for builders
This should reduce the likelihood of swapped arguments of the same type (something that bedeviled me in CT4E a few months back though fortunately we caught it before it shipped to customers) part of #765 @loosebazooka
diff --git a/src/main/java/com/google/cloud/tools/appengine/configuration/AppEngineWebXmlProjectStageConfiguration.java b/src/main/java/com/google/cloud/tools/appengine/configuration/AppEngineWebXmlProjectStageConfiguration.java index b746142de..ebe36a8d5 100644 --- a/src/main/java/com/google/cloud/tools/appengine/conf...
6
4
2
[{"id": "G0", "claim": "Since the zero-arg builder no longer forces required directories at construction, build() should check at the end that they are set.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The deprecated factory method should chain th...
null
GoogleCloudPlatform__appengine-plugins__842
GoogleCloudPlatform/appengine-plugins
842
defect
cd77618d738151f2393f77db8e55bae2e3e0421a
55cd842928e906a30b3252ecbb026308753248af
Add binary path to staging
part of #840 requires #839 Allows binaries in java11 build path (for example when building a quarkus native app) Also changes the deprecated use of appYamlStaging builder in tests
diff --git a/src/main/java/com/google/cloud/tools/appengine/configuration/AppYamlProjectStageConfiguration.java b/src/main/java/com/google/cloud/tools/appengine/configuration/AppYamlProjectStageConfiguration.java index 79d4b9983..9c79757e0 100644 --- a/src/main/java/com/google/cloud/tools/appengine/configuration/AppYam...
10
9
0
[{"id": "G0", "claim": "The new tests should create app.yaml via Files.write with StandardOpenOption.CREATE_NEW instead of a separate Files.createFile call.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new test code is stylistically incons...
null
GoogleCloudPlatform__appengine-plugins__854
GoogleCloudPlatform/appengine-plugins
854
defect
f5b55344b41c43ffb6577d9fc7585b74e6663056
f0e17f7a6f49fc103a530d370cf8ec3bc51bd28b
Allow adding additional environment variables for SDK install process.
Fixes #853 Main intent is to allow Cloud Code passing in IDE proxy settings via standard environment variables (`http[s]_proxy`) for install process.
diff --git a/src/main/java/com/google/cloud/tools/managedcloudsdk/ManagedCloudSdk.java b/src/main/java/com/google/cloud/tools/managedcloudsdk/ManagedCloudSdk.java index 84018ac21..d869027aa 100644 --- a/src/main/java/com/google/cloud/tools/managedcloudsdk/ManagedCloudSdk.java +++ b/src/main/java/com/google/cloud/tools/...
11
10
1
[{"id": "G0", "claim": "The user agent string literal \"google-cloud-tools-java\" should be a named constant since it is repeated in both newInstaller overloads.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new field additionalEnvVariables...
null
GoogleCloudPlatform__appengine-plugins__917
GoogleCloudPlatform/appengine-plugins
917
defect
bbc8b8d3b9969ff2d5cd97fa16f812e76e2fd09a
33f1143fae03fc12653ed8c54b2aa36ebd7acb5d
chore: Allow custom JDK version for Dev Server
Thank you for your interest in contributing! For general guidelines, please refer to the [contributing guide](https://github.com/GoogleCloudPlatform/appengine-plugins-core/blob/master/CONTRIBUTING.md). Before submitting a pull request, please make sure to: - [x] Identify an existing [issue](https://github.com/Go...
diff --git a/src/main/java/com/google/cloud/tools/appengine/configuration/RunConfiguration.java b/src/main/java/com/google/cloud/tools/appengine/configuration/RunConfiguration.java index de927f776..0c9a3d14f 100644 --- a/src/main/java/com/google/cloud/tools/appengine/configuration/RunConfiguration.java +++ b/src/main/j...
8
8
0
[{"id": "G0", "claim": "The comment above the JPMS flag code says \"Java11 or later\" although the flags are applied for any JDK version above 8, i.e. Java 9 or later.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The helper's leading line commen...
null
GoogleCloudPlatform__bank-of-anthos__156
GoogleCloudPlatform/bank-of-anthos
156
defect
5f5f3da0e90f92e29af811790b9ab5affd58f36f
1b35f187b51d1a0d9190c317891db5b334cd4d5c
Add unit tests to LedgerWriterController
#52 - Add unit tests for addTransaction method - Modulate the method validateTransaction to a new class - Move submitTransaction method commands inside addTransaction method - Delete dependency and usage of system-rules: environmentvariable since no longer needed - Add src/ledgerwriter/src/test/resources/mockito...
diff --git a/src/frontend/flask_server.py b/src/frontend/flask_server.py index 2fffb57e61..e298db0801 100644 --- a/src/frontend/flask_server.py +++ b/src/frontend/flask_server.py @@ -241,7 +241,7 @@ def _submit_transaction(transaction_data): try: resp.raise_for_status() # Raise on HTTP Status code 4XX or ...
12
9
2
[{"id": "G0", "claim": "Add tests for the specific conditions that TransactionValidator checks for (a TransactionValidatorTest), in this PR or a future one.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Refactor checkAvailableBalance into getAvailableB...
null
GoogleCloudPlatform__cloud-sql-go-connector__101
GoogleCloudPlatform/cloud-sql-go-connector
101
defect
f2a7a6408a638beb92bf8729f03fc0899d15d86c
65d59062f7adadfb9a410b4ace4013a74a12fba6
fix!: use singular name for package
> In go, package names are not plural. This is surprising to programmers who came from other languages and are retaining an old habit of pluralizing names. Don’t name a package httputils, but httputil! See https://rakyll.org/style-packages.
diff --git a/dialer.go b/dialer.go index e246419e7..a4376f4ba 100644 --- a/dialer.go +++ b/dialer.go @@ -25,7 +25,7 @@ import ( "sync/atomic" "time" - "cloud.google.com/go/cloudsqlconn/errtypes" + "cloud.google.com/go/cloudsqlconn/errtype" "cloud.google.com/go/cloudsqlconn/internal/cloudsql" "cloud.google.com...
1
1
1
[{"id": "G0", "claim": "Some occurrences of the old errtypes package name were missed in dialer_test.go and were left unrenamed when the package was renamed to errtype.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}]
null
GoogleCloudPlatform__cloud-sql-go-connector__171
GoogleCloudPlatform/cloud-sql-go-connector
171
defect
3fe3d4fb45868754b9f5f3a7da7830ed16610975
f7bc6141bf1da65d78de23300d3f6cb3bc9f4388
feat: add DialOption for IAM DB Authentication
## Change Description Adds the WithDialIAMAuthN DialOption, for dialing an instance with an IAMAuthN option different than the Dialer setting.
diff --git a/dialer.go b/dialer.go index f597bfe4d..d2c9f697a 100644 --- a/dialer.go +++ b/dialer.go @@ -117,16 +117,13 @@ func NewDialer(ctx context.Context, opts ...Option) (*Dialer, error) { // If callers have not provided a token source, either explicitly with // WithTokenSource or implicitly with WithCredentia...
6
5
2
[{"id": "G0", "claim": "The doc comment on WithDialIAMAuthN should read \"may cause increased API usage\" instead of the typo \"may caused\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The defer closures around stop() in the new tests should b...
null
GoogleCloudPlatform__cloud-sql-go-connector__310
GoogleCloudPlatform/cloud-sql-go-connector
310
defect
82b73bced8b0c2a78e77336ca4114c9903bdca1f
97e4b6538bf085148c90016cce21876e03be97e5
fix: throw error when Auto IAM AuthN is unsupported
Fixes #283.
diff --git a/dialer.go b/dialer.go index 7c3bccba..b9ad8f57 100644 --- a/dialer.go +++ b/dialer.go @@ -170,6 +170,20 @@ func NewDialer(ctx context.Context, opts ...Option) (*Dialer, error) { return d, nil } +func verifyIAMAuthNConfig(version string, wantsIAMAuthN bool) error { + // Don't check engine version if IA...
7
7
2
[{"id": "G0", "claim": "Use the already-existing i.InstanceVersion accessor instead of mutating ConnectInfo's return into a new struct.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The IAM AuthN check should be inlined into Dial rather than left as a s...
null
GoogleCloudPlatform__cloud-sql-go-connector__372
GoogleCloudPlatform/cloud-sql-go-connector
372
defect
16a1d68862d5e89db7da710a9e1d8cf132c18f65
571c5efcf5098522b0ba238dd3d3f6f12aca052b
fix: handle context cancellations during instance refresh
## Change Description Context cancellation was being checked after the immediate retries for errored instance refreshes. This moves the check up a bit further so the background refresh process exits once the context is cancelled. ## Checklist - [x] Make sure to open an issue as a [bug/issue](https://github...
diff --git a/internal/cloudsql/instance.go b/internal/cloudsql/instance.go index 6b7975068..d3b9736c0 100644 --- a/internal/cloudsql/instance.go +++ b/internal/cloudsql/instance.go @@ -293,9 +293,21 @@ func (i *Instance) scheduleRefresh(d time.Duration) *refreshOperation { res.md, res.tlsCfg, res.expiry, res.err = i...
1
1
1
[{"id": "G0", "claim": "The next-refresh scheduling should stay put below the error-handling branch; hoisted as it is in S1, the error case schedules a refresh and then the error branch schedules another, so two refreshes get scheduled.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "in...
null
GoogleCloudPlatform__cloud-sql-go-connector__522
GoogleCloudPlatform/cloud-sql-go-connector
522
defect
1b8f79847fa9e44b81367c6b2f60a9ccc0415fcc
a0180da98f862a320fe183e7a85315b958667932
chore: performRefresh returns refreshResult
This change brings the Go Connector inline with a recent change in the AlloyDB fork. In addition, this commit standardizes on "refresh operation" and "refresh result."
diff --git a/internal/cloudsql/instance.go b/internal/cloudsql/instance.go index 0e073227..fad54a8c 100644 --- a/internal/cloudsql/instance.go +++ b/internal/cloudsql/instance.go @@ -30,8 +30,8 @@ import ( ) const ( - // the refresh buffer is the amount of time before a refresh cycle's result - // expires that a ne...
2
2
0
[{"id": "G0", "claim": "The refreshResult doc comment should say \"refresh operation\" instead of \"refresh cycle\".", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The refreshBuffer comment should say \"a refresh operation's certificate\" instead ...
null
GoogleCloudPlatform__cloud-sql-go-connector__565
GoogleCloudPlatform/cloud-sql-go-connector
565
defect
731a15c6734ad64d5ba3aeebc6035af685c94c40
ae86439ff54a6cd2f908b6ece58c7e597e5eafe9
feat: add support for PSC connections
Add a new dialOption for `WithPSC()` to support connections to Cloud SQL using [private service connect](https://cloud.google.com/vpc/docs/private-service-connect).
diff --git a/internal/cloudsql/refresh.go b/internal/cloudsql/refresh.go index 0059580a..581bd14b 100644 --- a/internal/cloudsql/refresh.go +++ b/internal/cloudsql/refresh.go @@ -35,6 +35,8 @@ const ( PublicIP = "PUBLIC" // PrivateIP is the value for private IP Cloud SQL instances. PrivateIP = "PRIVATE" + // PSC ...
2
1
0
[{"id": "G0", "claim": "Use t.Fatal instead of t.Fatalf for the message that takes no format arguments.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Consider adding a better default value for DNSName in NewFakeCSQLInstance instead of the empty...
null
GoogleCloudPlatform__cloud-sql-go-connector__679
GoogleCloudPlatform/cloud-sql-go-connector
679
defect
69c07283888ae860de91184341477a003b30c21b
f04c501add98f8af806e74ad5181694ea8f43f9c
chore: flatten refresh config into bool
The only value that will ever affect a refresh is Auto IAM AuthN. This commit removes the unnecessary struct wrapper in favor of a simple bool or bool pointer.
diff --git a/dialer.go b/dialer.go index fa0ed0df..2242c9cc 100644 --- a/dialer.go +++ b/dialer.go @@ -160,9 +160,7 @@ func NewDialer(ctx context.Context, opts ...Option) (*Dialer, error) { dc := dialConfig{ ipType: cloudsql.PublicIP, tcpKeepAlive: defaultTCPKeepAlive, - refreshConfig: cloudsql.RefreshCo...
3
3
0
[{"id": "G0", "claim": "Fix the typo \"attemtp\" in the new UseIAMAuthNDial doc comment on internal/cloudsql/instance.go line 203.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The comment \"update the refresh config as needed\" above i.useIAMAut...
null
GoogleCloudPlatform__cloud-sql-go-connector__686
GoogleCloudPlatform/cloud-sql-go-connector
686
defect
0d941f8f73f8321247d375845c7008bacdac6fde
0a7883bf831cba1f704d1ce1f98c5f10189d75b2
fix: ensure cert refresh recovers from sleep
When a computer wakes from sleep after more than ~1 hour and a client tries to connect, the internal certificate cache will have an expired certificate. In the past, we erroneously believed that the TLS handshake would fail if the client certificate expired. However, with TLS 1.3, the client is the last to send a hands...
diff --git a/dialer.go b/dialer.go index a4633e2d..d6f7bcf4 100644 --- a/dialer.go +++ b/dialer.go @@ -231,6 +231,25 @@ func (d *Dialer) Dial(ctx context.Context, instance string, opts ...DialOption) } endInfo(err) + // If the client certificate has expired (as when the computer goes to + // sleep, and the refres...
2
1
1
[{"id": "G0", "claim": "The error path in TestDialerConnectInfoExpiredCert would be clearer if it were in a separate test case.", "category": "testing", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "invalidClientCert dereferences c.Certificates[0].Leaf.NotAfter without guarant...
null
GoogleCloudPlatform__cloud-sql-go-connector__827
GoogleCloudPlatform/cloud-sql-go-connector
827
defect
bf293e25e2d52f395734c597c86dfe85ede5f4cd
a037bd50f397fd11acb1c148adf71dc7a97f25ef
fix: invalidate cache on failed `Warmup` and `EngineVersion`
Invalidate the cache and stop background refreshes on failed `Warmup` and `EngineVersion` calls. Fixes #778
diff --git a/dialer.go b/dialer.go index 8451e9e1..b047d18e 100644 --- a/dialer.go +++ b/dialer.go @@ -433,12 +433,13 @@ func (d *Dialer) EngineVersion(ctx context.Context, icn string) (string, error) if err != nil { return "", err } - i, err := d.connectionInfoCache(ctx, cn, &d.defaultDialConfig.useIAMAuthN) + ...
1
1
1
[{"id": "G0", "claim": "Warmup only deletes the bad cache entry when ConnectionInfo already fails; if an IAM permission is missing the cache call returns no error until someone asks for ConnectionInfo, so the internal cache cannot be properly closed — the reviewer asks to replace these internals with a call to EngineVe...
null
GoogleCloudPlatform__cloud-sql-go-connector__868
GoogleCloudPlatform/cloud-sql-go-connector
868
defect
135ec39a2bccb53c5789b6316759a64334557a3f
8668c3fefff27cf9f2b57432750d765a59c0af24
feat: Automatically reset connection when the DNS record changes.
When a connection is configured using a DNS domain name, the connector will poll the DNS TXT record every 30 seconds. If the value of the DNS record changes, the connector will close all connections to the old instance, and direct new connections to the updated instance. Part of https://github.com/GoogleCloudPlatfo...
diff --git a/README.md b/README.md index ef77c41b9..6787530b2 100644 --- a/README.md +++ b/README.md @@ -234,7 +234,8 @@ func connect() { // ... etc } ``` -### Using DNS to identify an instance + +### Using DNS domain names to identify instances The connector can be configured to use DNS to look up an instanc...
4
4
0
[{"id": "G0", "claim": "The newMonitoredCache function signature stacks its six arguments on one line and would be nicer wrapped across lines or split for people on smaller screens.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The hand-written...
null
GoogleCloudPlatform__cloud-sql-go-connector__911
GoogleCloudPlatform/cloud-sql-go-connector
911
defect
3e8203a7feabf64e345376236b9f9685cb805daa
b4c58fe4ca270687511be68bef0196fb40df4f3d
feat: Validate the server certificate with the domain name from config
When the connector is configured using a DNS name (instead of an instance connection name), validate the instance server certificate using that DNS name. The server certificate should include a Subject Alternative Name record matching the DNS name used by the connector.
diff --git a/internal/cloudsql/instance.go b/internal/cloudsql/instance.go index e3ced10e8..6bd569266 100644 --- a/internal/cloudsql/instance.go +++ b/internal/cloudsql/instance.go @@ -241,11 +241,21 @@ func (c ConnectionInfo) TLSConfig() *tls.Config { for _, caCert := range c.ServerCACert { pool.AddCert(caCert) ...
1
1
1
[{"id": "G0", "claim": "The pull request's new ServerName-selection behavior needs a test covering it.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
GoogleCloudPlatform__cloud-sql-go-connector__954
GoogleCloudPlatform/cloud-sql-go-connector
954
defect
9302408100ca84021a327dca759cb0d6944aebc4
08c5e88a59bb0d046813c62a7195279e2244c606
feat: Use standard TLS hostname validation for instances with DNS names
When the the Cloud SQL Instance reports that it has a DNS Name, the connector will use standard TLS hostname validation when checking the server certificate. Now, the server's TLS certificate must contain a SAN record with the instance's DNS name. The ConnectSettings API added a field `dns_names` which contains al...
diff --git a/dialer_test.go b/dialer_test.go index 33bbe8132..1300ce162 100644 --- a/dialer_test.go +++ b/dialer_test.go @@ -1104,35 +1104,69 @@ func TestDialerUpdatesAutomaticallyAfterDnsChange(t *testing.T) { func TestDialerChecksSubjectAlternativeNameAndSucceeds(t *testing.T) { - // Create an instance with cust...
3
1
1
[{"id": "G0", "claim": "Add a comment in fetchMetadata explaining the dns_names search logic, especially the DnsScope check, which may not be trivial.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "TestDialerChecksSubjectAlternativeNameAndSucceeds...
null
GoogleCloudPlatform__cloud-sql-nodejs-connector__13
GoogleCloudPlatform/cloud-sql-nodejs-connector
13
defect
2b5b21f28c5eb90486bd09f2ba72b42e081404f3
109167c2fbf0a55bd046195035c0dfd993b5f95e
chore: add socket factory function
Adds a function that establishes a secure TLS/SSL connection when provided the required information: host ip, ssl certs, instance info and private key. This function returns a tls socket stream that can be then handled to database drivers in order to connect / perform commands to a Cloud SQL instance.
diff --git a/src/socket.ts b/src/socket.ts new file mode 100644 index 00000000..155f304d --- /dev/null +++ b/src/socket.ts @@ -0,0 +1,74 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You m...
3
3
0
[{"id": "G0", "claim": "Move the inline certificate and key constants out of test/socket.ts into a separate certs.ts file to avoid the noise in the test file.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Use 127.0.0.1 instead of 0.0.0.0 as the...
null
GoogleCloudPlatform__cloud-sql-nodejs-connector__150
GoogleCloudPlatform/cloud-sql-nodejs-connector
150
defect
f7eb59efeb78be6fc124183e0125b703c47dbdd5
8c1f0c9c30bf3c1e388e4826b2686a42ab3e440a
feat: add support to PSC ip type
This PR adds support to a new `IpAddressTypes.PSC` ip type to support conections to Cloud SQL private service connect. Ref: https://cloud.google.com/vpc/docs/private-service-connect
diff --git a/README.md b/README.md index b17b4ea2..2453f285 100644 --- a/README.md +++ b/README.md @@ -155,23 +155,6 @@ await pool.end(); connector.close(); ``` -### Specifying Public or Private IP - -The Cloud SQL Connector for Node.js can be used to connect to Cloud SQL instances -using both public and private IP...
3
2
0
[{"id": "G0", "claim": "The 'Using a Private Service Connect (PSC) IP' heading should be folded into the 'Specifying Public or Private IP' section and the whole section renamed to 'Specifying IP Address Type', as done in the python connector PR.", "category": "documentation", "verdict": "supported", "priority": "P2", "...
null
GoogleCloudPlatform__cloud-sql-nodejs-connector__17
GoogleCloudPlatform/cloud-sql-nodejs-connector
17
defect
aec3f7daaba54af2dc5016604d689beef64dffbf
b2d0382448ed56579eeb08a08ef3f499aaf1f471
chore: add select ip address function
Adds a base `selectIpAddress` function that only supports "auto" mode.
diff --git a/src/ip-addresses.ts b/src/ip-addresses.ts index 011e7e57..dea7fec0 100644 --- a/src/ip-addresses.ts +++ b/src/ip-addresses.ts @@ -50,3 +50,13 @@ export function parseIpAddresses( return ipAddresses; } + +export function selectIpAddress(ipAddresses: IpAdresses): string { + if (ipAddresses.public) { +...
2
2
1
[{"id": "G0", "claim": "Remove the unnecessary else branches below return statements in selectIpAddress (the Go-style complaint applies in JS too).", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "selectIpAddress must provide a way to explicitly r...
null
GoogleCloudPlatform__cloud-sql-nodejs-connector__78
GoogleCloudPlatform/cloud-sql-nodejs-connector
78
defect
c3eb3c96aa2452be5d64a125080d05308fd1a27f
8734da1cd0f1939e41f8bbd4c5637e532ea65052
feat: support automatic IAM authentication
depends on #84 - Add AuthType parameter to connection settings - Append access token to ephemeral cert request when IAM auth is enabled.
diff --git a/src/auth-types.ts b/src/auth-types.ts new file mode 100644 index 00000000..71554851 --- /dev/null +++ b/src/auth-types.ts @@ -0,0 +1,18 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the Licens...
14
12
4
[{"id": "G0", "claim": "The breaking API changes (renaming `type` to `ipType` and adding `authType`) should be split out into a separate pull request.", "category": "design", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The `as` type assertion on `authType` should be avoided ...
null
GoogleCloudPlatform__config-validator__106
GoogleCloudPlatform/config-validator
106
defect
c46a2836803b010530a1c9a048f4424b602cd676
e47bb8651bfd2d9960a296ff0caa1cb395659eb8
Check GKE resources using Gatekeeper CT/C.
depends on [PR 105](https://github.com/forseti-security/config-validator/pull/105)
diff --git a/go.mod b/go.mod index cffa6b3..f09b78c 100644 --- a/go.mod +++ b/go.mod @@ -28,6 +28,7 @@ require ( google.golang.org/api v0.4.0 google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873 google.golang.org/grpc v1.23.0 + k8s.io/api v0.16.4 k8s.io/apiextensions-apiserver v0.16.4 k8s.io/apimachi...
4
4
2
[{"id": "G0", "claim": "In UnwrapCAIResource the found check for asset_type runs before checking err, so on error the real error may be masked as \"asset_type field not found\"; check err != nil first.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "...
null
GoogleCloudPlatform__config-validator__107
GoogleCloudPlatform/config-validator
107
defect
c46a2836803b010530a1c9a048f4424b602cd676
1a631f29deaa9ad4d86dc644650be75078384ce6
Handle reading individaul files from local / GCS.
The previous impl assumed all params were directories, this implementation attempts to simplify the interface and take either file or directory as a param.
diff --git a/go.mod b/go.mod index cffa6b3..f09b78c 100644 --- a/go.mod +++ b/go.mod @@ -28,6 +28,7 @@ require ( google.golang.org/api v0.4.0 google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873 google.golang.org/grpc v1.23.0 + k8s.io/api v0.16.4 k8s.io/apiextensions-apiserver v0.16.4 k8s.io/apimachi...
2
1
0
[{"id": "G0", "claim": "The license header in pkg/gcv/configs/config_test.go contains a search/replace error, reading 'you may not use this fileIface' instead of 'you may not use this file'.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The comme...
null
GoogleCloudPlatform__config-validator__109
GoogleCloudPlatform/config-validator
109
defect
42715099f8d09ced08b9f0df1e44a70c23f0e314
5ed529783bf7dfeed13e714e1056937d7ee7cc35
Refactor threading into ParallelValidator
This change is intended to simplify Validator to enable emitting results in a format other than Violation.
diff --git a/cmd/policy-tool/lint/lint.go b/cmd/policy-tool/lint/lint.go index 4ec8e76..4670ef8 100644 --- a/cmd/policy-tool/lint/lint.go +++ b/cmd/policy-tool/lint/lint.go @@ -31,7 +31,7 @@ func init() { } func lintCmd(cmd *cobra.Command, args []string) error { - _, err := gcv.NewValidator(make(chan struct{}), fla...
3
3
0
[{"id": "G0", "claim": "Remove the stray blank lines in the import block of pkg/gcv/parallelvalidator.go.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Add a comment explaining why the work channel buffer size is 2x the worker count.", "categor...
null
GoogleCloudPlatform__config-validator__151
GoogleCloudPlatform/config-validator
151
defect
7388761cc9ca5858aa54519ff4cdf1284c000a26
9a5d33edb8858841532592bb154c8f8a9ad023e2
Return severity in violation response
Update validator proto to include severity. Update audit rego to return severity, and parse the rego json response. Severity is always returned as ''. Resolves #152
diff --git a/.gitignore b/.gitignore index 5530ec8..63ea07d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,9 @@ bin/ # build artifacts /build-grpc/ +# debug +/cmd/policy-tool/policy-tool + # intellij stuff /.idea/ /config-validator.iml diff --git a/Makefile b/Makefile index aa90af2..59c5f8f 100644 --- a/Mak...
1
1
0
[{"id": "G0", "claim": "Add a comment explaining the usage of the new docker_run make rule.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleCloudPlatform__config-validator__157
GoogleCloudPlatform/config-validator
157
defect
b3da694a3d7978d4e0924bf0dfaf784a3700cf75
8dffde1f2a568d9282702bca3566fe9e96249aee
Expose the ConstraintConfig in validation results
Store it as a generic struct pb value. I feel this is safer than assuming it is YAML and storing it as a serialized string.
diff --git a/pkg/gcv/cf/cf_test.go b/pkg/gcv/cf/cf_test.go index 8b648c7..76c0037 100644 --- a/pkg/gcv/cf/cf_test.go +++ b/pkg/gcv/cf/cf_test.go @@ -1339,7 +1339,7 @@ func regoDependencies() map[string]string { } func mustConvertToProtoVal(from interface{}) *pb.Value { - converted, err := convertToProtoVal(from) + ...
2
2
2
[{"id": "G0", "claim": "The new ConstraintConfig's metadata field should contain the value of constraint.metadata, not the full constraint object.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "ConstraintConfig should mirror the constraint yaml, so ...
null
GoogleCloudPlatform__config-validator__165
GoogleCloudPlatform/config-validator
165
defect
58c27dd3c160a39500b905e13b941d13507b7c64
b13547f8575526d1516ef47ab527c7e114add620
Add InitOptions to configure Validator
InitOptions are passed to NewValidator along with paths to customize the Validator configuration. So far, it only supports DisabledBuiltins, which allows users to disable certain functions in Rego.
diff --git a/build/proto/Dockerfile b/build/proto/Dockerfile index 7999b3e..b305b45 100644 --- a/build/proto/Dockerfile +++ b/build/proto/Dockerfile @@ -15,13 +15,14 @@ # NOTE: This Dockerfile is optimized for ease of changes (dev/release work) # rather than number of layers. -FROM golang:1.11 +FROM golang:1.13 ...
1
1
0
[{"id": "G0", "claim": "Structure the validator's configuration as a standard Go functional-options API instead of passing a single *InitOptions struct parameter.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleCloudPlatform__config-validator__178
GoogleCloudPlatform/config-validator
178
defect
447049ff0a3bda9768586d8e2fc3440c3a517148
ea84e12b7b84ae08ecdd37ddfb40ba9f9e895077
Cleaned up test code to remove levels of indirection
the `match` and `exclude` functions make each test case slightly more compact, but they don't seem to provide significant value beyond that, and they obfuscate the underlying data structure that is being tested. I would prefer to have the test cases be slightly longer but easier to understand at a glance, if that sound...
diff --git a/pkg/gcptarget/gcptarget_test.go b/pkg/gcptarget/gcptarget_test.go index f3b637b..ac2b0da 100644 --- a/pkg/gcptarget/gcptarget_test.go +++ b/pkg/gcptarget/gcptarget_test.go @@ -24,31 +24,8 @@ import ( v1 "google.golang.org/genproto/googleapis/cloud/asset/v1" ) -// match creates a match struct as would ...
1
1
0
[{"id": "G0", "claim": "The `assetTest` helper method is no longer needed since jsonAssetTestcase and forsetiAssetTestcase now construct the ReviewTestcase struct directly, so it should be deleted.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleCloudPlatform__config-validator__31
GoogleCloudPlatform/config-validator
31
defect
237d9245bc417f4afcaabd363f8367d5233f4f6e
fa6d50a01b0fddec9a3c530699e7383b3d32ba35
Update constraint template parser to accept official template format
To fix issue #30 With this change, config validator now accepts both the legacy format and the new official format.
diff --git a/pkg/gcv/configs/config.go b/pkg/gcv/configs/config.go index 4481c8e..6c1dc00 100644 --- a/pkg/gcv/configs/config.go +++ b/pkg/gcv/configs/config.go @@ -109,7 +109,7 @@ func asConstraintTemplate(data *UnclassifiedConfig) (*ConstraintTemplate, bool) if err != nil { return nil, false // field expected to...
1
1
0
[{"id": "G0", "claim": "Add debug-level log lines in the get-as-template/constraint conversion methods logging the reason a conversion failed, preferably using the existing verbosity variable.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}]
null
GoogleCloudPlatform__config-validator__33
GoogleCloudPlatform/config-validator
33
defect
a2b2f5a74d4e1d7f56fb43caec5dd1cf805b7e5b
05e9b82f87934e1da1731885b1c113e67a37cf18
Refactoring conversion errors
Refactoring conversion to fail if the group matches, but other fields don't exist as expected. This allows better surfacing of errors. These would have already failed in the larger execution because we have no overlap of groups between constraints/templates.
diff --git a/pkg/gcv/configs/config.go b/pkg/gcv/configs/config.go index 6c1dc00..e220421 100644 --- a/pkg/gcv/configs/config.go +++ b/pkg/gcv/configs/config.go @@ -80,44 +80,44 @@ func (c *UnclassifiedConfig) AsInterface() (interface{}, error) { // Returns: // *Constraint: only set if valid constraint // bool: ...
2
1
0
[{"id": "G0", "claim": "Rework CategorizeYAMLFile into a switch on unclassified.Group so asConstraintTemplate and asConstraint can return (*ConstraintTemplate, error) / (*Constraint, error) instead of three return values.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "...
null
GoogleCloudPlatform__config-validator__40
GoogleCloudPlatform/config-validator
40
defect
45287eb51ce8f59fa150455722dabb73f953370b
37043a681ce361d1fb42206716bf5352233cd38b
Make default matcher behavior to match everything
If the target is not specified, it is the equivalent of specifying "organization/*". Fix #39.
diff --git a/pkg/gcv/cf/audit.go b/pkg/gcv/cf/audit.go index 739420e..4fd9be1 100644 --- a/pkg/gcv/cf/audit.go +++ b/pkg/gcv/cf/audit.go @@ -25,8 +25,10 @@ audit[result] { asset := inventory[_] constraint := constraints[_] - - re_match(constraint.spec.match.gcp.target[_], asset.ancestry_path) + gcp := _get_defau...
3
3
1
[{"id": "G0", "claim": "Add a check in AddConstraint to confirm that ancestry_path is always provided.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Extract the always-failing constraint template into its own helper function, e.g. makeAlwaysFailTem...
null
GoogleCloudPlatform__config-validator__45
GoogleCloudPlatform/config-validator
45
defect
ce0fa1c12514bb74d4cceb60f0797f0c3e98c787
7bdeefdbd6b5b6fa56ff589e2383539c01020bf4
Handle absent spec/target fields properly
Address https://github.com/forseti-security/policy-library/issues/104 Also add an "always violate" template in unit test, since the previous template needs a parameter.
diff --git a/pkg/gcv/cf/audit.go b/pkg/gcv/cf/audit.go index e0cd4b3..8b9f766 100644 --- a/pkg/gcv/cf/audit.go +++ b/pkg/gcv/cf/audit.go @@ -25,14 +25,16 @@ audit[result] { asset := inventory[_] constraint := constraints[_] + spec := _get_default(constraint, "spec", {}) + match := _get_default(spec, "match", {}) ...
1
1
0
[{"id": "G0", "claim": "The stray `#ENDINLINE` marker left in the new test template's inline rego can probably be dropped.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleCloudPlatform__config-validator__48
GoogleCloudPlatform/config-validator
48
defect
c3e84ddde0caac9a1f9ece6164a9a7d351b8ea94
7a86a27d721e8901a736076363d7e8987c23650d
Return constraint metadata with violations
This PR adds the constraint metadata into the output returned with violations.
diff --git a/api/validator.proto b/api/validator.proto index d2ab436..78fd305 100644 --- a/api/validator.proto +++ b/api/validator.proto @@ -20,6 +20,7 @@ package validator; import "google/iam/v1/policy.proto"; import "google/protobuf/struct.proto"; import "google/cloud/asset/v1/assets.proto"; +import "k8s.io/apimac...
3
2
2
[{"id": "G0", "claim": "The reviewer argued that the GetConstraint request must carry the constraint kind, since a name alone may not identify a constraint across kinds, and suggested that instead of enforcing cross-kind unique names, including the constraint content in the violation data might be an easier route.", "c...
null
GoogleCloudPlatform__config-validator__60
GoogleCloudPlatform/config-validator
60
defect
a24210e19cafc8041909adc636d548e835d53b23
f84b630ae495bb83317b1de92043cf8cd082cccb
Prep for new RPC
Add a new RPC method to .proto def. Refactor rego to reuse code for handling single asset review. Do away with using an "Option" for args that weren't optional.
diff --git a/api/validator.proto b/api/validator.proto index 35244da..ab7414b 100644 --- a/api/validator.proto +++ b/api/validator.proto @@ -75,6 +75,13 @@ message AuditResponse { message ResetRequest {} message ResetResponse {} +message ReviewRequest { + repeated Asset assets = 1; +} +message ReviewResponse { + ...
3
1
0
[{"id": "G0", "claim": "The Configure method's template-conflict error should keep returning the codes.AlreadyExists gRPC status error for consistency with how constraint conflicts are reported.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Converting t...
null
GoogleCloudPlatform__config-validator__61
GoogleCloudPlatform/config-validator
61
defect
b89eaf853100d63599c4ef74eaa28faa10c5ddf2
b641c759eeab736a1aa52c693414da89f467793e
Implement ConstraintFramework.Review
* This is intended to be a functional impl of Review. Multithreaded support will come in a following patch. * Fix up ConstrintFramework.Reset. Prior to this, we weren't clearing store. In theory, this won't really matter since we re-create inventory on each call to audit, but this would cause weird artifacts if ...
diff --git a/cmd/server/main.go b/cmd/server/main.go index e2f1c06..30deaf1 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -58,7 +58,7 @@ func (s *gcvServer) Audit(ctx context.Context, request *validator.AuditRequest) } func (s *gcvServer) Reset(ctx context.Context, request *validator.ResetRequest) (*v...
3
3
0
[{"id": "G0", "claim": "The comment above the regoReviewRule constant is an incomplete sentence (\"// regoReviewRule is the\") and should be completed.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new Review method should be documented, and ...
null
GoogleCloudPlatform__config-validator__69
GoogleCloudPlatform/config-validator
69
defect
67d2a854dd785a4c63ac777981e3e3f1f4486c19
d4d0bdc0595dcecaee7b81b0256a59eeaf168b94
Add gcp constraint framework target
This creates a constriant framework target for FCV to use for integrating with the opa constraint framework.
diff --git a/go.mod b/go.mod index dc47c3c..43fc972 100644 --- a/go.mod +++ b/go.mod @@ -5,12 +5,17 @@ go 1.12 require ( github.com/OneOfOne/xxhash v1.2.5 // indirect github.com/ghodss/yaml v1.0.0 + github.com/go-logr/zapr v0.1.1 // indirect + github.com/go-openapi/validate v0.19.2 // indirect github.com/gobwas/...
8
8
2
[{"id": "G0", "claim": "The GetName method carries a dangling '// Done' comment that should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Library() is still annotated '// TODO - lib impl' even though the library implementation is do...
null
GoogleCloudPlatform__config-validator__89
GoogleCloudPlatform/config-validator
89
defect
ca5e401bea3e4e86bcdcc75caabd27341295cb46
8f22fe27999a6a193d5f3de9665c9f9524ad6554
generate error when no configuration is loaded
Validator should be fail-safe that if there is a misconfiguration that results in zero configurations loaded, it should generate an error. This should not be confused with the use case where *one* of the directory is empty but some configurations are loaded. This pull request allow that use case.
diff --git a/pkg/gcv/configs/config.go b/pkg/gcv/configs/config.go index 278cfb8..90493f6 100644 --- a/pkg/gcv/configs/config.go +++ b/pkg/gcv/configs/config.go @@ -491,6 +491,10 @@ func NewConfiguration(dirs []string, libDir string) (*Configuration, error) { return nil, err } + if len(unstructuredObjects) == 0 ...
1
1
1
[{"id": "G0", "claim": "The empty check should trigger only on unstructuredObjects, not on regoLib, because the rego library files do nothing on their own (the current condition errors out when only rego library files are loaded).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduc...
null
GoogleCloudPlatform__config-validator__92
GoogleCloudPlatform/config-validator
92
defect
96384b4e8b29af1b1b8987d59e0a5a2df8fa4fbd
bbe89961c8ac803bc58c7ba6e311e7c7104a20d1
Fix up issue with legacy matcher formatting.
Prior matchers would format "organization/*" rather than a standard glob formatting like "organziations/**". This fixes legacy support for "organziation/*" for old-style constraints.
diff --git a/pkg/gcv/configs/config.go b/pkg/gcv/configs/config.go index da528e5..dabc0e0 100644 --- a/pkg/gcv/configs/config.go +++ b/pkg/gcv/configs/config.go @@ -18,6 +18,7 @@ package configs import ( "encoding/json" "fmt" + "regexp" "sort" "strings" @@ -460,8 +461,49 @@ func convertLegacyConstraintTempla...
2
2
2
[{"id": "G0", "claim": "The S1 `starRegex` only matches a star at the end of the ancestry, so intermediate wildcards like `organizations/*/folder/mine` are left unconverted; the reviewer asks whether those should also be matched.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduce...
null
GoogleCloudPlatform__flask-talisman__10
GoogleCloudPlatform/flask-talisman
10
defect
ff56ac6cac759ffe7a28925cdf4042cfd0ad637e
9a42bb0fa5cb386a9f59ed26c87f6e549b44f4fa
Add referrer policy security header
The referrer policy security header tells the browser what information about your website (URL and possibly path) is sent to a linked site. See [this blog/examples](https://scotthelme.co.uk/a-new-security-header-referrer-policy/) for more info. There's also some useful information of the available directives [from M...
diff --git a/flask_talisman/talisman.py b/flask_talisman/talisman.py index c83941b..f3e42f4 100644 --- a/flask_talisman/talisman.py +++ b/flask_talisman/talisman.py @@ -22,6 +22,8 @@ ALLOW_FROM = 'ALLOW-FROM' ONE_YEAR_IN_SECS = 31556926 +DEFAULT_REFERRER_POLICY = 'strict-origin-when-cross-origin' + DEFAULT_CSP_POL...
3
3
3
[{"id": "G0", "claim": "The pull request accidentally removed the docstring entries for the still-existing content_security_policy_report_uri and content_security_policy_report_only options from init_app.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "clai...
null
GoogleCloudPlatform__flask-talisman__18
GoogleCloudPlatform/flask-talisman
18
defect
d9f97215035b6e5e2425243e9e2dc6cb0184a313
b5ab91aa4c1e39fd3195ec7629d57cd656b5a34a
Adds support for a rotating CSP nonce value
Fixes #17
diff --git a/README.rst b/README.rst index 47dcb92..68b0902 100644 --- a/README.rst +++ b/README.rst @@ -91,6 +91,9 @@ Options whether subdomains should also use HSTS. - ``content_security_policy``, default ``default-src: 'self'``, see the `Content Security Policy`_ section. +- ``content_security_policy_nonc...
2
2
0
[{"id": "G0", "claim": "Use parentheses instead of a backslash for the line continuation when assigning content_security_policy_nonce_in.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Rename the vague loop variables k and v to section and conte...
null
GoogleCloudPlatform__flask-talisman__19
GoogleCloudPlatform/flask-talisman
19
defect
638dbe2b18f75fb3302b3ae44d4c484746f0789f
f1d59bdb7ddfd80e3c35d796c10a111534e272c1
Add example for CSP nonce & Jinja template integration
First some more docs & integration for the CSP nonce feature. If that's OK, I will create a release PR later.
diff --git a/.gitignore b/.gitignore index a65d046..9aeaf42 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,7 @@ docs/_build/ # PyBuilder target/ + +# Editor files +*.swp +*.swo diff --git a/README.rst b/README.rst index 68b0902..c0849a0 100644 --- a/README.rst +++ b/README.rst @@ -248,6 +248,33 @@ example CS...
1
1
0
[{"id": "G0", "claim": "In the README Example 6 code block, break the talisman = Talisman(...) call at the opening parenthesis instead of using hanging indents.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
GoogleCloudPlatform__flask-talisman__39
GoogleCloudPlatform/flask-talisman
39
defect
c45a9a5b2671b9667856e281d2726c8bfd0f0fd7
95f4947beaa91ff183d9b9a4e5e7b4f271ad2d9b
add argument to add/remove x-csp header
issue 38 https://github.com/GoogleCloudPlatform/flask-talisman/issues/38
diff --git a/README.rst b/README.rst index f61f2f3..ec4adb4 100644 --- a/README.rst +++ b/README.rst @@ -103,6 +103,7 @@ Options - ``content_security_policy_report_uri``, default ``None``, a string indicating the report URI used for `CSP violation reports <https://developer.mozilla.org/en-US/docs/Web/Security...
2
1
0
[{"id": "G0", "claim": "Rename the new ``support_x_header`` option to ``legacy_content_security_policy_header`` so it fits with the rest of the options and makes it immediately obvious what it does.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "It might...
null
GoogleCloudPlatform__flask-talisman__4
GoogleCloudPlatform/flask-talisman
4
defect
1dac22d3c90078154ae72fa030a2f7a6d9705ff6
5a918711e2be20bb8f16edfff8989b922014f4ff
Rename package from talisman to flask_talisman
- Fixes #3 - I never released a package before.. so please verify which changes had to be `flask_talisman` and which ones `flask-talisman` - Updated the version to `1.0.0` - Updated the URLs to `flask-talisman` in PyPi
diff --git a/README.rst b/README.rst index c8d0d26..ad8de1e 100644 --- a/README.rst +++ b/README.rst @@ -53,13 +53,13 @@ Install via `pip <https://pypi.python.org/pypi/pip>`_: :: - pip install talisman + pip install flask-talisman .. code:: python from flask import Flask - from talisman import...
3
3
2
[{"id": "G0", "claim": "The version in setup.py was bumped to 1.0.0; it should be set to 0.2.0 for now.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The tox.ini --cover-package flag uses the dashed distribution name flask-talisman; it should u...
null
GoogleCloudPlatform__flask-talisman__8
GoogleCloudPlatform/flask-talisman
8
defect
52b4bbbc15e89b7e82d8857948e8f22cf91fec90
2b4ef4980effecc2f75baa0e6b77e69b4a21ff79
Fixes for when request.endpoint is None.
This patch is so that when `request.endpoint is None`: * Don't raise 500 error. * Don't redirect to https. Currently, a request to an endpoint that does not exist will cause an error. I noticed this when I migrated an app engine flexible environment application from `vm: true` to `env: flex` and the health check...
diff --git a/flask_talisman/talisman.py b/flask_talisman/talisman.py index f932987..19c9ef4 100644 --- a/flask_talisman/talisman.py +++ b/flask_talisman/talisman.py @@ -147,8 +147,8 @@ def init_app( def _update_local_options(self): """Updates view-local options with defaults or specified values.""" - ...
1
1
1
[{"id": "G0", "claim": "The view_functions lookup should use a defaultdict(lambda: _sentinel) so that the HTTPS redirect still happens for nonexistent endpoints.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
GoogleCloudPlatform__functions-framework-python__107
GoogleCloudPlatform/functions-framework-python
107
defect
04423e7046bc73bdf82e63da176d3dd6aac88d6b
33762d12b33d151534f2db76156f136533106499
Add backwards-compatible logging for GCF Python 3.7
<!-- Before submitting a pull request: Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project. Head over to https://...
diff --git a/src/functions_framework/__init__.py b/src/functions_framework/__init__.py index 356f7a03..5db5c4e3 100644 --- a/src/functions_framework/__init__.py +++ b/src/functions_framework/__init__.py @@ -65,6 +65,17 @@ def __init__( self.data = data +class _LoggingHandler(object): + """Logging replac...
5
5
3
[{"id": "G0", "claim": "google-cloud-logging needs to be declared as a dependency in setup.py (optionally limited to Python 3.7 with an environment marker) instead of only in tox.ini, which is just the test framework's dependency list.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "int...
null
GoogleCloudPlatform__functions-framework-python__121
GoogleCloudPlatform/functions-framework-python
121
defect
6277270658a9ed08cd99f0f2ce9cbd41d495d5a1
ea5047462b74c788c374664149e857dbefe91b90
fix local development with the Pub/Sub emulator
Currently, deploying a function with --trigger-topic creates a Pub/Sub subscription that delivers events to an internal endpoint that marshals request payloads before forwarding them to a user's function. Unfortunately, this breaks local development with the Pub/Sub emulator as the Functions Frameworks are dependent on...
diff --git a/src/functions_framework/__init__.py b/src/functions_framework/__init__.py index 3bff83f0..9f5cf34e 100644 --- a/src/functions_framework/__init__.py +++ b/src/functions_framework/__init__.py @@ -126,7 +126,7 @@ def view_func(path): function(data, context) else: # This is a...
3
3
2
[{"id": "G0", "claim": "The raw Pub/Sub marshalling should guard against hand-crafted requests whose message lacks messageId, data or attributes (e.g. wrap in try/except for KeyError) and raise an EventConversionException instead.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduc...
null
GoogleCloudPlatform__functions-framework-python__124
GoogleCloudPlatform/functions-framework-python
124
defect
df488223ceb59c38e79429f13bc97aa27e82c840
95ec83d45b45a87afea28b0446ae76126f6ff5ce
convert cloud events to background events
This commit adds logic to convert cloud event request to background events for functions that have the `event` signature type.
diff --git a/.gitignore b/.gitignore index c0305632..e8b2bffb 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ __pycache__/ build/ dist/ .coverage +.vscode/ diff --git a/src/functions_framework/__init__.py b/src/functions_framework/__init__.py index 9f5cf34e..86573491 100644 --- a/src/functions_framework/__i...
3
3
0
[{"id": "G0", "claim": "The function name `is_convertable_cloud_event` should be `is_convertable_cloudevent`, since CloudEvent is stylized as one word and the other conversion function uses `cloudevent`.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "cla...
null
GoogleCloudPlatform__functions-framework-python__131
GoogleCloudPlatform/functions-framework-python
131
defect
60ac588db70a3bf7224f43fae713272cbd649256
314d8f073d3e20379c711871b3601d8ac65c3a33
Update GCF Python 3.7 backwards-compatible logging
Fixes issues in backwards compatibility for GCF Python 3.7.
diff --git a/src/functions_framework/__init__.py b/src/functions_framework/__init__.py index bc19b185..36cde34b 100644 --- a/src/functions_framework/__init__.py +++ b/src/functions_framework/__init__.py @@ -16,6 +16,7 @@ import importlib.util import io import json +import logging import os.path import pathlib imp...
1
1
1
[{"id": "G0", "claim": "A test should be added demonstrating the logging use case this change is designed to fix before it is approved.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
GoogleCloudPlatform__functions-framework-python__139
GoogleCloudPlatform/functions-framework-python
139
defect
c7f66fd5ed9856bdf4e484774742d7c158ab7b43
90a972ccc00d796847b6831aabb13528858aed36
fix: cloudevent conversion conformance tests
This commit updates the legacy event to cloud event conversion logic to: - include the `messageId` and `publishTime` fields in the data payload of Pub/Sub events - include the location in the source field of firebasedatabase events fixes #139
diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index a2611772..32a1523b 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -24,7 +24,7 @@ jobs: go-version: '1.15' - name: Run HTTP conformance tests - uses: GoogleCloudPlatfor...
2
1
0
[{"id": "G0", "claim": "The magic string index in `resource[11:]` is fragile; the reviewer asks what `11` represents and whether it would make more sense to update the `_split_resource` function or the `_CE_SERVICE_TO_RESOURCE_RE` regex instead.", "category": "maintainability", "verdict": "supported", "priority": "P2",...
null
GoogleCloudPlatform__functions-framework-python__160
GoogleCloudPlatform/functions-framework-python
160
defect
455affdd144b90cf9c0a8cb52bdb345492e2c89c
b2f365453d81d9b0f624df22e3058b4c0a160e09
feat: Declarative function signatures for python
Allow users to systematically register their function signature type: ```python import functions_framework @function_framework.cloudevent def hello_cloudevent(cloudevent): print("Hello") @function_framework.http def hello_http(request): print("Hello") ``` User signature type is searched in the ...
diff --git a/.gitignore b/.gitignore index 50f3f15a..8b5379fe 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ build/ dist/ .coverage .vscode/ +.idea/ function_output.json serverlog_stderr.txt serverlog_stdout.txt diff --git a/examples/cloud_run_cloudevents/main.py b/examples/cloud_run_cloudevents/main.py...
10
6
1
[{"id": "G0", "claim": "The pull request should not support declarative `event` (background) function signatures, so the `@functions_framework.event` decorator should be removed (and, per M001, the too-valuable name `event` should not be used for a signature type that may go away).", "category": "design", "verdict": "s...
null
GoogleCloudPlatform__functions-framework-python__195
GoogleCloudPlatform/functions-framework-python
195
defect
9af6591465ce59516c5a3058906c0685a0dcea01
a35374303a74c27187c73daa707bc7fc0451666b
feat: Scale gunicorn server to serve 1000 concurrent requests
Change the gunicorn server setting and set the max threads to 1000
diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 940bdf58..f758893d 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -24,46 +24,64 @@ jobs: go-version: '1.16' - name: Run HTTP conformance tests - uses: GoogleCloudPlatf...
1
1
0
[{"id": "G0", "claim": "Run the new concurrency conformance test only on HTTP functions instead of on both HTTP and CloudEvents, since concurrency is not a cloudevent-vs-http feature.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GoogleCloudPlatform__functions-framework-python__20
GoogleCloudPlatform/functions-framework-python
20
defect
cc9881eeb534fc285757e19a9a5da7bd20d29b10
b2b4993ed1928295ea2c9d65adab704d422b996b
add --host command line argument
Fixes #19
diff --git a/CHANGELOG.md b/CHANGELOG.md index d3bde547..77b3d0ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.1.2] - 2020-02-20 +### Added +- Add support for `--host` flag ([#20]) + ## [1.1.1]...
3
3
0
[{"id": "G0", "claim": "The new --host command line argument should be documented in the README's 'Configure the Functions Framework' section and a line added to the changelog.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The changelog entry sho...
null
GoogleCloudPlatform__functions-framework-python__208
GoogleCloudPlatform/functions-framework-python
208
defect
5daeb4aaf130f2714fe1a0f799b09cb01703d9bd
7febdf2a0cc65914091006a41ab96d846ac32aa2
feat: Support strongly typed functions signature
Add a new signature in functions framework that will support strongly typed objects. This signature will take a strong type T as an input and can return a strong type T, built in types supported by flask or None as an output. Sample declarations: ``` @functions_framework.typed(T1) def my_function(x:T1) -> T2: `...
diff --git a/src/functions_framework/__init__.py b/src/functions_framework/__init__.py index fa638505..248efa4d 100644 --- a/src/functions_framework/__init__.py +++ b/src/functions_framework/__init__.py @@ -13,12 +13,17 @@ # limitations under the License. import functools +import inspect import io import json im...
26
20
3
[{"id": "G0", "claim": "The new files added by this pull request should carry a 2022 copyright header instead of 2021.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The per-function typed-event test files should be merged into one test file, sinc...
null
GoogleCloudPlatform__functions-framework-python__248
GoogleCloudPlatform/functions-framework-python
248
defect
6420b67c3b71c9b45dfc7b701ac16412c1430dc8
13bb93335b7adc3071e1e756a6e57dc7b860bd24
feat: initial typing of the public API
This adds type annotations for the 2 main decorators of the library. Closes: https://github.com/GoogleCloudPlatform/functions-framework-python/issues/190 I'm also carrying over a small stub file for the event-based functions, which would be now available for everybody.
diff --git a/README.md b/README.md index 9dffc60c..e65ddbb8 100644 --- a/README.md +++ b/README.md @@ -59,10 +59,11 @@ functions-framework==3.* Create an `main.py` file with the following contents: ```python +import flask import functions_framework @functions_framework.http -def hello(request): +def hello(reque...
4
3
2
[{"id": "G0", "claim": "The HTTPFunction type alias is verbose and the mypy error shown for an invalid return type is unwieldy; the author asks whether there is a way to make them better.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Remove the zip_safe...
null
GoogleCloudPlatform__functions-framework-python__328
GoogleCloudPlatform/functions-framework-python
328
defect
fff38ae6ecb1054bad676900216663050e6edf10
7a9acbe82788864d150fa5429e60ac27bac396d4
feat: (opt-in): terminate handling of work when the request has already timed out
Overhead-free (or at least very cheap). The “timeout” gunicorn config means drastically different things for sync and non-sync workers: Workers silent for more than this many seconds are killed and restarted. Value is a positive number or 0. Setting it to 0 has the effect of infinite timeouts by disabling ti...
diff --git a/examples/cloud_run_cloud_events/send_cloud_event.py b/examples/cloud_run_cloud_events/send_cloud_event.py index b523c31a..c08b8f93 100644 --- a/examples/cloud_run_cloud_events/send_cloud_event.py +++ b/examples/cloud_run_cloud_events/send_cloud_event.py @@ -13,9 +13,9 @@ # WITHOUT WARRANTIES OR CONDITIONS...
4
4
1
[{"id": "G0", "claim": "The _is_truthy helper should be dropped and the THREADED_TIMEOUT_ENABLED feature flag accepted only as \"true\", since the env var is documented.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The comment in tests/test_fu...
null
GoogleCloudPlatform__functions-framework-python__377
GoogleCloudPlatform/functions-framework-python
377
defect
268acf121015bf2a5592715e4cfe582f9d236ff8
7ee157b3bdc93e2db7dc481ce429da547d766ca7
feat: add execution_id support for async stack
## Summary Adds execution_id support for the async/ASGI stack (Starlette/Uvicorn) to match the existing functionality in the sync/WSGI stack (Flask/Gunicorn). ## Key Changes - **Integrated with aio module**: Execution_id functionality now works with async cloud functions - **Added contextvars support**: Use `cont...
diff --git a/.coveragerc-py37 b/.coveragerc-py37 index fb6dbb6e..b1c98d23 100644 --- a/.coveragerc-py37 +++ b/.coveragerc-py37 @@ -18,4 +18,8 @@ exclude_lines = # Don't complain about async-specific imports and code from functions_framework.aio import from functions_framework._http.asgi import - from ...
5
4
1
[{"id": "G0", "claim": "Remove the added blank line after the HTTPException raise block in the async CloudEvent handler (\"Why added whitespace?\").", "category": "style", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Fix the spelling of \"tracebak\" in the comment about not r...
null