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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sql-machine-learning__sqlflow__2629 | sql-machine-learning/sqlflow | 2,629 | defect | 6b54a1673a70e5a1d28e534b1018ccc85c2d2ff9 | 7df91a63195f07d723d92f22cde7340f10e621e7 | rename sqlflow_submitter to runtime | fixed #2603 | diff --git a/doc/design/ant_xgboost.md b/doc/design/ant_xgboost.md
index 24064b8bd5..ed95a4c49a 100644
--- a/doc/design/ant_xgboost.md
+++ b/doc/design/ant_xgboost.md
@@ -71,7 +71,7 @@ USING sqlflow_models.xgboost_model_table;
As `codegen.go` generating TensorFlow code from sqlflow AST,
we will add `codegen_xgboost.g... | 2 | 2 | 0 | [{"id": "G0", "claim": "If the Ant-XGBoost codegen is obsolete, the doc/design/ant_xgboost.md document should be removed in a future PR.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The module references written as `sqlflow_runtime` (e.g. `s... | null |
sql-machine-learning__sqlflow__2670 | sql-machine-learning/sqlflow | 2,670 | defect | 3c00169f0aa2183455c85b63ec3e888937c471d6 | b43277ead472b8b5fad853cba4ac3b5ee9725671 | [OptFlow Programming]Support combinational optimize cases and remove the code to obtain table data | This PR works for math programming using OptFlow:
- support combinational optimize cases. For example, `variables = "shipment(plants, markets)"`. We create a temporary table with 3 columns: `plants, markets, plants__markets`, where `plants__markets` are the concatenated values of the column `plants` and `markets`.
... | diff --git a/go/codegen/optimize/codegen.go b/go/codegen/optimize/codegen.go
index 4b949eec81..0d137e342d 100644
--- a/go/codegen/optimize/codegen.go
+++ b/go/codegen/optimize/codegen.go
@@ -17,13 +17,11 @@ import (
"bytes"
"encoding/json"
"fmt"
- "reflect"
"sqlflow.org/sqlflow/go/attribute"
"sqlflow.org/sqlf... | 2 | 1 | 0 | [{"id": "G0", "claim": "Supporting word-form comparison tokens like `LE` in the SQL statements is unnecessary; only expressions like `<=` should be supported (the author later agreed only `=` -> `==` conversion is necessary).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id... | null |
sql-machine-learning__sqlflow__2692 | sql-machine-learning/sqlflow | 2,692 | defect | 04df3c416791752b825856e3ec469cac720b26a3 | a87d5160c75f1e0a63683156d66a865fa2a1ded1 | Providing more explicit error message about the lack of OSS auth | Fix #2679 | diff --git a/go/executor/alisa.go b/go/executor/alisa.go
index c5df9d426c..3ee92419cb 100644
--- a/go/executor/alisa.go
+++ b/go/executor/alisa.go
@@ -79,11 +79,11 @@ func (s *alisaExecutor) submitAlisaTask(taskType int, submitCode string, args st
switch taskType {
case AlisaTaskTypePAI:
if e := alisa.ExecWithWr... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new function's name should be changed (e.g. to `diagnostic`/`diagnose`) instead of `guessError`, since its message already gives users the suggestion.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
sql-machine-learning__sqlflow__2784 | sql-machine-learning/sqlflow | 2,784 | defect | 0963268db38c5a03383c54f23d1f83bfa2d9117e | e73bba956a88721551a69aff685b72f545662eea | Generate workflow using runtime | This is a partwork.
TODO:
1. generate code using runtime feature derivation
2. generate Couler program with Python functions as step code.
3. add code generators for tensorflow, pai etc. | diff --git a/go/codegen/experimental/codegen.go b/go/codegen/experimental/codegen.go
new file mode 100644
index 0000000000..edd351262c
--- /dev/null
+++ b/go/codegen/experimental/codegen.go
@@ -0,0 +1,133 @@
+// Copyright 2020 The SQLFlow Authors. All rights reserved.
+// Licensed under the Apache License, Version 2.0 ... | 2 | 2 | 0 | [{"id": "G0", "claim": "The new file go/codegen/experimental/codegen.go sits in a temporary location and will be moved to another directory eventually.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The feature derivation currently done in Go in xgboost.... | null |
sql-machine-learning__sqlflow__2791 | sql-machine-learning/sqlflow | 2,791 | defect | 388172a5f84d44139ef1a37b082b3ff87668cbce | 93f779e9622db46a34e75fd9e63968c5299e0dac | Generate workflow step code using runtime fea der | TODO:
- Add end2end test of running step code
- add Couler code gen
- add workflow test | diff --git a/go/codegen/alps/codegen.go b/go/codegen/alps/codegen.go
index 945fde7bec..27bc47270e 100644
--- a/go/codegen/alps/codegen.go
+++ b/go/codegen/alps/codegen.go
@@ -52,8 +52,8 @@ func Train(trainStmt *ir.TrainStmt, session *pb.Session) (string, error) {
var program bytes.Buffer
var trainTemplate = templat... | 5 | 5 | 1 | [{"id": "G0", "claim": "Fix the indentation of the generated Python imports in the xgbTrainTemplate, which use tab characters instead of spaces.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The generated FieldDesc code hard-codes an upper-cased da... | null |
sql-machine-learning__sqlflow__2865 | sql-machine-learning/sqlflow | 2,865 | defect | eaa247341826fa14946154fc4967dfd19d00757d | d2cd83a9f646034748c1b4d2bdb269bd0906058e | Runtime.pai use python feature column implementation | Can merge this then I'll update prediction/explain/evaluate. | diff --git a/go/cmd/sqlflowserver/e2e_pai_maxcompute_test.go b/go/cmd/sqlflowserver/e2e_pai_maxcompute_test.go
index 38d06e8c47..129c18eb16 100644
--- a/go/cmd/sqlflowserver/e2e_pai_maxcompute_test.go
+++ b/go/cmd/sqlflowserver/e2e_pai_maxcompute_test.go
@@ -511,5 +511,4 @@ func TestEnd2EndMaxComputePAI(t *testing.T) {... | 3 | 2 | 0 | [{"id": "G0", "claim": "The `feature_column_names_map` built in the train entry of python/runtime/pai/tensorflow_submitter/train.py seems to be unused.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Why was TemporaryDirectory's default suffix/pr... | null |
sql-machine-learning__sqlflow__2894 | sql-machine-learning/sqlflow | 2,894 | defect | 598bd4ca9f8338bf51311ec701e7a1b3259f3eec | d763cb211a71e946b06672eaba7d42ee12a7eb17 | Support null values for xgboost | Fix https://github.com/sql-machine-learning/sqlflow/issues/2888 | diff --git a/go/cmd/sqlflowserver/e2e_mysql_test.go b/go/cmd/sqlflowserver/e2e_mysql_test.go
index 015bd2def2..9b2dcdf95f 100644
--- a/go/cmd/sqlflowserver/e2e_mysql_test.go
+++ b/go/cmd/sqlflowserver/e2e_mysql_test.go
@@ -54,6 +54,31 @@ INTO sqlflow_models.custom_loop_model_eval_result;`, caseTrainTable)
}
}
+fun... | 2 | 1 | 1 | [{"id": "G0", "claim": "In read_feature a NULL value is replaced by the float magic number regardless of feature dtype, so int-typed features get a double and np.array (dense vector) features are not handled.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G2", "cl... | null |
sql-machine-learning__sqlflow__2992 | sql-machine-learning/sqlflow | 2,992 | defect | 2cc8404106e1e4e43c4160e7cada9e0ec4036cc4 | 6cf72e2a98d40c5197a118c55e2d38b47c347b1c | fix experimental codegen model zoo test cases | Fix #2978 | diff --git a/go/codegen/experimental/codegen_step.go b/go/codegen/experimental/codegen_step.go
index 846f15f2f8..ca89cdd042 100644
--- a/go/codegen/experimental/codegen_step.go
+++ b/go/codegen/experimental/codegen_step.go
@@ -14,13 +14,14 @@
package experimental
import (
- "encoding/binary"
"fmt"
"net/url"
"... | 2 | 2 | 2 | [{"id": "G0", "claim": "The code should check that the read count of the meta JSON read equals metaLength.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The code should check that the read count of the meta JSON read equals metaLength.", "category"... | null |
sql-machine-learning__sqlflow__3013 | sql-machine-learning/sqlflow | 3,013 | defect | be41f4aa118d58cb2a2e680c761960df883fa2d0 | 423635b4bcc12d8c911ace7c24c8a40c4f1e9349 | Make experimental codegen read model from model zoo | Fix https://github.com/sql-machine-learning/sqlflow/issues/3011 .
Partially fix https://github.com/sql-machine-learning/sqlflow/issues/3005 . | diff --git a/docker/step/Dockerfile b/docker/step/Dockerfile
index 025a7a82fb..7868b4fb26 100644
--- a/docker/step/Dockerfile
+++ b/docker/step/Dockerfile
@@ -57,7 +57,8 @@ RUN bash -c 'pip install --no-cache-dir --prefix=/install \
sklearn2pmml==0.56.0 \
shap==0.30.1 \
PyUtilib==5.8.0 \
- pyomo==5.6.... | 6 | 4 | 0 | [{"id": "G0", "claim": "The new module should live in `runtime/model` as `modelzoo.py` instead of a new `python/runtime/modelzoo` package.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The protobuf generation lines added to scripts/test/prepare.sh shoul... | null |
sql-machine-learning__sqlflow__3098 | sql-machine-learning/sqlflow | 3,098 | defect | c9d48b1bd61e7b369b1ace17219e0db6b1fb1b2b | 5724ca0f6ad4d4c879a446065b3bc5c4543efb3c | passing selected row to the prediction result table | fixed #3090 | diff --git a/go/cmd/sqlflowserver/e2e_common_cases.go b/go/cmd/sqlflowserver/e2e_common_cases.go
index b6ff54158c..1867e1f3f9 100644
--- a/go/cmd/sqlflowserver/e2e_common_cases.go
+++ b/go/cmd/sqlflowserver/e2e_common_cases.go
@@ -1115,3 +1115,25 @@ USING %s;`, caseTrainTable, predictTableName, predWith, caseInto)
}... | 1 | 1 | 1 | [{"id": "G0", "claim": "Zipping pred_dataset with predict_generator() assumes the SELECT result order is deterministic, so the data order of pred_dataset may not always be the same as predict_generator and rows could be mispaired.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduc... | null |
sql-machine-learning__sqlflow__740 | sql-machine-learning/sqlflow | 740 | defect | 36d822c69a195056c754fcb5d466d773226b6e2d | 573b9233fbbb5d0636f0eca730f16b8ec1854571 | support multiple sql statements in one rpc call | Fix https://github.com/sql-machine-learning/sqlflow/issues/695
Design: https://github.com/sql-machine-learning/sqlflow/pull/779 | diff --git a/cmd/sqlflowserver/main_test.go b/cmd/sqlflowserver/main_test.go
index 4bff199239..69f0d164ea 100644
--- a/cmd/sqlflowserver/main_test.go
+++ b/cmd/sqlflowserver/main_test.go
@@ -516,7 +516,6 @@ USING sqlflow_models.my_dnn_model;`, caseDB, caseTestTable, caseDB, casePredictT
}
// call ParseRow only to w... | 4 | 1 | 1 | [{"id": "G0", "claim": "Splitting the request's SQL statements by ';' cannot handle semicolons inside string literals (e.g. \"SELECT * from mytable where col <> ';';\") and a more accurate splitting such as the lexer-based one should be provided, e.g. by exposing the sql package lexer as SplitSQLStatements or by splitt... | null |
sql-machine-learning__sqlflow__789 | sql-machine-learning/sqlflow | 789 | defect | 57b084d1abadf918bc0980e506d1831cc3ee388c | b0e78d9d29a2c3c9db3741f4782f0f612ae88949 | Xgboost predict | part of work: https://github.com/sql-machine-learning/sqlflow/issues/749 | diff --git a/sql/codegen_xgboost.go b/sql/codegen_xgboost.go
index 9d6f6b95f1..e9e964bbb4 100644
--- a/sql/codegen_xgboost.go
+++ b/sql/codegen_xgboost.go
@@ -79,7 +79,7 @@ func resolveParamsCfg(attrs map[string]*attribute) (map[string]interface{}, erro
func resolveObjective(pr *extendedSelect) (string, error) {
est... | 1 | 1 | 1 | [{"id": "G0", "claim": "A unit test should also be added in `executor_test` to exercise the predict SQL.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
sqlalchemy__alembic__1310 | sqlalchemy/alembic | 1,310 | defect | d10b9d946aaf55226fef9e26d989d63f3e9a2bda | 92ccf0becffffd11fee3e535b6637a69bff623d6 | Spelling fixes | Fixes misspellings identified by the [check-spelling action](https://github.com/marketplace/actions/check-spelling).
<!-- Provide a general summary of your proposed changes in the Title field above -->
### Description
<!-- Describe your changes in detail -->
The misspellings have been reported at https://github... | diff --git a/README.rst b/README.rst
index 59c83715..478a7ba0 100644
--- a/README.rst
+++ b/README.rst
@@ -65,7 +65,7 @@ The goals of Alembic are:
* Provide a library of ALTER constructs that can be used by any SQLAlchemy
application. The DDL constructs build upon SQLAlchemy's own DDLElement base
and can be used... | 3 | 3 | 1 | [{"id": "G0", "claim": "The ddl_not_contains assertion in test_drop_fk does not test what the test intends and should read \"CONSTRAINT ufk\" rather than \"CONSTRAINT fk1\".", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The docs read better with the hy... | null |
sqlalchemy__sqlalchemy__11555 | sqlalchemy/sqlalchemy | 11,555 | defect | 83b0690f88f46c0c8c04f8f24b5a95f426eba12b | 6127609e80462a1f6a2e8c3cae76a00fb3ae59b2 | Added valid types to server_onupdate | Fixes: #11546
### Description
* Added `str`, `TextClause`, `ColumnElement[Any]` as valid types for `server_onupdate` argument in `Column()` and `mapped_column()`. Before it was only `FetchedValue`.
* Expanded mypy tests for `Column()`
* Created new mypy test file specifically for testing `mapped_column` kwargs
... | diff --git a/lib/sqlalchemy/orm/_orm_constructors.py b/lib/sqlalchemy/orm/_orm_constructors.py
index 7d215059af0..c800358456c 100644
--- a/lib/sqlalchemy/orm/_orm_constructors.py
+++ b/lib/sqlalchemy/orm/_orm_constructors.py
@@ -71,7 +71,7 @@
from ..sql._typing import _TypeEngineArgument
from ..sql.elements i... | 2 | 2 | 0 | [{"id": "G0", "claim": "The new _ServerOnUpdateArgument alias duplicates the existing union and could re-use _ServerDefaultArgument (possibly renamed) instead of defining a second alias.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new mapped_colum... | null |
sqlancer__sqlancer__125 | sqlancer/sqlancer | 125 | defect | ad3c82a0e139e83f1ac7d7fa436c800985492e2e | 5a13e8da5de6aa61be3fdecf06a3713132580173 | Rewrite ClickHouseTableGenerator | A better way to do #124
Closes #121 | diff --git a/src/sqlancer/clickhouse/ClickHouseErrors.java b/src/sqlancer/clickhouse/ClickHouseErrors.java
index 20665b139c..4aeafd6d5e 100644
--- a/src/sqlancer/clickhouse/ClickHouseErrors.java
+++ b/src/sqlancer/clickhouse/ClickHouseErrors.java
@@ -34,6 +34,7 @@ public static void addExpectedExpressionErrors(Set<Stri... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new `Boolean isAlias`/`Boolean isMaterialized` parameters and locals should be primitive `boolean` since the boxed types do not seem to be required.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
sqlc-dev__sqlc__1794 | sqlc-dev/sqlc | 1,794 | defect | 2a5a5c6855631210fc2239a1455c8e7449dd79d0 | 74882733cbb889aa562d27d4ff0768a6900d13ee | fix: prevent batch infinite loop with arg length | Because the batch queries are only being closed when checking for 2 errors (batch results closed or no result), other errors cause the generated code to infinite loop. This changes from a for loop that only breaks on checking the errors to a for loop that also considers the the total number of params passed in.
Some... | diff --git a/examples/batch/postgresql/batch.go b/examples/batch/postgresql/batch.go
index e07ad01c34..73002d7390 100644
--- a/examples/batch/postgresql/batch.go
+++ b/examples/batch/postgresql/batch.go
@@ -20,6 +20,7 @@ WHERE year = $1
type BooksByYearBatchResults struct {
br pgx.BatchResults
ind int
+ tot int
... | 2 | 2 | 2 | [{"id": "G0", "claim": "TestBatchBooks fails with 'error updating book 2: conn busy', and it is not yet clear whether this is a symptom of something in the pull request that needs fixing.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The generated ... | null |
sqlc-dev__sqlc__2669 | sqlc-dev/sqlc | 2,669 | defect | 80f6ec3cf0f87a422e9d10a8816aae4155758b35 | 12e7cd943dbbeeec1210374278e283df59a0004b | feat(codegen): Allow plugins to access environment variables | Allow plugins, both process-based and WASM-based, to read environment variables from the host, configured via a per-variable allowlist. Plugins can not declare the environment variables they have access to outside of the sqlc.yaml configuration file.
```
version: '2'
plugins:
- name: py
env:
- PATH
wasm:... | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a163dd023a..e11ffbd03b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -55,9 +55,12 @@ jobs:
with:
go-version: '1.21.0'
- - name: gotestsum
+ - name: install gotestsum
run: go install gotest.too... | 1 | 1 | 1 | [{"id": "G0", "claim": "The SQLC_VERSION environment variable that sqlc always adds for plugins should be documented somewhere (M003 says the `env` entry in config.md is the wrong place, M004 points at the new Environment variables section in plugins.md).", "category": "documentation", "verdict": "supported", "priority... | null |
sqlc-dev__sqlc__2744 | sqlc-dev/sqlc | 2,744 | defect | 79cb8b5f16785785594991f9d5129a56b128d099 | 5bbcefbba82c8270c8d38871c17dbd141a2e2161 | test(endtoend): Verify all schemas in endtoend | For each test in the endtoend package, use the new sqlc managed databases to verify that the schemas are valid. In the future, we'll attempt to prepare all the queries as well. | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3706e74b61..6c50d7b07b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -76,6 +76,8 @@ jobs:
MYSQL_HOST: localhost
MYSQL_PORT: ${{ job.services.mysql.ports['3306'] }}
MYSQL_ROOT_PASSWORD: mysecretpas... | 1 | 1 | 1 | [{"id": "G0", "claim": "The client should use a default tls.Config{} instead of setting InsecureSkipVerify: true in its TLS transport credentials.", "category": "security", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
sqlc-dev__sqlc__2751 | sqlc-dev/sqlc | 2,751 | defect | 13c239b803a67b81676a336eafca9978a94b589c | 059a1f38db849649fc3e9b8e35639cd591d39245 | feat(vet): Run rules against a managed database | The newest `vet` feature is running rules against databases hosted by us. You don't need to have PostgreSQL running locally, we'll take care of everything for you. This feature will be included in the next release as a private beta. We're still working out kinks in our infrastructure.
```yaml
version: '2'
cloud:
... | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6fe3470972..48948e63c2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -30,16 +30,6 @@ jobs:
runs-on: ubuntu-latest
services:
- postgres:
- image: "postgres:15"
- env:
- POSTGRES_DB: po... | 2 | 2 | 2 | [{"id": "G0", "claim": "Remove the temporary t.Skip(\"local\") added to TestExamplesVet before merging, so the vet end-to-end tests actually run for the MySQL examples.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new managed field on the database... | null |
sqlc-dev__sqlc__281 | sqlc-dev/sqlc | 281 | defect | 046cb81fac22e52635614f6abbb7b2546942692c | fb6de34c25d2d6a9b097791bcf87dc0577808571 | mysql type overrides | Fixes #273 .
This implements package-level and global type overrides for `mysql` usage.
# Implementation notes
I adjusted a few data structures to ease the passing of package settings and database schema throughout the parsing and generation process.
The primary new structures are shown below.
```go
type... | diff --git a/README.md b/README.md
index 3fb3b60916..a6d4347a1e 100644
--- a/README.md
+++ b/README.md
@@ -331,14 +331,14 @@ instead.
"overrides": [
{
"go_type": "github.com/gofrs/uuid.UUID",
- "postgres_type": "uuid"
+ "db_type": "uuid"
}
]
}
```
Each override docu... | 4 | 3 | 2 | [{"id": "G0", "claim": "Renaming `postgres_type` to `db_type` is backwards incompatible and will break existing sqlc users; keep `postgres_type` working as long as `db_type` is unset, and add an optional `engine` field to global overrides that must be set when two different database engines are in use.", "category": "d... | null |
sqlc-dev__sqlc__2828 | sqlc-dev/sqlc | 2,828 | defect | 270fcc52d8b473991ce06b5147d5f6331cf10ec3 | 92543865d3f22f003d9971cf1447fa5017fc8100 | feat(generate): support yml extension | Update `generate.go` to support the `.yml` extension, and also update the documentation files to explicitly indicate the option of using this extension. This is purely a quality of life update. | diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml
index 8fb024f174..4ded0ee603 100644
--- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml
+++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml
@@ -51,7 +51,7 @@ body:
id: config
attributes:
label: Configuration
- description: ... | 1 | 1 | 1 | [{"id": "G0", "claim": "The both-configs-present condition should treat yaml and yml as alternatives, i.e. use (!yamlMissing || !ymlMissing) && !jsonMissing, since with sqlc.yml and sqlc.json present and no sqlc.yaml the duplicate-config error would not be raised.", "category": "correctness", "verdict": "supported", "p... | null |
sqlc-dev__sqlc__2898 | sqlc-dev/sqlc | 2,898 | defect | 0d32dbeb2d8fcd81b427a575dd2fd4283e19b840 | 472c9b375a84577ff699f1f88eb445a50a9bad88 | feat(debug): Add databases=managed debug option | - Remove the --no-database flag
- Refactor the shfmt package | diff --git a/internal/cmd/cmd.go b/internal/cmd/cmd.go
index 8d7a64c8dd..9a6584b522 100644
--- a/internal/cmd/cmd.go
+++ b/internal/cmd/cmd.go
@@ -39,7 +39,6 @@ func Do(args []string, stdin io.Reader, stdout io.Writer, stderr io.Writer) int
rootCmd.PersistentFlags().BoolP("experimental", "x", false, "DEPRECATED: enab... | 3 | 2 | 0 | [{"id": "G0", "claim": "The error message in Analyze should say the connections were disabled via SQLCDEBUG=databases=managed instead of the vaguer 'via command line flag'.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The error message in checkSQL... | null |
sqlc-dev__sqlc__3042 | sqlc-dev/sqlc | 3,042 | defect | eb8d97ff02fe03c9f68fe0e42c1ec3d4d99a4bea | 2878527f82036821c020f5f6c7238c483d3b463d | feat(plugins): Use wazero instead of wasmtime | After merging #3027 and #3040, wasmtime is our only cgo dependency left. This change replaces with wazero, a pure-Go WASM runtime. I've played around with it locally and everything appears to work, but I'm going to need to understand how the caching works before this is merged. | diff --git a/go.mod b/go.mod
index 2ac600c4a7..5f5eb30a62 100644
--- a/go.mod
+++ b/go.mod
@@ -4,7 +4,6 @@ go 1.21
require (
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230321174746-8dcc6526cfb1
- github.com/bytecodealliance/wasmtime-go/v14 v14.0.0
github.com/cubicdaiya/gonp v1.0.4
github.com/davecgh/... | 5 | 5 | 2 | [{"id": "G0", "claim": "The ignored error from wasi_snapshot_preview1.MustInstantiate should be returned instead, e.g. by calling Instantiate and handling the error (the TODO: Handle error).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Module comp... | null |
sqldef__sqldef__126 | sqldef/sqldef | 126 | defect | 93f070289a4b6e41566920133fc9fffd5b8d1909 | 7b796155a0edd5f184cbbbd8772d1fc38614a3d4 | mssqldef: support index | This change supports the following features.
- ADD INDEX
- DROP INDEX | diff --git a/cmd/mssqldef/mssqldef_test.go b/cmd/mssqldef/mssqldef_test.go
index 764cfadd5..c2a1bac2a 100644
--- a/cmd/mssqldef/mssqldef_test.go
+++ b/cmd/mssqldef/mssqldef_test.go
@@ -455,6 +455,100 @@ func TestMssqldefCreateTablePrimaryKeyWithIndexOption(t *testing.T) {
assertApplyOutput(t, createTable, nothingModi... | 2 | 2 | 2 | [{"id": "G0", "claim": "The new areSameIndexOptions check should not be excluded from areSameIndexes and gated behind the mssql-only branch in generateDDLsForCreateTable; areSameIndexOptions should be removed so index-option comparison is not split from the regular index comparison.", "category": "design", "verdict": "... | null |
sqldef__sqldef__195 | sqldef/sqldef | 195 | defect | f262aed4c6d3b58629d024f32697c8caecbae595 | 2e22d46970abb1e62ca8cc348fa101d487b2982f | Add `--before-apply` to psqldef | Closes #192
This PR adds `--before-apply` option to psqldef as discussed in #192.
### Screenshots

 (string, error) {
return strings.Join(ddls, "\n\n"), nil
}
-func RunDDLs(d Database, ddls []string, skipDrop bool) error {
+func... | 1 | 1 | 1 | [{"id": "G0", "claim": "Splitting the --before-apply value on \";\" could wrongly split an SQL statement containing a semicolon inside a quoted literal such as `... xxx = \";\";`, so the value should be executed as one string without splitting.", "category": "correctness", "verdict": "supported", "priority": "P1", "sco... | null |
sqldef__sqldef__399 | sqldef/sqldef | 399 | defect | ff11604af64553254dd8c7b98059ae4b603d6378 | f3fe04de2162ee74e16d957e9a1ab42ebad488bd | change option skip drop to enable drop | https://github.com/sqldef/sqldef/discussions/678
It changed option that skip-drop to enable-drop.
Only tables will be dropped.
| diff --git a/README.md b/README.md
index 6de829628..8b69d9660 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ Application Options:
--file=sql_file Read schema SQL from the file, rather than stdin (default: -)
--dry-run Don't run DDLs but just show them
--e... | 1 | 1 | 1 | [{"id": "G0", "claim": "Rename the new `--enable-drop` flag to `--enable-drop-table` because the actual behavior is hard to guess from `--enable-drop`, update the README description to explain that it skips only table drops, and fix the `Ebale` typo.", "category": "design", "verdict": "supported", "priority": "P1", "sc... | null |
sqldef__sqldef__44 | sqldef/sqldef | 44 | defect | 94d9a4f6bcc71a231d5f4520c9640178e670b6eb | c5ac551e50b31a037f30d04648326d80349db13d | [Proposal] Add --skip-drop option | issue: https://github.com/k0kubun/sqldef/issues/43
I implemented the `--skip-drop` option as one way to avoid destructive changes.
Please consider it. | diff --git a/adapter/database.go b/adapter/database.go
index 58448a746..79ef053ae 100644
--- a/adapter/database.go
+++ b/adapter/database.go
@@ -42,13 +42,17 @@ func DumpDDLs(d Database) (string, error) {
return strings.Join(ddls, ";\n\n"), nil
}
-func RunDDLs(d Database, ddls []string) error {
+func RunDDLs(d Dat... | 3 | 3 | 1 | [{"id": "G0", "claim": "The flag should be named `--skip-drop` instead of `--safety`, which is less descriptive of what it does.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The line printed when a DDL is skipped should be prefixed with `--` so it is a... | null |
sqldef__sqldef__499 | sqldef/sqldef | 499 | defect | e0d8692742b9f27b908fce8c92a5e826d3af66c6 | fc22aa3a184a7c5d6f5b018f8a5ae1095bb19bc7 | [psqldef] Add support for dropping materialized view | ## ISSUE
There was a bug that materialized view could not be dropped.
### exmple
```
$ psqldef -U postgres postgres < schema.sql --export
CREATE TABLE "public"."users" (
"id" serial NOT NULL,
"name" character varying(100) NOT NULL,
PRIMARY KEY ("id")
);
CREATE MATERIALIZED VIEW publ... | diff --git a/cmd/psqldef/psqldef_test.go b/cmd/psqldef/psqldef_test.go
index 52e6e8531..53d6eab78 100644
--- a/cmd/psqldef/psqldef_test.go
+++ b/cmd/psqldef/psqldef_test.go
@@ -590,6 +590,9 @@ func TestPsqldefCreateMaterializedView(t *testing.T) {
assertApplyOutput(t, createUsers+createPosts+createMaterializedView,... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new drop-materialized-view test should be added to tests.yml instead of the Go-based psqldef_test.go (and TestPsqldefCreateMaterializedView migrated to tests.yml if possible), since the project is migrating to YAML-based tests.", "category": "testing", "verdict": "supported", "priority": "P2... | null |
sqldef__sqldef__556 | sqldef/sqldef | 556 | defect | cff139188b789041f70f4178498b97417bebcb46 | 5b8b2567c2f36d4e5e251c2a445d7aa99cd1bab5 | Add dump_concurrency option into config file | Hi, I noticed that `psqldef --export` (`psqldef`) takes about 2 minutes to run on my setup. The database is located in a distant region from my PC, and it contains 40 tables. This pull request introduces a new option that significantly reduces the time required for the database dump process.
---
This new ~~comman... | diff --git a/cmd/mysqldef/mysqldef.go b/cmd/mysqldef/mysqldef.go
index b7b9ef602..1bcefe23f 100644
--- a/cmd/mysqldef/mysqldef.go
+++ b/cmd/mysqldef/mysqldef.go
@@ -136,6 +136,7 @@ func parseOptions(args []string) (database.Config, *sqldef.Options) {
SkipView: opts.SkipView,
SslMode: ... | 4 | 3 | 2 | [{"id": "G0", "claim": "Asks that the new --dump-concurrency CLI option be moved into a `dump_concurrency` field of the --config file instead, since newer options should live in the config unless the original mysql/psql/mssql/sqlite3 CLIs expose them too.", "category": "design", "verdict": "supported", "priority": "P1"... | null |
sqldef__sqldef__682 | sqldef/sqldef | 682 | defect | 0ef7c52e6810d1878265466c8619f5170de48b78 | c32741fa09e5c56c8b4a2f6001c25fddbf76135a | feat/extend enable-drop-table to enable-drop option which block all drop ddl | Discussion: https://github.com/sqldef/sqldef/discussions/677
To extend the `enable-drop-table` to `enable-drop` option.
Skip the DDL contain if `enableDrop` is true:
1. DROP TABLE
2. DROP SCHEMA
3. DROP ROLE / USER
4. DROP FUNCTION / PROCEDURE
5. DROP TRIGGER
Currently also include less dangerous DDLs:
... | diff --git a/cmd/mssqldef/mssqldef.go b/cmd/mssqldef/mssqldef.go
index 943a3703f..13655c5a9 100644
--- a/cmd/mssqldef/mssqldef.go
+++ b/cmd/mssqldef/mssqldef.go
@@ -22,17 +22,17 @@ var version string
// TODO: Support `sqldef schema.sql -opt val...`
func parseOptions(args []string) (database.Config, *sqldef.Options) {... | 1 | 1 | 1 | [{"id": "G0", "claim": "The new DDL skip condition contains a typo, `\"DROP) SCHEMA\"`, which should be `\"DROP SCHEMA\"`.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
sqlfluff__sqlfluff__5349 | sqlfluff/sqlfluff | 5,349 | defect | 65328e6b701f46ebb25b758c10b7572111f130ab | b56676a906ac46fe7d1b46dcef61958fd8b7af77 | Add a public API for nesting config strings. | This PR resolves #5207. This mostly uses existing machinery to create nested configs, but exposes it in an easier way and includes an example in the API examples folder. Eventually we might want to deprecate `from_string` and only allow `from_strings`, but that turns this into a more breaking release than it needs to b... | diff --git a/examples/05_simple_api_config.py b/examples/05_simple_api_config.py
index 1f52f9e601..a8dfe885d6 100644
--- a/examples/05_simple_api_config.py
+++ b/examples/05_simple_api_config.py
@@ -19,9 +19,17 @@
config = FluffConfig(configs={"core": {"dialect": "bigquery"}})
# 3b. FluffConfig objects can be created... | 1 | 1 | 0 | [{"id": "G0", "claim": "The classmethod return annotations in config.py could use plain `FluffConfig` instead of the string literal `\"FluffConfig\"`, perhaps via `from __future__ import annotations`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
sqlfluff__sqlfluff__5543 | sqlfluff/sqlfluff | 5,543 | defect | 8b61b2d4de7759684582fabc41c73d7dd451d658 | a6aa539b67d085df82273a18bdf8a37279c6555f | Improve support for Jinja templater plugins with custom tags | This would resolve #4624 by providing an easy way for plugins to provide templaters that have custom Jinja tags/extensions loaded in their environments. The biggest problem is that JinjaAnalyzer has a lot of hard-coded tag names in it. This commit would allow a plugin author to more easily support custom tags:
1. ... | diff --git a/src/sqlfluff/core/templaters/jinja.py b/src/sqlfluff/core/templaters/jinja.py
index 2e54e96c60..8c3d5600ac 100644
--- a/src/sqlfluff/core/templaters/jinja.py
+++ b/src/sqlfluff/core/templaters/jinja.py
@@ -375,6 +375,16 @@ def _get_macros_path(self, config: FluffConfig) -> Optional[List[str]]:
... | 1 | 1 | 0 | [{"id": "G0", "claim": "Fix the typo in the comment: \"åctually\" should be \"actually\" (as proposed in the attached suggestion block).", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
sqlfluff__sqlfluff__5653 | sqlfluff/sqlfluff | 5,653 | defect | ac42cd09f15bf67acec24ca78e8b8b806f007e14 | 726a0ad814b78cd457649a5e46716c71b253bac8 | Complete the memory overhead work on cli fix | This resolves #5588 .
Enabling the `fix` cli command to use the serialised violation objects rather than the native classes took a bit of coaxing. I think this achieves the end that we want. It required a fair bit of refactoring of several methods, including pulling some mutation logic out of the formatter!
There... | diff --git a/docs/source/releasenotes.rst b/docs/source/releasenotes.rst
index 1a930c9d34..84e3888f9b 100644
--- a/docs/source/releasenotes.rst
+++ b/docs/source/releasenotes.rst
@@ -27,6 +27,12 @@ This release makes a couple of potentially breaking changes:
renamed to :code:`start_line_pos` and :code:`start_line_no... | 1 | 1 | 0 | [{"id": "G0", "claim": "The formatter parameter of _handle_unparsable in src/sqlfluff/cli/commands.py should have a type annotation.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
sqlfluff__sqlfluff__5814 | sqlfluff/sqlfluff | 5,814 | defect | 3844bbc1ca00959dfe81bbf0d67edba376b46072 | 5a9149ff34574b1a4604eb88d7addf61967a3233 | Fix Jinja variant location correction | This fixes #5803 . It actually corrects something from #5339, which was originally taken from #5202.
The code to correct the source slices of variant `TemplatedFileSlices` wasn't working as expected. This PR takes a totally different approach to that correction which I think is more robust.
Rather than trying to ... | diff --git a/src/sqlfluff/core/templaters/jinja.py b/src/sqlfluff/core/templaters/jinja.py
index 9dd144b25b..3beb1e8cc0 100644
--- a/src/sqlfluff/core/templaters/jinja.py
+++ b/src/sqlfluff/core/templaters/jinja.py
@@ -745,7 +745,7 @@ def _handle_unreached_code(
max_variants_generated = 10
max_varia... | 3 | 2 | 0 | [{"id": "G0", "claim": "A comment should be added explaining the purpose of the sorting and what is being sorted on.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The newly added slice-adjustment code should be moved into a new function for rea... | null |
sqlfluff__sqlfluff__5872 | sqlfluff/sqlfluff | 5,872 | defect | b01895aa73ce6927eef418db1d2a32248160e8cb | 1959cd326107b3919a82f14bdea16cd786071e62 | Support variables with dot in python templater | <!--Thanks for adding this feature!-->
<!--Please give the Pull Request a meaningful title for the release notes-->
### Brief summary of the change made
<!--Please include `fixes #XXXX` to automatically close any corresponding issue when the pull request is merged. Alternatively if not fully closed you can say `... | diff --git a/docs/source/configuration.rst b/docs/source/configuration.rst
index 238a6e21f6..02ae73879c 100644
--- a/docs/source/configuration.rst
+++ b/docs/source/configuration.rst
@@ -993,6 +993,34 @@ If passed the following *.sql* file:
SELECT * FROM my_table
+Complex Python Variable Templating
+""""""""""... | 4 | 3 | 1 | [{"id": "G0", "claim": "The docs example should show that the template becomes `SELECT * FROM {sqlfluff[\"foo.bar\"]}`, making explicit that the key includes the dot.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The word 'temporarily' in the doc... | null |
sqlfluff__sqlfluff__5892 | sqlfluff/sqlfluff | 5,892 | defect | dd04c83c9e9ae20eb28a635fc0503f2dc002ab56 | d6f6c7800cf33aed7aa708f71f3200ebdfb68b57 | dbt Templater Plugin: dbt 1.8 support | <!--Thanks for adding this feature!-->
<!--Please give the Pull Request a meaningful title for the release notes-->
### Brief summary of the change made
<!--Please include `fixes #XXXX` to automatically close any corresponding issue when the pull request is merged. Alternatively if not fully closed you can say `... | diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml
index d97989e183..33594ada5d 100644
--- a/.github/workflows/ci-tests.yml
+++ b/.github/workflows/ci-tests.yml
@@ -72,7 +72,7 @@ jobs:
name: dbt Plugin Tests
strategy:
matrix:
- dbt-version: [ dbt110, dbt120, dbt130, dbt... | 2 | 1 | 1 | [{"id": "G0", "claim": "Passing an empty dict to set_invocation_context in dbt_config leaves dbt without access to environment variables such as db connection envvars at runtime; it should pass os.environ or offer an option to do so.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "intro... | null |
sqlfluff__sqlfluff__6213 | sqlfluff/sqlfluff | 6,213 | defect | eb77eb1a5d825ecca9e54e03d659c6a12804fcc9 | a37d2cffe75e19e482694041881e4ced6431e8dd | New Rule LT14: Keyword line positioning | <!--Thanks for adding this feature!-->
<!--Please give the Pull Request a meaningful title for the release notes-->
### Brief summary of the change made
<!--Please include `fixes #XXXX` to automatically close any corresponding issue when the pull request is merged. Alternatively if not fully closed you can say `... | diff --git a/docs/source/configuration/layout.rst b/docs/source/configuration/layout.rst
index 52d186b15f..5100197266 100644
--- a/docs/source/configuration/layout.rst
+++ b/docs/source/configuration/layout.rst
@@ -763,6 +763,56 @@ available:
UNION
SELECT b;
+* **Keyword Line Position**: set using... | 7 | 6 | 4 | [{"id": "G0", "claim": "The rule should not need so much custom code: the existing reflow machinery (e.g. what lint_line_length and _fix_long_line_with_fractional_targets do) should be extracted/reused so line breaks are forced even when the line is not too long.", "category": "design", "verdict": "uncertain", "priorit... | null |
sqlfluff__sqlfluff__6254 | sqlfluff/sqlfluff | 6,254 | defect | 6dd6433a51e87d2ca421260f3c2b3ea4ef5dac01 | 9f640514f7aadf0218f25219c60cffbdb2424849 | Allow arbitrary attributes & methods for `ThisEmulator` | ### Brief summary of the change made
- Allows to use `{{ this.identifier }}` in DBT (but with the Jinja templater).
- Also allows any other future attributes or methods.
- Rename `ThisEmulator` to `RelationEmulator`.
- Also return a RelationEmulator for `ref()` and `source()` as well.
- Fixes #6253
### Are ther... | diff --git a/src/sqlfluff/core/templaters/jinja.py b/src/sqlfluff/core/templaters/jinja.py
index 4ea3837828..bcc5f4ef96 100644
--- a/src/sqlfluff/core/templaters/jinja.py
+++ b/src/sqlfluff/core/templaters/jinja.py
@@ -17,6 +17,7 @@
Set,
Tuple,
cast,
+ Union,
)
import jinja2.nodes
@@ -297,21 +298,... | 2 | 2 | 1 | [{"id": "G2", "claim": "The `# pragma: no cover` comments on the RelationEmulator methods should be removed because coverage should be obtained on those methods.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G3", "claim": "Test cases for the new RelationEmulator are ... | null |
sqlfluff__sqlfluff__6827 | sqlfluff/sqlfluff | 6,827 | defect | d271c3a95f0afa1ff867ad3cb4ce34230ea4a001 | 14d0696e622ec068d3b1c94f73ebee3f29fa51bb | Refactor Bracketed | <!--Thanks for adding this feature!-->
<!--Please give the Pull Request a meaningful title for the release notes-->
### Brief summary of the change made
This PR aims to remove recursion from the Bracketed grammar. It matches start bracket, contents, then end bracket, without recursing.
### Are there any other... | diff --git a/src/sqlfluff/core/parser/grammar/sequence.py b/src/sqlfluff/core/parser/grammar/sequence.py
index ddcd3ac118..4faa2ff534 100644
--- a/src/sqlfluff/core/parser/grammar/sequence.py
+++ b/src/sqlfluff/core/parser/grammar/sequence.py
@@ -6,6 +6,7 @@
from os import getenv
from typing import Optional, Union, c... | 3 | 1 | 0 | [{"id": "G0", "claim": "The docstring line ' or seeking ahead.' has one extra leading space of indentation.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The gap handling looks inconsistent — a gap match is added at the end of the content but n... | null |
sqlfluff__sqlfluff__6848 | sqlfluff/sqlfluff | 6,848 | defect | ce199b0c208b50ed64b01c726dfed82f8f3b1d91 | 00a7381136578b55c5264eb544bb0a51c5efd55d | converted large_file_skip_byte_limit value to integer before comparison, fixes Issue #6847 | ### In the linter, converted the value for large_file_skip_byte_limit to an integer to prevent the error in the comparison
This should fix Issue #6847 with no side effects.
### Pull Request checklist
- [x] Please confirm you have completed any of the necessary steps below.
- Included test cases to demonstra... | diff --git a/src/sqlfluff/core/linter/linter.py b/src/sqlfluff/core/linter/linter.py
index d60ae7b0ee..e1ac16034d 100644
--- a/src/sqlfluff/core/linter/linter.py
+++ b/src/sqlfluff/core/linter/linter.py
@@ -126,7 +126,7 @@ def load_raw_file_and_config(
config_encoding: str = file_config.get("encoding", default... | 2 | 2 | 2 | [{"id": "G0", "claim": "The unconditional int() conversion of large_file_skip_byte_limit raises an unhelpful error (e.g. int(None)) when the value is unset, so the conversion should be guarded and a descriptive error message added for when the conversion fails.", "category": "correctness", "verdict": "supported", "prio... | null |
sqlfluff__sqlfluff__6852 | sqlfluff/sqlfluff | 6,852 | defect | ce199b0c208b50ed64b01c726dfed82f8f3b1d91 | 81657f34d3ba6a110595aa4bacd6b4a4cbed2c7a | dbup style variables into placeholder templater | ### Brief summary of the change made
fixes #6851
### Are there any other side effects of this change that we should be aware of?
not aware of any
### Pull Request checklist
- [x] Please confirm you have completed any of the necessary steps below.
- Included test cases to demonstrate any code changes, which ... | diff --git a/docs/source/configuration/templating/placeholder.rst b/docs/source/configuration/templating/placeholder.rst
index 3dcc9389a4..a060dba3d5 100644
--- a/docs/source/configuration/templating/placeholder.rst
+++ b/docs/source/configuration/templating/placeholder.rst
@@ -50,6 +50,9 @@ A few common styles are sup... | 3 | 3 | 2 | [{"id": "G0", "claim": "The new comment should read `# e.g. WHERE bla = $name$ (DbUp compatible)` instead of showing the `$name or ${name}` examples of the `dollar` style.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `dollar_surround` regex ... | null |
sqlfluff__sqlfluff__6976 | sqlfluff/sqlfluff | 6,976 | defect | 6afa0e4d32c8df42a0196145c7abad49b4b111d8 | 57a5586d282acd9314963a75aa358075c4a5f787 | CLI: Add support for the `NO_COLOR` environment variable | <!--Thanks for adding this feature!-->
<!--Please give the Pull Request a meaningful title for the release notes-->
### Brief summary of the change made
<!--Please include `fixes #XXXX` to automatically close any corresponding issue when the pull request is merged. Alternatively if not fully closed you can say `... | diff --git a/src/sqlfluff/cli/formatters.py b/src/sqlfluff/cli/formatters.py
index 4f980e85c1..c30dc7aa9c 100644
--- a/src/sqlfluff/cli/formatters.py
+++ b/src/sqlfluff/cli/formatters.py
@@ -1,5 +1,6 @@
"""Defines the formatters for the CLI."""
+import os
import sys
from io import StringIO
from typing import Opti... | 1 | 1 | 1 | [{"id": "G0", "claim": "Use `bool(os.environ.get('NO_COLOR'))` instead of the explicit `== \"1\"` check, because per the no-color.org standard NO_COLOR should be honored whenever it is present and non-empty, regardless of its value.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introd... | null |
sqlfluff__sqlfluff__7175 | sqlfluff/sqlfluff | 7,175 | defect | c303f53ca23af0b55ea3010340b080ad99732258 | 875a351a5bf0d6259639b07421ac73380b6bad23 | Add support for FlinkSQL SET statements |
<!--Thanks for adding this feature!-->
<!--Please give the Pull Request a meaningful title for the release notes-->
### Brief summary of the change made
Added support for FlinkSQL SET statements
Added flink to list of supported dialects in the README.md
### Are there any other side effects of this change ... | diff --git a/README.md b/README.md
index 5d2f70ddb3..1a794dfa43 100644
--- a/README.md
+++ b/README.md
@@ -49,6 +49,7 @@ currently supports the following SQL dialects (though perhaps not in full):
- [Doris](https://doris.apache.org/)
- [DuckDB](https://duckdb.org/)
- [Exasol](https://www.exasol.com/)
+- [FlinkSQL](h... | 3 | 3 | 1 | [{"id": "G0", "claim": "The SetStatementSegment grammar lacks support for a bare `SET` statement (without parameters) and the parameter sequence should be made optional, as in the Hive dialect.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The test... | null |
sqlfluff__sqlfluff__7197 | sqlfluff/sqlfluff | 7,197 | defect | 7f5ad66db2fe906827280fd6dfef6eb83565b4e8 | 74e03eac897be7684fffa1415e2ba4356655f260 | Add the option to require implicit indents | <!--Thanks for adding this feature!-->
<!--Please give the Pull Request a meaningful title for the release notes-->
### Brief summary of the change made
This is a long-awaited feature for some. It allows the user to enforce implicit indents across their project. It also edits the implicit indents config to be fo... | diff --git a/docs/source/_partials/starter_config.cfg b/docs/source/_partials/starter_config.cfg
index 1f73ee429a..35fd1d3353 100644
--- a/docs/source/_partials/starter_config.cfg
+++ b/docs/source/_partials/starter_config.cfg
@@ -34,7 +34,7 @@ project_dir = ./
[sqlfluff:indentation]
# While implicit indents are not ... | 1 | 1 | 1 | [{"id": "G0", "claim": "Consider adding validation for `implicit_indents` so that only the valid values (\"forbid\", \"allow\", \"require\") are accepted; invalid values would otherwise only fail at runtime when string comparisons don't match any expected value.", "category": "correctness", "verdict": "supported", "pri... | null |
sqlfluff__sqlfluff__7305 | sqlfluff/sqlfluff | 7,305 | defect | 6a49fdd4fc30125e78aed96783e6b86f190d5878 | 9d3ab0266bfc8829d86ea1b14152eb196d05ee4f | BigQuery: explicitly define data types | <!--Thanks for adding this feature!-->
<!--Please give the Pull Request a meaningful title for the release notes-->
### Brief summary of the change made
Fixes #6772.
List of data types are based on this doc: https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/data-types#numeric_types
### Are t... | diff --git a/src/sqlfluff/dialects/dialect_bigquery.py b/src/sqlfluff/dialects/dialect_bigquery.py
index bf027176a8..15bdda9181 100644
--- a/src/sqlfluff/dialects/dialect_bigquery.py
+++ b/src/sqlfluff/dialects/dialect_bigquery.py
@@ -290,6 +290,27 @@
casefold=str.upper,
)
),
+ DatatypeIde... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add a negative test case verifying that invalid data types such as FLOAT or FLOAT2 are now rejected by the BigQuery dialect (e.g. SELECT CAST(1 AS FLOAT) should fail to parse).", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
sqlfluff__sqlfluff__7401 | sqlfluff/sqlfluff | 7,401 | defect | 739831f719eca939a544111570fef8cb557d7bb7 | f2373ba22709b137544481982c8f29e0e14a06b9 | Adds custom Python recursion limit value as an option | <!--Thanks for adding this feature!-->
<!--Please give the Pull Request a meaningful title for the release notes-->
### Brief summary of the change made
<!--Please include `fixes #XXXX` to automatically close any corresponding issue when the pull request is merged. Alternatively if not fully closed you can say `... | diff --git a/src/sqlfluff/cli/commands.py b/src/sqlfluff/cli/commands.py
index 3e9397988e..5bf296bade 100644
--- a/src/sqlfluff/cli/commands.py
+++ b/src/sqlfluff/cli/commands.py
@@ -577,6 +577,12 @@ def dump_file_payload(filename: Optional[str], payload: str) -> None:
"found. This is potentially useful during... | 5 | 5 | 3 | [{"id": "G0", "claim": "The parse command is missing the --recursion-limit option even though it also parses SQL and would benefit from it.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The logic to read and apply the recursion limit is duplicated acros... | null |
sqlfluff__sqlfluff__7414 | sqlfluff/sqlfluff | 7,414 | defect | 6eaf29869d8410d49928915ce11e782b80210ddd | e0fae483ef168f25510ee2a13160a104b8461240 | Support globs in COMMA_SEPARATED_PATH_KEYS | <!--Thanks for adding this feature!-->
<!--Please give the Pull Request a meaningful title for the release notes-->
### Brief summary of the change made
Fixes #6819
### Are there any other side effects of this change that we should be aware of?
No
### Pull Request checklist
- [x] Please confirm you have ... | diff --git a/src/sqlfluff/core/config/file.py b/src/sqlfluff/core/config/file.py
index d9dec4dc4d..279c5eec94 100644
--- a/src/sqlfluff/core/config/file.py
+++ b/src/sqlfluff/core/config/file.py
@@ -11,6 +11,7 @@
which should negate this effect.
"""
+import glob
import os.path
from functools import cache
from ty... | 2 | 1 | 1 | [{"id": "G0", "claim": "_resolve_path() declares -> str but returns list[str] from glob.glob(), so single path keys (e.g. library_path) receive a list instead of a string, breaking code that performs string operations on them (e.g. os.path.join(library_path, \"__init__.py\")).", "category": "correctness", "verdict": "s... | null |
sqlfluff__sqlfluff__7556 | sqlfluff/sqlfluff | 7,556 | defect | 7d587a947cf86597c737a9642bdc848f97422671 | 711aca7dd110555de5e7680c01feea28370539fc | ANSI: handle `IS [NOT] DISTINCT FROM` comparison statement | ### Brief summary of the change made
This PR is aiming to enable parsing the `IS [NOT] DISTINCT FROM` comparison statement in ANSI and enable this grammar in other supported dialects as well.
While the ANSI dialect already contained a grammar for this, unfortunately it was not working.
Summary of changes
* ... | diff --git a/sqlfluffrs/sqlfluffrs_parser/src/parser/core.rs b/sqlfluffrs/sqlfluffrs_parser/src/parser/core.rs
index afae3f839b..995698d62e 100644
--- a/sqlfluffrs/sqlfluffrs_parser/src/parser/core.rs
+++ b/sqlfluffrs/sqlfluffrs_parser/src/parser/core.rs
@@ -977,6 +977,75 @@ impl<'a> Parser<'a> {
))
}
+... | 5 | 4 | 2 | [{"id": "G0", "claim": "The backward scan should account for comment segments (not only whitespace and meta segments) when skipping between keywords.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Dialects should not import the internal _is_distinct... | null |
sqlfluff__sqlfluff__7571 | sqlfluff/sqlfluff | 7,571 | defect | 774226f20b9dec8060c4e45556ca0b7d98c49223 | 96911cf23a3f38be343c60271e28a9095a1af5db | Rust: configurable runaway parse limits | <!--Thanks for adding this feature!-->
<!--Please give the Pull Request a meaningful title for the release notes-->
### Brief summary of the change made
<!--Please include `fixes #XXXX` to automatically close any corresponding issue when the pull request is merged. Alternatively if not fully closed you can say `... | diff --git a/sqlfluffrs/sqlfluffrs.pyi b/sqlfluffrs/sqlfluffrs.pyi
index f1557f420c..e2e31d372c 100644
--- a/sqlfluffrs/sqlfluffrs.pyi
+++ b/sqlfluffrs/sqlfluffrs.pyi
@@ -182,6 +182,8 @@ class RsParser:
self,
dialect: str,
indent_config: Optional[dict[str, bool]] = None,
+ max_parser_i... | 2 | 2 | 0 | [{"id": "G0", "claim": "`handle_table_max_iterations_exceeded` should use the Rust never return type `-> !` since it unconditionally panics.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The `_` prefix on the `_max_iterations` parameter is mi... | null |
sqlfluff__sqlfluff__7582 | sqlfluff/sqlfluff | 7,582 | defect | 0c10cfc5a2b4566b232a677ae3803dd4ca553418 | 2569d599024700b169e5049392bc4c04e71bbe3d | Fix: Jinja empty-rendering variable adjacent to quotes corrupts SQL during fix | When a Jinja template variable renders to an empty string and is adjacent to quote characters inside a SQL literal (e.g. `'{{ foo.bar }}'`), running `sqlfluff fix` would corrupt the file by deleting the opening quote:
```sql
-- Input
SELECT
'{{ foo.bar }}'
FROM baz
-- Broken output (before fix)
SELECT
... | diff --git a/src/sqlfluff/core/linter/patch.py b/src/sqlfluff/core/linter/patch.py
index 5b21ea7a4c..d806c32677 100644
--- a/src/sqlfluff/core/linter/patch.py
+++ b/src/sqlfluff/core/linter/patch.py
@@ -5,6 +5,7 @@
from dataclasses import dataclass
from typing import Optional
+from sqlfluff.core.helpers.slice impor... | 3 | 3 | 1 | [{"id": "G0", "claim": "No regression test was added for the new zero-length placeholder guard, so the fix is invisible to CI and a future refactor could silently re-introduce the corruption.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The raw == \"\... | null |
sqlfluff__sqlfluff__7584 | sqlfluff/sqlfluff | 7,584 | defect | 0c10cfc5a2b4566b232a677ae3803dd4ca553418 | c162e6fcef6cad9713ddcf9b9befa98adbec3479 | Add `return` dbt builtin |
<!--Thanks for adding this feature!-->
<!--Please give the Pull Request a meaningful title for the release notes-->
### Brief summary of the change made
<!--Please include `fixes #XXXX` to automatically close any corresponding issue when the pull request is merged. Alternatively if not fully closed you can say... | diff --git a/src/sqlfluff/core/templaters/builtins/dbt.py b/src/sqlfluff/core/templaters/builtins/dbt.py
index e41d0a2934..5aebbf3fb0 100644
--- a/src/sqlfluff/core/templaters/builtins/dbt.py
+++ b/src/sqlfluff/core/templaters/builtins/dbt.py
@@ -1,6 +1,6 @@
"""Defines the jinja builtins for dbt."""
-from typing imp... | 4 | 3 | 1 | [{"id": "G0", "claim": "DbtMacroWrapper is used inside a SandboxedEnvironment but, unlike every other callable wrapper in the codebase, does not declare `unsafe_callable = False` and `alters_data = False`, which makes the safety intent unclear; it should declare both attributes.", "category": "maintainability", "verdic... | null |
sqlfluff__sqlfluff__7593 | sqlfluff/sqlfluff | 7,593 | defect | 37a29e4fd89ad5603554337a932e15cf292b1f33 | c303f84e90073155e9b0312da73955755c3c69b6 | Handle invalid pyproject.toml parse errors | ## Summary
- catch TOML parse failures when loading pyproject.toml and raise a SQLFluffUserError
- include the config file path plus parse message and line/column details when available
- add a targeted hint for UTF-8 BOM-prefixed pyproject.toml files and cover the loader and CLI flows with tests
## Testing
- direct P... | diff --git a/.gitignore b/.gitignore
index c9f0cc0329..900ba8ea4b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,6 +23,8 @@ venv
.venv
.python-version
uv.lock
+.tmp
+.virtualenv_app_data
# Ignore coverage reports
.coverage
diff --git a/src/sqlfluff/core/config/toml.py b/src/sqlfluff/core/config/toml.py
index f8... | 2 | 2 | 1 | [{"id": "G0", "claim": "On Python 3.11+ the stdlib tomllib.TOMLDecodeError has no msg/lineno/colno attributes, so the invalid-syntax test derives a full str(err) as expected_message and None as expected_line/column, making three of its four assertions fail whenever the test runs.", "category": "testing", "verdict": "su... | null |
sqlfluff__sqlfluff__7604 | sqlfluff/sqlfluff | 7,604 | defect | 86e189b627e5a57107d090564cef853fbac62de5 | 947d5998b2f03a6a7e7eefe062841d4ffc841d74 | fix: Respect inline `noqa` directives in `sqlfluff parse` for PRS/TMP violations | ### Brief summary of the change made
This PR fixes a bug where `sqlfluff parse` did not respected inline `noqa` directives for parse and templating violations, even though `sqlfluff lint` already did. The issue was in the parse CLI path, which reported raw parse violations directly instead of applying the ignore mas... | diff --git a/src/sqlfluff/cli/commands.py b/src/sqlfluff/cli/commands.py
index 75892c4a3a..55e55bf8e7 100644
--- a/src/sqlfluff/cli/commands.py
+++ b/src/sqlfluff/cli/commands.py
@@ -36,9 +36,10 @@
dialect_selector,
)
from sqlfluff.core.config import progress_bar_configuration
-from sqlfluff.core.linter import L... | 4 | 3 | 3 | [{"id": "G0", "claim": "The list comprehension filtering for `inline_comment` matchers is indexed with `[0]` without a guard, so a dialect registered without an `inline_comment` lexer matcher would raise an unhelpful `IndexError`; the reviewer suggests making this defensive in both this new parse-path site and the exis... | null |
sqlfluff__sqlfluff__7616 | sqlfluff/sqlfluff | 7,616 | defect | 5ad85d3bcbcbc204bc30dd509695bf32821c9dfc | 88ed8f34836944b42ce2c9d6df7b3a1bd6e0807e | feat(runner): Allow streaming render in parallel pipeline | <!--Thanks for adding this feature!-->
<!--Please give the Pull Request a meaningful title for the release notes-->
### Brief summary of the change made
<!--Please include `fixes #XXXX` to automatically close any corresponding issue when the pull request is merged. Alternatively if not fully closed you can say `... | diff --git a/plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py b/plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py
index d98eb7e850..c2e0e2db09 100644
--- a/plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py
+++ b/plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/te... | 2 | 2 | 0 | [{"id": "G0", "claim": "The stale test test__linter__iter_rendered_delegates_for_dbt no longer exercises its stated purpose (dbt bypassing pool-based parallel rendering) and should be updated or removed to avoid confusion.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id":... | null |
sqlfluff__sqlfluff__7617 | sqlfluff/sqlfluff | 7,617 | defect | a8fcdc368ae16d2e110d478369e713425faea366 | 14bbf2adef9484b5cb20a8b754c30673f7c06c7e | Fix `ignore = templating` disabling all lint rules with Python templater | When `templater = python` and `ignore = templating` are both set, the linter silently reported no violations instead of running lint rules — because the Python templater raised a fatal `SQLTemplaterError` for missing variables, producing no templated variants, so linting was skipped entirely. The templating error was t... | diff --git a/src/sqlfluff/core/templaters/python.py b/src/sqlfluff/core/templaters/python.py
index f17b559225..7a02568f9e 100644
--- a/src/sqlfluff/core/templaters/python.py
+++ b/src/sqlfluff/core/templaters/python.py
@@ -236,6 +236,7 @@ def process(
"""
live_context = self.get_context(fname, confi... | 1 | 1 | 1 | [{"id": "G0", "claim": "When the context provides a partial `sqlfluff` dict (some dot-notation keys but not all), `_FallbackDict` resolves `sqlfluff` to the real dict and the missing nested key raises an unhandled `KeyError`, bypassing the fallback mechanism; the comment suggests wrapping `format_map` in a try/except K... | null |
sqlfluff__sqlfluff__7637 | sqlfluff/sqlfluff | 7,637 | defect | 708ffceefd3e7975ad0e818c9d560c9128487332 | e469429cb43e7589076095d45a7248a04ec4d178 | Add dbt 1.11 function() builtin to Jinja apply_dbt_builtins | ## Summary
- add a `function` builtin mock to `DBT_BUILTINS` for the Jinja templater
- render `function(name)` as a `RelationEmulator(name)` so `{{ function("my_udf") }}(args)` becomes `my_udf(args)`
- add a focused regression test covering `apply_dbt_builtins = True` with `function()` usage
Fixes #7580.
## Testing
-... | diff --git a/src/sqlfluff/core/templaters/builtins/dbt.py b/src/sqlfluff/core/templaters/builtins/dbt.py
index f1b2142ec7..fee33c174c 100644
--- a/src/sqlfluff/core/templaters/builtins/dbt.py
+++ b/src/sqlfluff/core/templaters/builtins/dbt.py
@@ -78,6 +78,10 @@ def __call__(self, *args: Any, **kwargs: Any) -> Any:
... | 3 | 3 | 2 | [{"id": "G0", "claim": "The `function` builtin's lambda accepts exactly one positional argument while `ref` uses the permissive `lambda *args, **kwargs: RelationEmulator(args[-1])` pattern; if dbt 1.11's `function()` is called with an optional schema or database qualifier (as `ref` supports), the mock will raise a `Typ... | null |
sqlfluff__sqlfluff__7643 | sqlfluff/sqlfluff | 7,643 | defect | 708ffceefd3e7975ad0e818c9d560c9128487332 | 70b4d0f05a71be32fd9441fe026e4f291f861214 | Fix for empty iterator bug that can occur from Jinja loops | <!--Thanks for adding this feature!-->
<!--Please give the Pull Request a meaningful title for the release notes-->
### Brief summary of the change made
<!--Please include `fixes #XXXX` to automatically close any corresponding issue when the pull request is merged. Alternatively if not fully closed you can say `... | diff --git a/src/sqlfluff/core/templaters/jinja.py b/src/sqlfluff/core/templaters/jinja.py
index 60731475db..d3fdc2ad9a 100644
--- a/src/sqlfluff/core/templaters/jinja.py
+++ b/src/sqlfluff/core/templaters/jinja.py
@@ -85,7 +85,7 @@ def __call__(self, *args: Any, **kwargs: Any) -> "UndefinedRecorder":
def __iter__... | 6 | 5 | 3 | [{"id": "G0", "claim": "Changing DummyUndefined.__iter__ and UndefinedRecorder.__iter__ to return empty iterators silently skips single-variable for-loop bodies over undefined variables, so linting inside such loops is skipped and undefined variables referenced in the loop body go unreported.", "category": "correctness... | null |
sqlfluff__sqlfluff__7672 | sqlfluff/sqlfluff | 7,672 | defect | 9f8b1ae429fe8403a16a94a63c8a5a6ee775bf2c | b4df2b9e0dd73bef7bc32c3f9b825a0773b05720 | Fix crash on malformed inline config using = syntax | <!--Thanks for adding this feature!-->
<!--Please give the Pull Request a meaningful title for the release notes-->
Fixes #6688
`-- sqlfluff:disable=AM04` (using .sqlfluff file syntax instead of inline colon syntax) caused an IndexError in process_inline_config. Added a guard for the empty-key case that logs ... | diff --git a/src/sqlfluff/core/config/fluffconfig.py b/src/sqlfluff/core/config/fluffconfig.py
index 3be06e6eca..e763928138 100644
--- a/src/sqlfluff/core/config/fluffconfig.py
+++ b/src/sqlfluff/core/config/fluffconfig.py
@@ -688,6 +688,17 @@ def process_inline_config(self, config_line: str, fname: str) -> None:
... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new test imports `logging` locally inside the function although it is already imported at module level, which is unnecessary and inconsistent with the rest of the test file.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
sqlfluff__sqlfluff__7685 | sqlfluff/sqlfluff | 7,685 | defect | b4df389933e6c6c26a52c749e79c0cd58f59abf8 | 99e96faf6f5389f1a4871d9be8f9ecc8a8de3c92 | Support macros-calling-macros in jinja templater | ### Brief summary of the change made
<!--Please include `fixes #XXXX` to automatically close any corresponding issue when the pull request is merged. Alternatively if not fully closed you can say `makes progress on #XXXX`.-->
There are a number of issues that I believe are covered by this commit:
- #335 (closed by... | diff --git a/src/sqlfluff/core/templaters/jinja.py b/src/sqlfluff/core/templaters/jinja.py
index 89705ae023..ba2c78946a 100644
--- a/src/sqlfluff/core/templaters/jinja.py
+++ b/src/sqlfluff/core/templaters/jinja.py
@@ -235,6 +235,40 @@ def _extract_macros_from_config(
)
return macro_ctx
+ ... | 2 | 1 | 0 | [{"id": "G0", "claim": "The pass-1 result `macro_names` holds full compiled macro objects rather than just names, so the variable name is misleading and should communicate its content more clearly (e.g. be renamed to `first_pass_macros` or hold only names).", "category": "maintainability", "verdict": "supported", "prio... | null |
sqlpage__SQLPage__1247 | sqlpage/SQLPage | 1,247 | defect | 17e56cd042b92dcc0c444f7f4e0c970905b7b236 | c6e70e9da61d6290a37aa1fb9e5104dbf793dc8d | Remove env_logger and use telemetry logging in tests | ## Summary
- remove env_logger from SQLPage dependencies
- add telemetry::init_test_logging() as an idempotent test initializer
- switch test modules from env_logger setup to telemetry-based setup
## Validation
- cargo fmt --all
- cargo clippy --all-targets --all-features -- -D warnings
- cargo test (fails in this san... | diff --git a/Cargo.lock b/Cargo.lock
index 113f68a4..b1ea132f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -354,21 +354,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "anstream"
-version = "0.6.21"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43d5b281e737544384e969a5ccad3f1cd... | 1 | 1 | 1 | [{"id": "G0", "claim": "init_test_logging() routes test startup through the production telemetry init, so when OTEL_EXPORTER_OTLP_ENDPOINT is set tests enter init_otel_tracing with fallible exporter construction that can panic via expect, and invalid LOG_LEVEL/RUST_LOG panics via default_env_filter, making otherwise un... | null |
sqlpage__SQLPage__311 | sqlpage/SQLPage | 311 | defect | e93db08c44edff18f4d4f2bbed423f2ff80348ac | f37c0ec68348abc28d496874a4a4273d1a2b76ef | support site prefix for use with reverse proxy | Closes #279
I haven't any experience with rust, so I made as few changes as possible and did what the compiler told me to.
So this could look a bit weird or backwards, but it does work.
Probably needs some testing and way more scrutiny.
I've tested with:
```
{
"site_prefix": "/app/"
}
```
Default:
... | diff --git a/sqlpage/templates/chart.handlebars b/sqlpage/templates/chart.handlebars
index 824761240..129d8a307 100644
--- a/sqlpage/templates/chart.handlebars
+++ b/sqlpage/templates/chart.handlebars
@@ -2,7 +2,7 @@
{{#if id}}id="{{id}}"{{/if}}
class="card my-2 {{class}}"
data-pre-init="chart"
- da... | 3 | 3 | 1 | [{"id": "G0", "claim": "The shell template links to a manifest.json that the site does not serve by default.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The site_prefix helper re-reads the config on every page load; the prefix should instead be r... | null |
sqlpage__SQLPage__370 | sqlpage/SQLPage | 370 | defect | 8add49dc524d94c2c72571f7917bcc28a38671ef | db16cf24976f72ab5cde66ae628b0dc10b71d67a | add uploaded_file_name function | Closes #333
Tested with
```sql
SET fname = sqlpage.uploaded_file_name('f');
SELECT 'debug' AS component;
SELECT $fname AS fname;
SELECT 'form' AS component, 'post' AS method;
SELECT 'file' AS type, 'f' AS name, '' AS label;
```
Documentation tbd | diff --git a/src/webserver/database/sqlpage_functions/functions.rs b/src/webserver/database/sqlpage_functions/functions.rs
index 8fba61c0f..565965bf8 100644
--- a/src/webserver/database/sqlpage_functions/functions.rs
+++ b/src/webserver/database/sqlpage_functions/functions.rs
@@ -31,6 +31,7 @@ super::function_definitio... | 2 | 2 | 2 | [{"id": "G0", "claim": "The new uploaded_file_name function should be documented in examples/official-site/sqlpage/migrations before merge.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new uploaded_file_name function should get a test for it... | null |
sqshq__piggymetrics__41 | sqshq/piggymetrics | 41 | defect | 5c2880d4a3905399a74b778db4d46f22c4401385 | 469455d23549417fca3e8c7f5d521638e7996612 | Feature/turbine stream service | After upgrade to spring-boot 2, some users report about hystrix dashboard is not accessable due to `IOException: Broken Pipe`.
The fix is to separate turbine-stream from monitoring service. and after the fix Hystrix Dashboard is working fine and we can monitor services through turbine stream.
<img width="676" alt... | diff --git a/.travis.yml b/.travis.yml
index 178063e4f2..a7eabaa23c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -68,6 +68,12 @@ after_success:
- docker tag $MONITORING:$COMMIT $MONITORING:$TAG
- docker push $MONITORING
+ # TURBINE STREAM SERVICE
+ - export TURBINE=sqshq/piggymetrics-turbine-stream-service
+... | 1 | 1 | 0 | [{"id": "G0", "claim": "The turbine-stream-service pom's artifactId should be changed to `turbine-stream-service` instead of `piggymetrics`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
square__certstrap__135 | square/certstrap | 135 | defect | fda01dbea1db250eabfe77a8ceef55232cd5a515 | 6e823d5adbfef792acd6141f9e3ad537bf742ca5 | Add support for setting `pathlen` on CA certificates and intermediate CA | Taken from [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280#page-39), section 4.2.1.9:
> A `pathLenConstraint` of zero indicates that no non-self-issued intermediate CA certificates may follow in a valid certification path. Where it appears, the pathLenConstraint field MUST be greater than or equal to zero. Where `... | diff --git a/cmd/init.go b/cmd/init.go
index e0473b6..120589d 100644
--- a/cmd/init.go
+++ b/cmd/init.go
@@ -93,6 +93,15 @@ func NewInitCommand() cli.Command {
Name: "permit-domain",
Usage: "Create a CA restricted to subdomains of this domain (can be specified multiple times)",
},
+ cli.IntFlag{
+ N... | 3 | 2 | 2 | [{"id": "G0", "claim": "Simplify the pathlen logic in CreateCertificateAuthority by always setting MaxPathLen = pathlen and using MaxPathLen = -1 (leaving MaxPathLenZero true) instead of the conditional MaxPathLenZero assignments.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"},... | null |
square__certstrap__165 | square/certstrap | 165 | defect | 1377eabdd8242bc353dcebf879a3b077413036c2 | 992908f185aab3fe6cc72f055229caf84a653a4d | Allow password-protected CAs to call revoke command | This addresses https://github.com/square/certstrap/issues/110
We test this in workflow_test.go, which is an integration test. We check to make sure that calling revoke does not result in any errors.
I also added password as a flag to the revoke command (mainly for integration testing purposes - this is a common p... | diff --git a/cmd/revoke.go b/cmd/revoke.go
index e74533b..84930f2 100644
--- a/cmd/revoke.go
+++ b/cmd/revoke.go
@@ -26,6 +26,10 @@ func NewRevokeCommand() cli.Command {
Usage: "Revoke certificate",
Description: "Add certificate to the CA's CRL.",
Flags: []cli.Flag{
+ cli.StringFlag{
+ Name: "passp... | 2 | 1 | 0 | [{"id": "G0", "claim": "Remove the leftover debug fmt.Println statements this pull request added to askPassPhrase and getPassPhrase in cmd/util.go.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "If the new --passphrase flag is omitted, will the ... | null |
square__certstrap__47 | square/certstrap | 47 | defect | 25e0caa16bbb614597a4de836537084a16b28ca0 | c7df2eaeb1a0d459cb0debdd953cc28b93bc87d3 | Adds expiry parser with ability to specify hours, days, months and years | We want to to use certstrap to issue certs with a much lower expiry than 1 year.
This PR replaces `--years` with `--expires` which accepts a simple relative format.
The format is `<VALUE> <UNIT> <VALUE UNIT> ...`.
`<VALUE>` must be an integer. `<UNIT>` may be one of `year, month, day, hour`. Plural forms of the un... | diff --git a/cmd/expiry.go b/cmd/expiry.go
new file mode 100644
index 0000000..538945c
--- /dev/null
+++ b/cmd/expiry.go
@@ -0,0 +1,35 @@
+package cmd
+
+import (
+ "errors"
+ "regexp"
+ "strconv"
+ "time"
+)
+
+var nowFunc = time.Now
+
+func parseExpiry(fromNow string) (time.Time, error) {
+ re := regexp.MustCompile("... | 3 | 3 | 1 | [{"id": "G0", "claim": "parseExpiry discards the strconv error when converting the numeric part of the expiry string and does not guard against integer overflow, so out-of-range values could be silently accepted; the error should be checked and overflow handled.", "category": "correctness", "verdict": "supported", "pri... | null |
square__field-kit__33 | square/field-kit | 33 | defect | c4b7215eb5613a7ca6840cb06659ee30a33ee1a2 | 7429c384dbca063baf8c49c6f2bce97d795b1659 | Add EIN field support | EIN's are useful for business-related concerns (taxes, payroll, etc.).
It'd be nice if there were a simple way to determine whether a TIN is actually an SSN versus an EIN, but the numeric spaces of the two overlap (both consist of nine digits).
If you have ideas for obvious refactorings to combine EIN and SSN into a... | diff --git a/lib/employer_identification_number_formatter.js b/lib/employer_identification_number_formatter.js
new file mode 100644
index 0000000..60a3588
--- /dev/null
+++ b/lib/employer_identification_number_formatter.js
@@ -0,0 +1,75 @@
+'use strict';
+
+Object.defineProperty(exports, '__esModule', {
+ value: true
... | 1 | 1 | 0 | [{"id": "G0", "claim": "Use `const` instead of `var` for DIGITS_PATTERN in src/employer_identification_number_formatter.js, keeping new code in the best ES6 style.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
square__gifencoder__16 | square/gifencoder | 16 | defect | 27661c43e778bfae057d40f987a4813d775eb7e6 | d4baff0dd4616e77d34f6d0f869534aaa36e480b | Refactor code related to the LZW minimum code size | We were deriving the minimum code size from the number of colors in the LZW code table, which is sort of backwards. The spec defines the "clear" code's value (and implicitly, the number of colors in the LZW code table) based on the minimum code size.
I also made some tweaks to emphasize that the number of colors in ... | diff --git a/pom.xml b/pom.xml
index b112ae1..1ca7c6c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -57,7 +57,7 @@
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
- <version>2.0.0</version>
+ <version>3.13.2</version>
<scope>test</scope>
</dependency>
... | 1 | 1 | 0 | [{"id": "G0", "claim": "The verbose anonymous-class ThrowingCallable assertion style in LzwEncoderTest is needlessly specific and should be simplified.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
square__sharkey__102 | square/sharkey | 102 | defect | 69f82d83e61316474d0aa9793107ed6462d19238 | 41af0a4f91ae56cec2ddb23326e76bfd20133fd1 | Replaced old log library with logrus and updated tests to use logrus | Using logrus library to for existing logs. Augmented existing test to check for the expected error messages and fields in logrus logger. | diff --git a/cmd/sharkey-client/sharkey-client.go b/cmd/sharkey-client/sharkey-client.go
index a92c51f..7830ec4 100644
--- a/cmd/sharkey-client/sharkey-client.go
+++ b/cmd/sharkey-client/sharkey-client.go
@@ -1,11 +1,13 @@
package main
import (
+ "github.com/sirupsen/logrus"
"os"
"github.com/square/sharkey/pk... | 3 | 3 | 2 | [{"id": "G0", "claim": "govet copylocks: the pull request passes logrus.Logger by value (a struct containing logrus.MutexWrap) into enroll, makeKnownHosts, reloadSSH and shellOut and copies it at every call site in pkg/client/sharkey_client.go and pkg/client/client_test.go, so each call copies a lock value.", "category... | null |
square__sharkey__115 | square/sharkey | 115 | defect | e4d7fa56285f47380745a5078b64c0187eca8ebf | 6fcf6392a15137594f7c5b9faa92d3058832e3f3 | add support for DogStatsD metrics as well as extra tests | Emit DogStatsD metrics to configurable address
- GitHub fetch latency
- GitHub fetch success count
- GitHub fetched users
- Cron Job latency
Slight change to `github.go` to allow for new test
Use local roundtripper to mock connection to GitHub API in new test | diff --git a/README.md b/README.md
index 5081677..98729ca 100644
--- a/README.md
+++ b/README.md
@@ -278,4 +278,13 @@ An example cert is shown below:
permit-port-forwarding
permit-pty
permit-user-rc
-```
\ No newline at end of file
+```
+
+### Telemetry
+
+Sharkey sup... | 6 | 6 | 2 | [{"id": "G0", "claim": "The README telemetry section should also mention that Unix sockets are supported for the DogStatsD address.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The config YAML key (`telemetry`) and the README example (`metrics`)... | null |
square__sharkey__118 | square/sharkey | 118 | defect | 0f2c6c638370d5a5e7fba03fade3bde0fdf454c0 | 5324dc83e33d2901130f13d23a38ee298e6309f8 | put signing code into common pkg | move cert signing code into the common library section
- Create new Signer struct that encapsulates ssh.Signer
- Remove sign method from Api struct
- signHost and enrollUser in Api struct directly call Signer
- Signer struct handles recording into database | diff --git a/go.sum b/go.sum
index fd01489..ee685c9 100644
--- a/go.sum
+++ b/go.sum
@@ -29,6 +29,7 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgrijalva/jwt-go v3.2.0+incompatib... | 3 | 2 | 1 | [{"id": "G0", "claim": "NewSigner should return a *Signer pointer instead of a Signer value.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The package should be renamed from sign (sign.Signer is repetitive) to cert and moved out of pkg/common into the s... | null |
square__sharkey__153 | square/sharkey | 153 | defect | 0e0913a177ed554d373646cb70c509ce2a9f81fd | 8e4002a484ae0c556b15273fe885b20549e28b89 | Allow Sharkey to distribute additional CAs | This is potentially useful when rotating signing keys.
A new signing key can be added to the `/authorities` endpoint and
distributed prior to switching to the new signing key | diff --git a/pkg/server/api/authority.go b/pkg/server/api/authority.go
index a82fe692..9087b16a 100644
--- a/pkg/server/api/authority.go
+++ b/pkg/server/api/authority.go
@@ -17,6 +17,7 @@
package api
import (
+ "bytes"
"net/http"
"golang.org/x/crypto/ssh"
@@ -28,6 +29,15 @@ func (c *Api) Authority(w http.Res... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new test should use `os.ReadFile` instead of the older `ioutil.ReadFile` (noting this assumes Sharkey is built with Go >= 1.16).", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
square__sharkey__167 | square/sharkey | 167 | defect | 4a16ff8b109163e0137cc2ca4892ccedbf304532 | e1906147d49b3819d05abf25b2e8428d0dd176a7 | Add support for Proxy Authentication with SPIFFE ID in Certificate | Added the capability to also accept an AuthenticatedProxy request based on the SPIFFE ID of the Proxy's certificate. Currently it is a simple "OR"; one can be validated by either the hostname or by the spiffe ID presented in the certificate. | diff --git a/go.mod b/go.mod
index 332208b..17273c7 100644
--- a/go.mod
+++ b/go.mod
@@ -12,8 +12,9 @@ require (
github.com/robfig/cron/v3 v3.0.1
github.com/shurcooL/githubv4 v0.0.0-20200627185320-e003124d66e4
github.com/sirupsen/logrus v1.7.0
- github.com/stretchr/testify v1.8.0
- golang.org/x/crypto v0.0.0-2021... | 7 | 6 | 1 | [{"id": "G0", "claim": "The authenticating proxy SPIFFE ID should be an array such as AllowedSPIFFEIDs since multiple authenticating proxies could connect to sharkey, and config (e.g. SPIFFE ID validity) should be validated on start-up.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introdu... | null |
square__sharkey__27 | square/sharkey | 27 | defect | 363a02987dfcda20828b2deca2243623853b8541 | 12765c7bf9ba894bc2f21d5b2fa23b860d5f9947 | Fix some stuff | r: @christodenny @mcpherrinm @worldwise001 @stfinney
Changes:
- Use temp files instead of hard-coded path names when installing files in client
- Use proper HTTP error codes (401/403, or 500) for error conditions
- Allow /_status to be hit by unauthenticated clients
| diff --git a/client/sharkey_client.go b/client/sharkey_client.go
index cac60c2..8f9055f 100644
--- a/client/sharkey_client.go
+++ b/client/sharkey_client.go
@@ -129,7 +129,7 @@ func (c *context) enroll() {
}
func (c *context) makeKnownHosts() {
- url := c.conf.RequestAddr + "/known_hosts"
+ url := c.conf.RequestAdd... | 1 | 1 | 0 | [{"id": "G0", "claim": "Keep the underscore in the known_hosts URI because known_hosts is what the file is actually called (i.e., the pull request's rename of the endpoint to /known-hosts should be reverted).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
square__sharkey__70 | square/sharkey | 70 | defect | 11d2a767d0f0d6e7bbb92d42b443c990f2cd2237 | fc84307cf1125e7592a0ef8005efeff503a4da41 | Correctly set Content-Type for /_status response | Without this change, `_/status` returns a JSON response with Content-Type set to `text/plain; charset=utf-8` | diff --git a/server/server_test.go b/server/server_test.go
index 56d6f6c..6025a69 100644
--- a/server/server_test.go
+++ b/server/server_test.go
@@ -159,6 +159,42 @@ func TestGetKnownHosts(t *testing.T) {
}
}
+func TestStatus(t *testing.T) {
+ c, err := generateContext()
+ if err != nil {
+ t.Fatalf("Error genera... | 1 | 1 | 0 | [{"id": "G0", "claim": "The expected /_status JSON should be inlined as a byte string in the test instead of read from the short testdata/status_ok.json file.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
square__sharkey__87 | square/sharkey | 87 | defect | d70db2f412dbc9d6f7d1b2bea1613dca11bab715 | bbf3ddfdec7c00bfadce7b02ca0c00e0f09b8e2b | Simplify Enroll User API | PR #82 introduced an endpoint for issuing SSH user certificates. The API
assumed that the user param passed in the API should match the username
in the HTTP header passed by the authenticating proxy. Since, there's no
functionality, currently, that allows a user to issue a cert on behalf
of another user (e.g. authe... | diff --git a/README.md b/README.md
index b6d5edf..e5eb468 100644
--- a/README.md
+++ b/README.md
@@ -238,7 +238,7 @@ No client helper is included with Sharkey at this time, so you have to set up
a script yourself at this time to enroll the user.
Testing looks something like this:
- `curl --cert proxy.crt --key pr... | 1 | 1 | 1 | [{"id": "G0", "claim": "proxyAuthenticated should be changed to return the user rather than having the caller read the username header and pass it in.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
square__subzero__343 | square/subzero | 343 | defect | e91e40a84634dc4bccc09d593c40dbd500d2ac8a | 71cece3f7303082db1a7869be57ccb0ee423c4bf | Unification of master seed and public key protection code. | We consolidate the master seed and public key protection code for TARGET=dev and TARGET=nCipher.
The protect_ and expose_ functions are now identical for both targets. Target specific code is only needed for routing to the corresponding key encryption keys.
We make this change to further reduce the differences betwee... | diff --git a/core/include/aes_gcm.h b/core/include/aes_gcm.h
index 92a101c5..6c850a3a 100644
--- a/core/include/aes_gcm.h
+++ b/core/include/aes_gcm.h
@@ -5,9 +5,11 @@
// M_KeyID is typedef'ed in codesafe header. If STDMARSHALTYPES_H is not
// defined, we are in dev target
#ifndef STDMARSHALTYPES_H
-typedef enum {KE... | 3 | 1 | 0 | [{"id": "G0", "claim": "The reviewer questions #include-ing ../protect.c directly into both target protection.c files, asking whether it is an intermediate step before making the shared code a library with linker deduplication, since including .c files directly has sharp edges.", "category": "design", "verdict": "oppos... | null |
square__subzero__417 | square/subzero | 417 | defect | 89f8b2cf586cc44c0a8cda449390c27675edde83 | 60105e462c34c5b1913c20295621acf554c71c6a | Nmahendru/qrcode tests | This PR adds:
1. self tests for qr signatures. This does not really validate a QR code but it does validate our wrapper
around trezor crypto. This will ensure that a negative test against bad signature is always
executed and should catch any innocent bugs which might get introduced
at some point.
... | diff --git a/.gitignore b/.gitignore
index 48b8bf90..76c14707 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
vendor/
+.venv3
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index 4bc7051a..47fdbb09 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -42,6 +42,7 @@ set(main_SRC
"src/rpc.c"... | 6 | 4 | 0 | [{"id": "G0", "claim": "In addition to the round-trip test, hardcode an expected signature value to check the self-test against.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The self-check should return distinct codes for its distinct failure cases in... | null |
square__subzero__589 | square/subzero | 589 | defect | 9879eea9f921a9f84c5b63acce967defaa043968 | 6a41ce18235f8f0ad1cbe9846aa7dccda53f7cb6 | Add a self-check test for processing a message which exceeds nanopb field size limits | See title. This verifies that nanopb refuses to parse such messages, rather than blowing the stack. | diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index dc0d08a6..501aa735 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -81,6 +81,7 @@ set(checks_SRC
"src/checks/bip32.c"
"src/checks/check_sign_tx.c"
"src/checks/conv_checks.c"
+ "src/checks/rpc_checks.c"
"src/checks/self_che... | 6 | 4 | 0 | [{"id": "G0", "claim": "The #define should be tab aligned so the indented comment above it does not look funny.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Fix the typo 'allone' to 'alone' in the comment.", "category": "documentation", "verdi... | null |
square__subzero__601 | square/subzero | 601 | defect | 1e3ee6e67b5594ce5ab9ba4ffbd69997aee360f1 | 5423217cd5b200b0d562b229d790b4f04aa4e1f4 | [core] clean up self-checks logic to reduce code duplication | This change makes it simpler to add new self checks - just add the function and register it inside register_all_self_checks(). | diff --git a/core/include/checks.h b/core/include/checks.h
index fbe11ea9..e0e91a8d 100644
--- a/core/include/checks.h
+++ b/core/include/checks.h
@@ -4,6 +4,9 @@
/**
* Performs self checks before accepting any requests.
+ * Make sure to update register_all_self_checks() in self_checks.c when
+ * adding new self-c... | 3 | 2 | 1 | [{"id": "G0", "claim": "Add a hard assert that self_checks_count equals an expected constant (e.g. 42), either at the run loop or inside register_all_self_checks, so that the self checks are guaranteed to actually run.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id":... | null |
square__subzero__610 | square/subzero | 610 | defect | 485e0f1026179bd06107cf62bcf35b3d78c368f4 | 5df68c0fefb05edb7c08d7ccfced1ac3261c10ab | [core] check bounds of signature and pubkey inputs in qrsignature.c | This wasn't checked before so it was possible to pass in a short signature from outside, which would cause an out-of-bounds read in the signature verification code. Probably not a security vulnerability, but technically UB so better not risk it. | diff --git a/core/include/qrsignatures.h b/core/include/qrsignatures.h
index d3f281c2..bab085a7 100644
--- a/core/include/qrsignatures.h
+++ b/core/include/qrsignatures.h
@@ -4,20 +4,42 @@
#include <stddef.h>
#include <stdint.h>
+#define QRSIGNATURE_LEN ((size_t) 64)
+#define QRSIGNATURE_PUBKEY_LEN ((size_t) 65)
+
... | 3 | 2 | 0 | [{"id": "G0", "claim": "The ERROR string in the wrong-length signature test does not match the comment and should read \"Signature should not have verified with a wrong-length pub key\".", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The ERROR strin... | null |
square__subzero__672 | square/subzero | 672 | defect | 5ffa78a890fa034cbcf39b0d8354b42083158ee1 | 9853bba7a3263dba6ca8178cb82921771f2a4f02 | Update nanopb submodule to release 0.4.5. | This replaces #577, we decided to update to 0.4.5 instead because it's the version used by trezor so we trust it a bit more.
Had to make some minor changes to how we configure our nanopb in CMakeLists.txt. | diff --git a/core/nanopb b/core/nanopb
index e4135412..c9124132 160000
--- a/core/nanopb
+++ b/core/nanopb
@@ -1 +1 @@
-Subproject commit e41354128e26ab6160a32822b0fe1dc4db5c09bc
+Subproject commit c9124132a604047d0ef97a09c0e99cd9bed2c818
diff --git a/core/proto/CMakeLists.txt b/core/proto/CMakeLists.txt
index 9c04be76... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add a comment in core/proto/CMakeLists.txt explaining why NANOPB_GENERATE_CPP_APPEND_PATH/NANOPB_OPTIONS are set, and preferably clarify whether they are needed only with nanopb 0.4.5.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
squat__kilo__131 | squat/kilo | 131 | defect | 4d1756c23ad1f6906edd06c1b6a5da1fee613e5b | 0693f0b9c1a239e696ad7e35917abb27b73ceed9 | pkg/mesh: correctly idenitfy 172.16/12 IPs | Currently Kilo incorrectly identifies the 172.16/12 private IP range.
This commit fixes the logic.
Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
Fixes: https://github.com/squat/kilo/issues/57#issuecomment-791450130
cc @leonnicolas | diff --git a/pkg/mesh/ip.go b/pkg/mesh/ip.go
index 0eb882fc..42764fbf 100644
--- a/pkg/mesh/ip.go
+++ b/pkg/mesh/ip.go
@@ -42,12 +42,12 @@ func isLocal(ip net.IP) bool {
func isPublic(ip net.IP) bool {
// Check RFC 1918 addresses.
if ip4 := ip.To4(); ip4 != nil {
- switch true {
+ switch {
// Check for 10.0.0... | 1 | 1 | 0 | [{"id": "G0", "claim": "The title/commit message should say 172.16/12 range, not 172.168/12.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
squat__kilo__146 | squat/kilo | 146 | defect | 863628ffaa820bd3057cd329a335ba997c6b63ca | 058569ad325ad2ee380740bd0d5a5c8fc6b86c16 | Nat to nat | My approach is highly inspired from @squat comments in #109, with a difference on the annotation usage:
The annotation is note used for a node to present it's own endpoint detected by other, but the other way around: a node published the NAT endpoints it detected.
This has 2 advantages:
- the node detecting the ... | diff --git a/Dockerfile b/Dockerfile
index 2ef11789..2b2402f5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
ARG FROM=alpine
-FROM alpine AS cni
+FROM $FROM AS cni
ARG GOARCH=amd64
ARG CNI_PLUGINS_VERSION=v0.9.1
RUN apk add --no-cache curl && \
diff --git a/Makefile b/Makefile
index 40a57209..76516c95 100... | 9 | 8 | 1 | [{"id": "G0", "claim": "The doc comment on the new Endpoint.Equal method should read '// Equal compares two endpoints.' instead of '// Equal compare to endpoints'.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Move the discovered-endpoints collec... | null |
squat__kilo__149 | squat/kilo | 149 | defect | 166094b5ad29d589dbbd7b2dfb640710c81defdc | ca7788f25be8fcc71f22ad76380096880c44d016 | Use LatestHandshake to validate endpoint | This will allow using more complex heuristics to select a nat endpoint. | diff --git a/Dockerfile b/Dockerfile
index 2ef11789..2b2402f5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
ARG FROM=alpine
-FROM alpine AS cni
+FROM $FROM AS cni
ARG GOARCH=amd64
ARG CNI_PLUGINS_VERSION=v0.9.1
RUN apk add --no-cache curl && \
diff --git a/Makefile b/Makefile
index 40a57209..76516c95 100... | 3 | 2 | 1 | [{"id": "G0", "claim": "Now that applyTopology uses ParseDump and ShowDump replaces ShowConf, the old Parse() and ShowConf() functions are no longer needed and could be removed.", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "ParseDump silently ign... | null |
squat__kilo__179 | squat/kilo | 179 | defect | 28d93fba90c9bba493be54fe42887c0eceb5e360 | 9582f0e79671f224bd2178791c22a636a9d641f6 | pkg/: FEATURE: support allowed IPs outside a cluster | Users can specify IPs with the annotation "allowed-location-ips".
It makes no difference which node of a location is annotated.
The IP should be routable from the particular location, e.g. a printer in
the same LAN.
This way these IPs become routable from other location.
Signed-off-by: leonnicolas <leonloechner@... | diff --git a/pkg/k8s/backend.go b/pkg/k8s/backend.go
index 1883d159..22c143c2 100644
--- a/pkg/k8s/backend.go
+++ b/pkg/k8s/backend.go
@@ -62,6 +62,7 @@ const (
persistentKeepaliveKey = "kilo.squat.ai/persistent-keepalive"
wireGuardIPAnnotationKey = "kilo.squat.ai/wireguard-ip"
discoveredEndpointsKey ... | 10 | 9 | 1 | [{"id": "G0", "claim": "The POSTROUTING jump rule should be emitted only for allowedLocationIPs that belong to the same segment as this kg instance, to prevent packets from being NATed up to three times (source machine, source location leader, allowed-IP location leader).", "category": "correctness", "verdict": "suppor... | null |
squat__kilo__31 | squat/kilo | 31 | defect | a6afc3247d3af20f12a8a4f771d739fb84ece94a | 331c225c36b5586a199efa425d970c4eab4b1228 | Define WireGuard PersistentKeepAlive via Annotation | This PR enables setting the WireGuard setting `PersistentKeepalive` through the annotation `kilo.squat.ai/persistent-keepalive` for a given node A.
kilo will then set the `PersistentKeepalive` value on all other nodes where node A is listed as a peer in the WireGuard configuration.
See #26. | diff --git a/pkg/k8s/backend.go b/pkg/k8s/backend.go
index 6af65c4f..66207355 100644
--- a/pkg/k8s/backend.go
+++ b/pkg/k8s/backend.go
@@ -56,6 +56,7 @@ const (
lastSeenAnnotationKey = "kilo.squat.ai/last-seen"
leaderAnnotationKey = "kilo.squat.ai/leader"
locationAnnotationKey = "kilo.squat... | 1 | 1 | 1 | [{"id": "G0", "claim": "The pull request is missing the keepalive field in two functions, AsPeer and PeerConf, and should add it there.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
squat__kilo__409 | squat/kilo | 409 | defect | 1607ea78e35b301cf1ef1729fcbb24dd7fe57aad | ce03df7083e7fb2b15c5e67ac80a83a6858e1b31 | fix(encapsulation): introduce Cilium support | ## Summary
- Rewrite Cilium encapsulator to use IPIP tunnels routed through Cilium's VxLAN overlay, preventing routing loops
- Each node autodiscovers its `cilium_host` IP and advertises it via `kilo.squat.ai/cilium-internal-ip` annotation
- Add `LocalIP()` method to `Encapsulator` interface for overlay IP autodiscover... | diff --git a/pkg/encapsulation/cilium.go b/pkg/encapsulation/cilium.go
index bfbb327a..20c2d4e7 100644
--- a/pkg/encapsulation/cilium.go
+++ b/pkg/encapsulation/cilium.go
@@ -17,95 +17,135 @@ package encapsulation
import (
"fmt"
"net"
- "sync"
"github.com/vishvananda/netlink"
+ "github.com/squat/kilo/pkg/ipr... | 4 | 4 | 1 | [{"id": "G0", "claim": "The reviewer asks why the address selection in LocalIP filters for IPv4 only, i.e. wants the rationale for the To4() check explained.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer asks whether the errors in LocalIP a... | null |
squid-cache__squid__113 | squid-cache/squid | 113 | defect | e7b08eec5b44ba887e7bed4a190a286896628922 | 3b6fc97a674d9f32c4d408b564dd13b9a9af3b8d | Moved peer*(ps_state) functions into ps_state renamed PeerSelector | No functionality changes intended (other than debug message variations).
Also polished related documentation and debug messages.
Also converted "struct _icp_common_t" into an icp_common_t class, to
make its forward declarations simple. As a side effect, removed
__cplusplus ifdefs, addressing an old TODO. | diff --git a/src/ICP.h b/src/ICP.h
index 2a4bd52518c..053f479d8cb 100644
--- a/src/ICP.h
+++ b/src/ICP.h
@@ -24,13 +24,12 @@
class HttpRequest;
/**
- \ingroup ServerProtocolICPAPI
- *
- * This struct is the wire-level header.
- * DO NOT add more move fields on pain of breakage.
+ * Wire-level ICP header.
+ * DO NOT... | 4 | 2 | 0 | [{"id": "G0", "claim": "The forward declarations ('pre-defines') in src/PeerSelectState.h should be alphabetically ordered as part of the class cleanup.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "Redundant parameter names in method declara... | null |
squid-cache__squid__330 | squid-cache/squid | 330 | defect | c002f0e785ea18df2594c841a9ee408725c502fe | ec85165e4fb0fb2dc2e9149eb0a858da1cd9d51b | Fix tls-min-version= being ignored | PeerOptions::parse() called parseOptions() only when 'options='
altered sslOptions instead of delaying the parse to context
creation. This missed the fact that for GnuTLS the tlsMinVersion
was also updating the sslOptions string rather than the
parsedOptions variable later in the configuration process.
Call pars... | diff --git a/src/security/PeerOptions.cc b/src/security/PeerOptions.cc
index c6857f478ac..10574cd140d 100644
--- a/src/security/PeerOptions.cc
+++ b/src/security/PeerOptions.cc
@@ -182,6 +182,7 @@ Security::PeerOptions::updateTlsVersionLimits()
if (sslOptions.isEmpty())
add.chop(1); // rem... | 1 | 1 | 0 | [{"id": "G0", "claim": "The parsedOptions handling should be redesigned: code should stop pretending parsedOptions stores the parsed \"options=...\" value, interpret/compile the configuration once right after the settings are parsed (at the directive parse sites, not deferred to updateContextOptions() and not re-done p... | null |
squid-cache__squid__51 | squid-cache/squid | 51 | defect | b1268cb4604b5baab9a33db4202d6b3c464ac56d | 8cc50d3b4f446e444ecf75734a992bf6a1733761 | Move TLS/SSL http_port config values from libanyp objects to libsecurity | These are most of the minor shuffling prerequisite for the proposal to allow generate-host-certificates to set a CA filename. These are required in libsecurity in order to prevent circular dependencies between libsecurity, libssl and libanyp.
Also contains some improvements to how configuration errors are displayed ... | diff --git a/src/anyp/PortCfg.cc b/src/anyp/PortCfg.cc
index 34659c49ab8..9a82d433b51 100644
--- a/src/anyp/PortCfg.cc
+++ b/src/anyp/PortCfg.cc
@@ -40,17 +40,6 @@ AnyP::PortCfg::PortCfg() :
vport(0),
disable_pmtu_discovery(0),
listenConn()
-#if USE_OPENSSL
- ,
- sslContextSessionId(NULL),
- gen... | 16 | 12 | 4 | [{"id": "G0", "claim": "The newly moved comparison of dynamicCertMemCacheSize against maximum size_t looks like a bug nobody understands, so an XXX comment should be added explaining it.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The 'contex... | null |
squirrelchat__smol-toml__8 | squirrelchat/smol-toml | 8 | defect | 3f9f4d1141e8407bc5bf5931d395d4ef4267886f | b667a2a8ec90dc0c9d74b008d20840d1035c69d0 | Fixes Non Traditional Spacing Errors during parsing. | Closes https://github.com/Swatinem/rust-cache/issues/167
This also updates the dependencies. | diff --git a/package.json b/package.json
index 28e5b40..c242065 100644
--- a/package.json
+++ b/package.json
@@ -25,13 +25,13 @@
"@iarna/toml": "3.0.0",
"@ltd/j-toml": "^1.38.0",
"@tsconfig/esm": "^1.0.3",
- "@tsconfig/node-lts": "^18.12.1",
- "@tsconfig/strictest": "^2.0.1",
- "@types/node": "^20.1.0",
- ... | 4 | 4 | 0 | [{"id": "G0", "claim": "The added code has stray or missing spaces that break the codebase's formatting (a leading space before function declarations in src/error.ts, no spaces inside the import braces in src/struct.ts, and '}else if' in src/util.ts).", "category": "maintainability", "verdict": "supported", "priority":... | null |
srdja__Collections-C__101 | srdja/Collections-C | 101 | defect | e6a8c05197d17e385259c389f5ccddf2725e2bb5 | 23764d8c116712a2d72f22af5ef7746930051ef4 | Added Ring Buffer | If anything I wrote in the API seems off to you, or you feel as if the formatting is off, or you feel as if the tests require some more additions, then feel free to suggest changes to me. | diff --git a/src/include/ring_buffer.h b/src/include/ring_buffer.h
new file mode 100644
index 0000000..6fa3afc
--- /dev/null
+++ b/src/include/ring_buffer.h
@@ -0,0 +1,45 @@
+/**
+ * @Author: S. Sharma <silentcat>
+ * @Date: 2019-03-07T10:32:52-06:00
+ * @Email: silentcat@protonmail.com
+ * @Last modified by: sile... | 12 | 12 | 4 | [{"id": "G0", "claim": "rbuf_is_empty should return bool instead of int.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The struct definition should be moved to the .c file so the ring buffer implementation is opaque.", "category": "design", "verdict": "... | null |
srdja__Collections-C__85 | srdja/Collections-C | 85 | defect | ed0eae0bd8053201ad48e75cde5eede633a0faf3 | ebba5aed115aa008f4f1b92d4a110db857212bed | Add the functionality of PriorityQueue | This is it, I made this PR again, as the previously i made some mistakes in repositiory, and in this repo i added the tests for the PQueue | diff --git a/AUTHORS b/AUTHORS
index cb77b8d..463dcfc 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -8,3 +8,4 @@ xfilesee
Joël Jungo
Adam Canady
Venkata Krishna Sundararajan
+Nimit Bhardwaj
diff --git a/src/array.c b/src/array.c
index ed974ef..dfb0cf8 100644
--- a/src/array.c
+++ b/src/array.c
@@ -244,6 +244,17 @@ enum cc_s... | 4 | 3 | 1 | [{"id": "G0", "claim": "pqueue should not install a default comparator but require the user to provide one at creation time, as treetable does, so the user cannot forget to set the proper comparator.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The tri... | null |
srishanbhattarai__nepcal__20 | srishanbhattarai/nepcal | 20 | defect | 9d93062a38b781ef84fdc09150b194479ce66792 | 2115cea7eb2e585e68f68572d6d4fda2b039afd2 | Get total number of days in a BS year | * Added a function to retrieve total number of days in a particular BS year
* Added tests for the new function
This is a nice addition to the `dateconv` package even though it isn't really needed for AD to BS conversion.
Another motive for this PR is that I need this in something that I'm working on. 😆 | diff --git a/dateconv/dateconv.go b/dateconv/dateconv.go
index 088b052..f599a3e 100644
--- a/dateconv/dateconv.go
+++ b/dateconv/dateconv.go
@@ -3,6 +3,7 @@
package dateconv
import (
+ "fmt"
"time"
)
@@ -72,6 +73,22 @@ func BsDaysInMonthsByYear(yy int, mm time.Month) (int, bool) {
return months[query], true
... | 3 | 3 | 0 | [{"id": "G0", "claim": "The boolean check should use Go's negation shorthand instead of `ok == false`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `sum` variable should be initialized right above the `for` loop rather than at the top of t... | null |
srishanbhattarai__nepcal__28 | srishanbhattarai/nepcal | 28 | defect | dd85435ee7db8fd3a564281937e265c1bf0fa7be | 1851577c8c0cd6f20718d007538a45a44b52fe5c | Add function to calculate total number of days spanned in current year | * Added a new function `TotalDaysSpanned` to dateconv util
* Added tests
**Note:** A private function `totalDaysSpannedUntilDate` has been created so that we can easily pass any `time.Time` value from the test file. | diff --git a/dateconv/dateconv.go b/dateconv/dateconv.go
index 06fd6e5..2a4d71a 100644
--- a/dateconv/dateconv.go
+++ b/dateconv/dateconv.go
@@ -134,6 +134,32 @@ func TotalDaysInBSYear(year int) (int, error) {
return sum, nil
}
+// now returns the current time
+var now = func() time.Time {
+ return time.Now()
+}
+... | 4 | 4 | 1 | [{"id": "G0", "claim": "In TotalDaysSpanned line 146 should be blank instead, and in general each `if !ok`/`if err != nil` handler should be grouped with its respective initialization.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "`sum` in Tota... | null |
srl-labs__containerlab__1013 | srl-labs/containerlab | 1,013 | defect | adc0bb624d2d0f28a06aab59200474736d595359 | 83b640ac3e021a4c2827c30f5ee2870b0c757af0 | Shared namespace dependency | On top of #976 this implements the dependencies for the "network-mode: container:<CONTAINERNAME>" based dependency. | diff --git a/Makefile b/Makefile
index 848c831bdd..1824b648f7 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,17 @@ build-with-podman:
test:
go test -race ./... -v
+MOCKDIR = ./mocks
+.PHONY: mocks-gen
+mocks-gen: mocks-rm ## Generate mocks for all the defined interfaces.
+ go install github.com/golang/mock/mock... | 2 | 1 | 0 | [{"id": "G0", "claim": "It would be much nicer to have a feature to \"wait\" for a dependency container (such as the external Kind containers), so that the Kind deployment and the Containerlab deployment do not have to be serialized and total deployment time is sped up.", "category": "design", "verdict": "uncertain", "... | null |
srl-labs__containerlab__1298 | srl-labs/containerlab | 1,298 | defect | 7640c0c3bee914ccd80ae256ec2b6b321f799892 | a4ee099da44891bd39239559c53b12d51a898392 | Node filtering | This is the continuation of #1296
fix #1295 | diff --git a/clab/clab.go b/clab/clab.go
index cd9b962af2..df46625ae8 100644
--- a/clab/clab.go
+++ b/clab/clab.go
@@ -22,6 +22,7 @@ import (
"github.com/srl-labs/containerlab/runtime/docker"
"github.com/srl-labs/containerlab/runtime/ignite"
"github.com/srl-labs/containerlab/types"
+ "k8s.io/utils/strings/slices"... | 2 | 1 | 0 | [{"id": "G0", "claim": "The pull request should not import k8s.io/utils/strings/slices because the repository already contains the needed Contains helper (internal/slices/slices.go).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "It would be goo... | null |
srl-labs__containerlab__1402 | srl-labs/containerlab | 1,402 | defect | fd7e0b4fe9ca86a7e395a60123013c73c6b48876 | 308e25277c4754c3bc42bf291993b1b806bf5ef6 | MACVLAN interfaces | This is to support macvlan and macvtap interfaces in the endpoint section of the topology definition.
```
links:
- endpoints: ["l1:eth1", "macvlan:enp4s0f0"]
- endpoints: ["l1:eth2", "macvtap:enp4s0f0"]
```
This PR fixes #1393.
from @hellt: I removed macvtap support in [b5dbaf4](https://github.com/sr... | diff --git a/clab/config.go b/clab/config.go
index 792d2f1a1d..922e9d4080 100644
--- a/clab/config.go
+++ b/clab/config.go
@@ -375,6 +375,18 @@ func (c *CLab) NewEndpoint(e string) *types.Endpoint {
ShortName: "host",
NSPath: hostNSPath,
}
+ case "macvlan":
+ endpoint.Node = &types.NodeConfig{
+ Kind: ... | 4 | 2 | 1 | [{"id": "G0", "claim": "The link wiring should move away from the simple two-element endpoint format toward a more formal structure with a dedicated endpoint type and less procedural lab wiring.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The new ma... | null |
srl-labs__containerlab__1551 | srl-labs/containerlab | 1,551 | defect | 12f8fc5b2bb095c6d3eb1b9ccd0510bd968033cc | b9e0d96c3c61299464a3ced7d51ad2833d73b358 | add suppress-startup-config | fix #1548
- [x] tests | diff --git a/clab/config.go b/clab/config.go
index 2f8d7bffc2..5bf97c5413 100644
--- a/clab/config.go
+++ b/clab/config.go
@@ -226,6 +226,7 @@ func (c *CLab) createNodeCfg(nodeName string, nodeDef *types.NodeDefinition, idx
}
nodeCfg.EnforceStartupConfig = c.Config.Topology.GetNodeEnforceStartupConfig(nodeCfg.Sho... | 5 | 4 | 1 | [{"id": "G0", "claim": "SuppressStartupConfig must be defined as a bool pointer with yaml omitempty (nil = unset, so a more specific level can explicitly override an inherited true) and the evaluation in GetNodeSuppressStartupConfig must be adjusted accordingly.", "category": "design", "verdict": "supported", "priority... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.