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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Yelp__detect-secrets__207 | Yelp/detect-secrets | 207 | defect | 13575ede7f9d6f7cb17ac317a19ec5060c97170b | 4310fa9714d22809428b85d37c18980d5b68d83d | Improve sequential string detection | * Ensure that we catch all base64 strings correctly
* Add an explicit check for alphanumeric sequences
* Add some more tests for sequential string detection
Fixes #200 | diff --git a/detect_secrets/plugins/common/filters.py b/detect_secrets/plugins/common/filters.py
index 6c2dda9c3..3a5e079db 100644
--- a/detect_secrets/plugins/common/filters.py
+++ b/detect_secrets/plugins/common/filters.py
@@ -21,17 +21,31 @@ def is_sequential_string(secret):
Returns true if string is sequential... | 1 | 1 | 0 | [{"id": "G0", "claim": "The added test comment `alphanumeric sequences` should be capitalized like the other test comments (e.g. `Number sequences`).", "category": "style", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
Yelp__detect-secrets__223 | Yelp/detect-secrets | 223 | defect | 99528d44e41a6021b0b14cf731da91fdc4a18181 | 65e126c38d20e67296a4e5d2952b5209f41cd9ad | Handle binary values in YAML files | (WIP as of writing)
This is step (1) in supporting binary in both YAML and non-YAML files.
This makes it so that instead of immediately converting the base64-encoded binary into a binary value in python, we just interpret the binary as a normal string, but annotate it as such with the `is_binary` flag.
This is... | diff --git a/detect_secrets/plugins/common/yaml_file_parser.py b/detect_secrets/plugins/common/yaml_file_parser.py
index 2e6902064..6279808f3 100644
--- a/detect_secrets/plugins/common/yaml_file_parser.py
+++ b/detect_secrets/plugins/common/yaml_file_parser.py
@@ -16,7 +16,7 @@ class YamlFileParser(object):
Theref... | 4 | 2 | 0 | [{"id": "G0", "claim": "The added condition would be prettier written as `if not (value.tag.endswith(':str') or value.tag.endswith(':binary'))` instead of two `and not` clauses.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The `_create_key_val... | null |
Yelp__detect-secrets__239 | Yelp/detect-secrets | 239 | defect | 9be87637312774fd364bb29b0443a0c06bfb979e | 822a1fa128a67848f94b44ba3980aaf110758a93 | JWT Detector Plugin | # New plugin checking for JWTs
## Motivation
The current high entropy base64 string checker would not find JWTs because they contain dots too. JWTs are more and more widespread - one very good example is Kubernetes API server tokens. The following very typical way of using detect-secrets for example would not detec... | diff --git a/README.md b/README.md
index 26758ae94..785731efa 100644
--- a/README.md
+++ b/README.md
@@ -162,6 +162,8 @@ The current heuristic searches we implement out of the box include:
* **RegexBasedDetector**: checks for any keys matching certain regular expressions (Artifactory, AWS, Slack, Stripe, Mailchimp).... | 1 | 1 | 0 | [{"id": "G0", "claim": "A `?` should be added after the trailing `*` in the JWT denylist regex to make it non-greedy, which the reviewer believes makes it more efficient.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Yelp__detect-secrets__245 | Yelp/detect-secrets | 245 | defect | 4e6850d07ec96a393bc7a2fe8e62d755e35b3bd3 | 7e35a3f15e7b414c920a48a4e1ca54d212d7026c | Support url-safe base64 secrets | This updates the base64 plugin to support url-safe plugins by just adding `-` and `_` to the charset. However, this won't be merged until I add some additional functionality to reduce noise. | diff --git a/detect_secrets/plugins/high_entropy_strings.py b/detect_secrets/plugins/high_entropy_strings.py
index ee3ce363d..78a878f8c 100644
--- a/detect_secrets/plugins/high_entropy_strings.py
+++ b/detect_secrets/plugins/high_entropy_strings.py
@@ -330,8 +330,15 @@ class Base64HighEntropyString(HighEntropyStringsPl... | 5 | 4 | 0 | [{"id": "G0", "claim": "Capitalize the inline comments in the Base64HighEntropyString charset block (e.g. `# regular base64` -> `# Regular base64`).", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Expanding the base64 charset with '-' and '_' makes... | null |
Yelp__detect-secrets__254 | Yelp/detect-secrets | 254 | defect | 5706eb1076ca286b4357ba34fac33d6df672f0bc | 8b8b9d7450740df952c14ebc390e13932c3883b1 | Add Detector for Softlayer tokens | Add Detector for Softlayer tokens, it supports looking for 2 factors: username and password. It also supports verification. | diff --git a/README.md b/README.md
index ed549a3f1..ea78f93a1 100644
--- a/README.md
+++ b/README.md
@@ -164,6 +164,8 @@ The current heuristic searches we implement out of the box include:
* **JwtTokenDetector**: checks for formally correct JWTs.
+* **SoftlayerDetector**: checks for Softlayer tokens.
+
See [detec... | 5 | 5 | 0 | [{"id": "G0", "claim": "The assign_regex_generator docstring has a grammar error: 'It read 3 input parameters' should be 'It reads 3 input parameters'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Consider renaming password_keyword_regex and pas... | null |
Yelp__detect-secrets__263 | Yelp/detect-secrets | 263 | defect | ff95000ae20fd7f1b71c834d1a2e82edf0fedfaa | 7ac4d51108785bcda1dcd44fde6237935f18840f | Add plugin for IBM Cloud Object Storage HMAC | Add plugins to detect the [HMAC credential](https://cloud.ibm.com/docs/services/cloud-object-storage/hmac?topic=cloud-object-storage-hmac) for IBM Cloud Object Storage. | diff --git a/detect_secrets/plugins/ibm_cos_hmac.py b/detect_secrets/plugins/ibm_cos_hmac.py
new file mode 100644
index 000000000..705d338c7
--- /dev/null
+++ b/detect_secrets/plugins/ibm_cos_hmac.py
@@ -0,0 +1,163 @@
+from __future__ import absolute_import
+
+import datetime
+import hashlib
+import hmac
+
+import requ... | 1 | 1 | 0 | [{"id": "G0", "claim": "The `is True` comparison in `verify` is unnecessary and should be dropped.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
Yelp__detect-secrets__287 | Yelp/detect-secrets | 287 | defect | 79dad492d52daeec791f6748733c8c61b6498f9c | 849ebaad4f41de97ac59f90036cce38b7350c675 | Supporting multiword adhoc string scans | ## Issue
I wanted to perform an adhoc scan for a line of code, using the `scan --string` option. However, I came across this strange behavior:
```
$ detect-secrets scan --string 'aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1vSGc1U0pZUkhBMA=='
Base64HighEntropyString: True (5.023)
$ detect-secrets scan --string ... | diff --git a/detect_secrets/plugins/high_entropy_strings.py b/detect_secrets/plugins/high_entropy_strings.py
index e9f13416c..c4e968b6c 100644
--- a/detect_secrets/plugins/high_entropy_strings.py
+++ b/detect_secrets/plugins/high_entropy_strings.py
@@ -144,7 +144,7 @@ def secret_generator(self, string, *args, **kwargs)... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add a comment noting that there can only be 1 secret in the results.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
Yelp__detect-secrets__347 | Yelp/detect-secrets | 347 | defect | 624024ad5fd8a608e09ed719e5edab6ca95ef47e | b041151622bacc5e04c14a12faeb0c2ca7c3cf9c | Add npm detector | Add a new detector which searches for NPM auth tokens.
It detects NPM auth tokens which are probably written in .npmrc.
```
//registry.npmjs.org/:_authToken=foobar
``` | diff --git a/detect_secrets/plugins/npm.py b/detect_secrets/plugins/npm.py
new file mode 100644
index 000000000..9d7fcfcc2
--- /dev/null
+++ b/detect_secrets/plugins/npm.py
@@ -0,0 +1,17 @@
+"""
+This plugin searches for NPM tokens
+"""
+import re
+
+from detect_secrets.plugins.base import RegexBasedDetector
+
+
+class... | 1 | 1 | 0 | [{"id": "G0", "claim": "Change the test's analyze_line call to keyword arguments (filename='mock_filename', line=payload) so the PR can be merged into the pre-v1-launch branch and reduce merge conflicts with the architecture revamp.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"... | null |
Yelp__detect-secrets__377 | Yelp/detect-secrets | 377 | defect | 93df579d16dbc6b57a150a9f01eae472d3aa1130 | 264248a1488f1f1fe69efbd91664934e03ec6512 | Migrating Keyword False Positives | `KeywordDetector` had a variety of different false positive heuristics that only applied to `KeywordDetector`. This PR moves it to the new filters architecture.
It also drops support for a hard-coded list of false positives (e.g. `fake`) given that we have `detect_secrets.filters.wordlist`. | diff --git a/detect_secrets/core/upgrades/v1_0.py b/detect_secrets/core/upgrades/v1_0.py
index 963cbddb0..24bd6580c 100644
--- a/detect_secrets/core/upgrades/v1_0.py
+++ b/detect_secrets/core/upgrades/v1_0.py
@@ -36,6 +36,15 @@ def _migrate_filters(baseline: Dict[str, Any]) -> None:
{
'path': 'det... | 3 | 3 | 1 | [{"id": "G0", "claim": "Remove the duplicated `$`-prefix check from `is_templated_secret`, since it was copied into the new `is_prefixed_with_dollar_sign` filter.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a test case for `secret= ${hunt... | null |
Yelp__detect-secrets__38 | Yelp/detect-secrets | 38 | defect | f5de147065a3e6720e722347101dc408b64d042c | e4cf46a9abfb55a34304b0c9f0c935c0f28a4ccb | Adding version in baseline | Fixes https://github.com/Yelp/detect-secrets/issues/37. | diff --git a/.coveragerc b/.coveragerc
index a5a419f56..07047fea5 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -11,6 +11,9 @@ exclude_lines =
# Don't complain if non-runnable code isn't run:
^if __name__ == ['"]__main__['"]:$
+ # Don't complain if performing logic for cross-version functionality
+ ^\... | 1 | 1 | 1 | [{"id": "G0", "claim": "When the baseline version check throws ValueError, the pre-commit hook shows the user no error message.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
Yelp__detect-secrets__387 | Yelp/detect-secrets | 387 | defect | 93df579d16dbc6b57a150a9f01eae472d3aa1130 | adc835d50a5ea2fc5f37593ae4b4aa9a3501affc | Reporting feature | This feature allows to generate reports that include all the detected secrets details. This feature can be executed with the option `--report` of the `audit` command. The generated reports include the following fields for each detected secret:
- `class`: class associated to the secret. It can be `TRUE_POSITIVE`, `FA... | diff --git a/detect_secrets/audit/__init__.py b/detect_secrets/audit/__init__.py
index a3f9e1c9b..9e1dbdbb4 100644
--- a/detect_secrets/audit/__init__.py
+++ b/detect_secrets/audit/__init__.py
@@ -1,3 +1,4 @@
from . import analytics # noqa: F401
+from . import report # noqa: F401
fr... | 15 | 15 | 8 | [{"id": "G0", "claim": "generate_report should return the report string instead of printing it, so the caller can print it and the function can be tested directly without mocking stdout.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The report should it... | null |
Yelp__detect-secrets__391 | Yelp/detect-secrets | 391 | defect | 93df579d16dbc6b57a150a9f01eae472d3aa1130 | d4c468ea9149e4cc47bb0df86f417e3db47223f9 | Multiple filters support and secret filter by regex | This Pull Request includes the following features:
- Support for multiple filters: it allows multiple occurrences of the CLI options `--exclude-lines` and `--exclude-files`. The user can apply multiple regexes to filter the output of detect-secrets.
- New `secret` filter by regex: it could be interesting to discard... | diff --git a/detect_secrets/core/usage/filters.py b/detect_secrets/core/usage/filters.py
index d1f4e69cf..ef545c9d5 100644
--- a/detect_secrets/core/usage/filters.py
+++ b/detect_secrets/core/usage/filters.py
@@ -31,13 +31,21 @@ def add_filter_options(parent: argparse.ArgumentParser) -> None:
parser.add_argument(
... | 3 | 3 | 3 | [{"id": "G0", "claim": "The new filter functionality needs to be documented in the filters documentation (docs/filters.md) before the pull request can be merged.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Because the pull request adds a new fl... | null |
Yelp__detect-secrets__397 | Yelp/detect-secrets | 397 | defect | 93df579d16dbc6b57a150a9f01eae472d3aa1130 | 24d08e6dd265f424641fe8b3c9965dd59388d2ca | New AWS regex | This pull request includes a new regex to the `AWS Key Detector` plugin. The regex is found [here](https://github.com/l4yton/RegHex#aws-secret-key). | diff --git a/detect_secrets/plugins/aws.py b/detect_secrets/plugins/aws.py
index 0d1604174..c24d0ecf6 100644
--- a/detect_secrets/plugins/aws.py
+++ b/detect_secrets/plugins/aws.py
@@ -24,6 +24,7 @@ class AWSKeyDetector(RegexBasedDetector):
denylist = (
re.compile(r'AKIA[0-9A-Z]{16}'),
+ re.compi... | 2 | 2 | 1 | [{"id": "G0", "claim": "A test case should formalize the new AWS regex's behaviour (including variable-name matching), and the test should assert that the detected secret_value is the expected one, since the regex's extra capturing groups may interact badly with the rest of the system (including audit).", "category": "... | null |
Yelp__detect-secrets__40 | Yelp/detect-secrets | 40 | defect | f5de147065a3e6720e722347101dc408b64d042c | 0856f0bfc6c3cf2fc254098a0329cccfafbbc68a | Fix "pre-commit hook removes plugins from baseline" | This fixes the issue @LouisTrezzini reported in https://github.com/Yelp/detect-secrets/issues/32 where we would not read in or output plugin information when reading a baseline from the pre-commit hook code. | diff --git a/detect_secrets/core/secrets_collection.py b/detect_secrets/core/secrets_collection.py
index eaea44432..dca4fcb58 100644
--- a/detect_secrets/core/secrets_collection.py
+++ b/detect_secrets/core/secrets_collection.py
@@ -12,6 +12,7 @@
from detect_secrets.core.log import CustomLog
from detect_secrets.cor... | 3 | 2 | 0 | [{"id": "G0", "claim": "Requiring the new `plugins_used` key when loading a baseline is a breaking change for baselines written before that field existed, acceptable only if bundled with PR #38 before the next version is cut.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id... | null |
Yelp__detect-secrets__417 | Yelp/detect-secrets | 417 | defect | 37e9f30c76a516174993c73d15716a0f6d5037df | 482fa588a6b138c8650115cfaf5317fffa9fba35 | adding is_lock_file filter | ## Summary
Lock files typically have hashes in them, and this triggers a lot of false positives for our high entropy string plugins. We've seen success in just ignoring them, so let's formalize it. | diff --git a/.secrets.baseline b/.secrets.baseline
index 60ba42835..913fe4a30 100644
--- a/.secrets.baseline
+++ b/.secrets.baseline
@@ -251,9 +251,9 @@
"filename": "docs/filters.md",
"hashed_secret": "4566d0493d8a9b7a811728e852ed5df95fa70dd2",
"is_verified": false,
- "line_number": 55... | 2 | 2 | 2 | [{"id": "G0", "claim": "The filter lists `package.lock`, which is a typo for npm's real lock file name `package-lock.json`.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The lock-file set is missing other common lock files the reviewer has seen: `P... | null |
Yelp__detect-secrets__420 | Yelp/detect-secrets | 420 | defect | ab844fe2fec18d7bbb26cb342c32331cf7ca83e3 | 4298cb91e42c8de1f6c075fb12d3d97ca5557234 | Secret regex bugfix & suffix and prefix support | ## Secret regex bugfix
The performance bug described by @domanchi in #418 has been fixed. The bug happens when the PRECEDED_BY_EQUAL_COMPARISON_SIGNS_QUOTES_REQUIRED_REGEX regex is checked in files with long lines that includes many quotes. The regex engine must check a lot of combinations to determine the line sect... | diff --git a/detect_secrets/plugins/keyword.py b/detect_secrets/plugins/keyword.py
index d4d553d70..cd38346e4 100644
--- a/detect_secrets/plugins/keyword.py
+++ b/detect_secrets/plugins/keyword.py
@@ -52,57 +52,73 @@
)
# Includes ], ', " as closing
CLOSING = r'[]\'"]{0,2}'
+AFFIX_REGEX = r'\w*'
DENYLIST_REGEX = r'|... | 3 | 3 | 0 | [{"id": "G0", "claim": "Rename the misspelled `DENYLIST_REGEX_WITH_PREFFIX` variable (and its `preffix` format keyword argument) to use `prefix`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Fix the misspelled `# Preffix` / `# Preffix/suffix` ... | null |
Yelp__detect-secrets__429 | Yelp/detect-secrets | 429 | defect | 5ffc17d91e5910abd0c564cf43a4c11fb24915d9 | ee60f969842d1847a94d9f4edfe168c5dc029d4f | Support for C, C++ and C# secrets in Keyword plugin | This Pull Request introduces some regex in the KeywordDetector plugin to detect secrets in C, C++ and C# files. Some examples of this secrets are:
**C**:
`char* password = "foo";`
`char password[25] = "foo";`
**C++**:
`string secret = "foo";`
`std::string secret("foo");`
`secret.assign("foo",17);`
**C#**:... | diff --git a/detect_secrets/plugins/keyword.py b/detect_secrets/plugins/keyword.py
index 5bdbab027..da0daa5d2 100644
--- a/detect_secrets/plugins/keyword.py
+++ b/detect_secrets/plugins/keyword.py
@@ -84,7 +84,7 @@
# line breaks, comma, backticks or quotes. This allows to reduce the false
# ... | 1 | 1 | 0 | [{"id": "G0", "claim": "The newly added C++ regex variable is misspelled FOLLOWEB_BY_OPTIONAL_ASSIGN_QUOTES_REQUIRED_REGEX and should be renamed to FOLLOWED_BY_OPTIONAL_ASSIGN_QUOTES_REQUIRED_REGEX, including its use in C_PLUS_PLUS_REGEX_TO_GROUP.", "category": "maintainability", "verdict": "supported", "priority": "P2... | null |
Yelp__detect-secrets__442 | Yelp/detect-secrets | 442 | defect | 4659023128840b0afc158d11fbd923143ad20d97 | 37f12f2c3460f189907ce9383ea772761e086584 | Secret regex correction | This Pull Request solves the bug commented in #418.
I also add a test case with a long line proposed by @domanchi to check the `KeywordDetector` performance in the unit tests and prevent future performance bugs in this plugin. Note that this test case introduces a little delay in the test execution, but I think that... | diff --git a/detect_secrets/plugins/keyword.py b/detect_secrets/plugins/keyword.py
index 4002e8c03..5bdbab027 100644
--- a/detect_secrets/plugins/keyword.py
+++ b/detect_secrets/plugins/keyword.py
@@ -70,10 +70,10 @@
OPTIONAL_NON_WHITESPACE = r'[^\s]{0,50}?'
QUOTE = r'[\'"`]'
# Secret regex details:
-# [^\v\'"]* ... | 1 | 1 | 1 | [{"id": "G0", "claim": "The LONG_LINE test string should embed the new lines with an unterminated quote and HTML tag, since they could break regexes that assume properly terminated quotes and HTML tags.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
Yelp__detect-secrets__5 | Yelp/detect-secrets | 5 | defect | 67084c009b221a5b9210e87c3a019cf31ae28b31 | cbc00c3dd2fa0123c0d5f8d693506c14e8f32b91 | Use git ignore in repo scan | ### Description
**Issue:** `detect-secrets` did not consider `.gitignore` files. This means that every time you run it on a repo, you have to manually `--exclude` a whole bunch of directories (eg. `venv`).
This gets annoying, real fast.
This method doesn't use `.gitignore`, but instead uses all currently track... | diff --git a/detect_secrets/core/baseline.py b/detect_secrets/core/baseline.py
index ddeb9ff20..1768f2712 100644
--- a/detect_secrets/core/baseline.py
+++ b/detect_secrets/core/baseline.py
@@ -3,6 +3,7 @@
import os
import re
+import subprocess
from detect_secrets.core.secrets_collection import SecretsCollection
... | 2 | 2 | 1 | [{"id": "G0", "claim": "Computing filename_key as `file[len(rootdir) + 1:]` looks wrong, because git ls-files returns paths relative to the git root independent of rootdir — e.g. with rootdir '.' the key for 'foo/bar/__init__.py' would come out as 'o/bar/__init__.py' rather than the path relative to the scanned directo... | null |
Yelp__detect-secrets__501 | Yelp/detect-secrets | 501 | defect | b914bb656f71a9baf7c6b3a713d4a8a1eb8f4436 | 61eb62a8fa798b1da8bf70b47640ccfa673b72e6 | Bug Fix: Fix Inline Dictionary For YAML Files | ## Problem
- When running detect-secrets on YAML files - there is a miscalculation that occurs when calculating the line number of an inline dictionary (FlowMapping).
- This is an issue with the PyYAML library.
- This issue occurs when there is an empty line after the inline dictionary.
- An example of where the ... | diff --git a/README.md b/README.md
index 8ee65afab..e4f411b26 100644
--- a/README.md
+++ b/README.md
@@ -83,7 +83,7 @@ $ git diff --staged --name-only -z | xargs -0 detect-secrets-hook --baseline .se
**Scanning All Tracked Files:**
```bash
-$ git ls-files -z | xargs -0 detect-secrets-hook --baseline .secrets.baseli... | 3 | 3 | 0 | [{"id": "G0", "claim": "Add comments explaining what the new _parse_flow_mapping_key_shim code does.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Assigning the bool via an if/else could be replaced by assigning the condition expression directly,... | null |
Yelp__detect-secrets__512 | Yelp/detect-secrets | 512 | defect | 2f4f956e4fa3610efeeeb989b3ef11df9a171011 | e27e736bfac9484b180f86c1d974f3e7ae285513 | Bug Fix: Yaml Line Numbering Empty Mapping Fix | # Problem
- When we have an empty mapping (dictionary) included in a file - the line numbering of the file is off
- It is specifically off by `actual line number - 1`
- The issue here is that the only time we parse a flow mapping key for an empty mapping is once. (At function `_parse_flow_mapping_key_shim`)
- When ... | diff --git a/detect_secrets/transformers/yaml.py b/detect_secrets/transformers/yaml.py
index 5b07823fa..1b67f7c3f 100644
--- a/detect_secrets/transformers/yaml.py
+++ b/detect_secrets/transformers/yaml.py
@@ -221,6 +221,7 @@ def _compose_node_shim(
node.__line__ = line + 1
if node.tag.endswith(':map... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add a code comment at the is_inline_flow_mapping_key reset in detect_secrets/transformers/yaml.py carrying the explanation currently only in the PR description.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Yelp__detect-secrets__526 | Yelp/detect-secrets | 526 | defect | 70e6cf69f2d544a49729039a374d86d7b3e472d9 | d10925d0ccf17cb0e8007bfbe1dbb66ebe8989ca | Make is_likely_id_string More Strict | Issue: [489](https://github.com/Yelp/detect-secrets/issues/489)
Problem:
- The `is_likely_id_string` regex can eliminate true positives by mistake.
- Ex. Anything ending in `id` like the name `david` followed by a non-letter/non-numeric character will match
Solution:
- Make the regex more strict to identify id... | diff --git a/detect_secrets/filters/heuristic.py b/detect_secrets/filters/heuristic.py
index a6660a1db..9ffa764df 100644
--- a/detect_secrets/filters/heuristic.py
+++ b/detect_secrets/filters/heuristic.py
@@ -68,7 +68,7 @@ def is_likely_id_string(secret: str, line: str) -> bool:
@lru_cache(maxsize=1)
def _get_id_de... | 2 | 1 | 1 | [{"id": "G0", "claim": "The new id-detector regex does not enforce the plural form of id (e.g. `ids` or `my_ids`), so such lines would not be filtered out as id strings; the reviewer asks whether it is worth including the plural form.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "intr... | null |
Yelp__detect-secrets__578 | Yelp/detect-secrets | 578 | defect | b37f90b1a8f197e46a6c805095b52ce00f9d8158 | 936c4402cda1337e0467435565c739559e7645f1 | Fix is_verified not stored in PotentialSecret | Problem:
- `is_verified` flag does not get stored in PotentialSecret which results in its value being always `false`.
- This problem didn't affect `--only-verified` flag because verification was running but not persisted.
Solution:
- When a secret is found, run `verify` method and store the result within `Po... | diff --git a/detect_secrets/core/scan.py b/detect_secrets/core/scan.py
index b9e70e92b..0dfd57a45 100644
--- a/detect_secrets/core/scan.py
+++ b/detect_secrets/core/scan.py
@@ -17,6 +17,7 @@
from ..types import NamedIO
from ..types import SelfAwareCallable
from ..util import git
+from ..util.code_snippet import Code... | 6 | 3 | 1 | [{"id": "G0", "claim": "All parameters of the calls in _scan_for_allowlisted_secrets_in_lines should be specified as keyword arguments (e.g. line=line), as already done for context.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The detect_secre... | null |
Yelp__detect-secrets__614 | Yelp/detect-secrets | 614 | defect | e61b9f988ce43abbe49aafa43d819fa88596a346 | d66a988a09e604e2c3df2bb1472e1db1f43ef05a | Add Discord Bot token detector | Closes #613 | diff --git a/README.md b/README.md
index ac101893e..a5ba479c3 100644
--- a/README.md
+++ b/README.md
@@ -96,6 +96,8 @@ AWSKeyDetector
AzureStorageKeyDetector
BasicAuthDetector
CloudantDetector
+DiscordBotTokenDetector
+GitHubTokenDetector
Base64HighEntropyString
HexHighEntropyString
IbmCloudIamDetector
@@ -105,8 ... | 2 | 2 | 1 | [{"id": "G0", "claim": "The pull request should also add failure test cases (tokens that must not be flagged) for the new DiscordBotTokenDetector, which at S1 is tested only with matching tokens.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G4", "claim": "The denyli... | null |
Yelp__detect-secrets__619 | Yelp/detect-secrets | 619 | defect | 7266a855d0849956a45796ef64627b709ee0bcb9 | a87b33c5919c2d8e563289ab72c8bcafa3591754 | #588: Update Report Output for Easier Parsing | Problem:
- It is difficult to parse things as a list versus object
Solution:
- Update report output to be a object instead of list with the following format
```
{
results: [ ... ]
}
``` | diff --git a/detect_secrets/audit/report.py b/detect_secrets/audit/report.py
index ce1536b04..6986dd33e 100644
--- a/detect_secrets/audit/report.py
+++ b/detect_secrets/audit/report.py
@@ -28,7 +28,7 @@ def generate_report(
baseline_file: str,
class_to_print: SecretClassToPrint = None,
line_getter_factor... | 1 | 1 | 0 | [{"id": "G0", "claim": "Change the generate_report return annotation from Dict[str, List[Any]] to Dict[str, List[Dict[str, Any]]] to maintain the typing benefits.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Yelp__detect-secrets__620 | Yelp/detect-secrets | 620 | defect | e61b9f988ce43abbe49aafa43d819fa88596a346 | 57cc31909cb61a6a457a1b709bd432ff355cae3b | Fix audit report that verifies a secret | Problem:
- When running an audit report on a baseline file - we reverse engineer the detect-secrets starting from secrets hashes, filenames, and how it was detected to the actual secret itself.
- After a recent change - we fixed a bug with respect to detect-secrets not persisting the verify result
- As part of this... | diff --git a/detect_secrets/audit/common.py b/detect_secrets/audit/common.py
index 7359fc419..0a1d6d587 100644
--- a/detect_secrets/audit/common.py
+++ b/detect_secrets/audit/common.py
@@ -19,6 +19,7 @@
from ..transformers import get_transformed_file
from ..types import NamedIO
from ..util.inject import call_functio... | 2 | 2 | 2 | [{"id": "G0", "claim": "The context snippet should be built from `line_getter.lines` instead of `lines_to_scan` (which can be the secret line alone), and `line_number` should be incremented by one because it is a list index, not the file's actual line number.", "category": "correctness", "verdict": "supported", "priori... | null |
Yelp__detect-secrets__692 | Yelp/detect-secrets | 692 | defect | d068f9e6ae651ee349ba36f2875e4e04896bf595 | 244e3a8f2b248d05f2e0f6f34abf557c76fc2ddd | Add a plugin for IPAddress (ipv4) | * **Please check if the PR fulfills these requirements**
- [X] Tests for the changes have been added
<!-- (for bug fixes / features) -->
- [X] Docs have been added / updated
<!-- (for bug fixes / features) -->
- [X] All CI checks are green
* **What kind of change does this PR introduce?**
<!-- (Bug fix, featur... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2f2f363a0..fbdcdca04 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,6 +27,11 @@ If you love `detect-secrets`, please star our project on GitHub to show your sup
<!--
### Unreleased
+##### May 15th, 2023
+#### :tada: New Features
+- Added a detector for IPPublic (i... | 3 | 3 | 2 | [{"id": "G0", "claim": "The pull request's code fails the repository's pre-commit checks (style violations such as double-quoted strings), which should be fixed so the checks pass.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The test cases ('... | null |
Yelp__detect-secrets__738 | Yelp/detect-secrets | 738 | defect | 5438d062d95ff2f97895b1f056a367e7e1986bb9 | c9e0beb4acd20926b7b453b4c03cb6ce03a77bfa | Audit prompt wording | * **Please check if the PR fulfills these requirements**
- [x] Tests for the changes have been added
<!-- (for bug fixes / features) -->
- [x] Docs have been added / updated
<!-- (for bug fixes / features) -->
- [x] All CI checks are green
* **What kind of change does this PR introduce?**
Modifies the wordin... | diff --git a/detect_secrets/audit/io.py b/detect_secrets/audit/io.py
index 15ecc504e..1b20cc773 100644
--- a/detect_secrets/audit/io.py
+++ b/detect_secrets/audit/io.py
@@ -130,7 +130,7 @@ def __init__(self, allow_labelling: bool, allow_backstep: bool) -> None:
def __str__(self) -> str:
if 'Y' in self.v... | 1 | 1 | 0 | [{"id": "G0", "claim": "Change the audit prompt wording to 'Should this string be committed to the repository?' in all occurrences.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Yelp__detect-secrets__8 | Yelp/detect-secrets | 8 | defect | 383bc63dfd174dd885657b719538c0f2f20fb29a | 305887c90831bd4c4a1e2ab2a939093162f87ff0 | Self-updating Baseline File through Pre-commit Hook | ### Description
We had functionality to update the baseline appropriately, when secrets were discovered to be removed from the code base. This adds a few tweaks to make sure that feature is used.
### Testing
`make test` passes.
For manual testing, I did the following:
```
~/pg/detect-secrets $ pip insta... | diff --git a/detect_secrets/core/baseline.py b/detect_secrets/core/baseline.py
index 2eb52c62b..6392afcf7 100644
--- a/detect_secrets/core/baseline.py
+++ b/detect_secrets/core/baseline.py
@@ -7,80 +7,6 @@
from detect_secrets.core.secrets_collection import SecretsCollection
-def apply_baseline_filter(results, base... | 2 | 1 | 0 | [{"id": "G0", "claim": "The apply_baseline_filter function returns `output` on every control-flow path and ignores its `filelist` parameter, so the redundant branch and unused argument should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cla... | null |
Yelp__detect-secrets__819 | Yelp/detect-secrets | 819 | defect | 28a66587a3dcae89ed116a1f00a041bbbf5577ac | b05ceccfb539781d86d7df9ffacd513025f8c5f4 | Plugin for PyPI api tokens | ## Please check if the PR fulfills these requirements
- [x] Tests for the changes have been added
<!-- (for bug fixes / features) -->
- [x] Docs have been added / updated
<!-- (for bug fixes / features) -->
- [x] All CI checks are green
## What kind of change does this PR introduce?
<!-- (Bug fix, feature, doc... | diff --git a/README.md b/README.md
index af11ad99d..af00fee25 100644
--- a/README.md
+++ b/README.md
@@ -109,6 +109,7 @@ KeywordDetector
MailchimpDetector
NpmDetector
PrivateKeyDetector
+PypiTokenDetector
SendGridDetector
SlackDetector
SoftlayerDetector
diff --git a/detect_secrets/plugins/pypi_token.py b/detect_s... | 2 | 1 | 1 | [{"id": "G0", "claim": "The plugin should also detect TestPyPI tokens, whose format (pypi-AgENdGVzdC5weXBpLm9yZw...) differs from the pypi.org format the S1 denylist covers.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Token-validity checking coul... | null |
Yelp__detect-secrets__878 | Yelp/detect-secrets | 878 | defect | 6cdb79bbbd5622d99329a7129e4612f72d6350cd | 41f774616d3b0a736561fecb6dad830130b8ffd7 | fix(telegram_bot_token): Regex must match just bot tokens | * **Please check if the PR fulfils these requirements**
- [x] Tests for the changes have been added
<!-- (for bug fixes / features) -->
- [ ] Docs have been added / updated
<!-- (for bug fixes / features) -->
- [x] All CI checks are green
```
(venv) ➜ time python -m pytest tests/plugins/telegram_token_test.py
... | diff --git a/detect_secrets/plugins/telegram_token.py b/detect_secrets/plugins/telegram_token.py
index 1054c64b0..32869abac 100644
--- a/detect_secrets/plugins/telegram_token.py
+++ b/detect_secrets/plugins/telegram_token.py
@@ -15,7 +15,7 @@ class TelegramBotTokenDetector(RegexBasedDetector):
denylist = [
... | 2 | 1 | 1 | [{"id": "G0", "claim": "The parametrized test should assert that a payload with a `bot` prefix is not flagged (('bot110201543:AAHdqTcvCH1vGWJxfSe1ofSAs0K5PALDsaw', False)) instead of duplicating the un-prefixed case, covering the newly anchored regex's behaviour.", "category": "testing", "verdict": "supported", "priori... | null |
Yelp__detect-secrets__90 | Yelp/detect-secrets | 90 | defect | 80ae87dbba3a2d68e40416308d088a35d76c65b3 | bae309d863a6f709897915445b58540f72f92075 | Update merge results to only propagate is_secret of new secrets |
When I do `detect-secrets -vvv scan --update .secrets.baseline` it'll run with new plugins, so I changed some of the assumptions in `merge_results` | diff --git a/detect_secrets/core/baseline.py b/detect_secrets/core/baseline.py
index 964e7fcd4..b84bceeba 100644
--- a/detect_secrets/core/baseline.py
+++ b/detect_secrets/core/baseline.py
@@ -157,6 +157,8 @@ def merge_baseline(old_baseline, new_baseline):
to the new baseline, and will only work with baselines cre... | 1 | 1 | 1 | [{"id": "G0", "claim": "Since secrets are still ordered (per baseline.py#L233), the pull request may not need to use the O(n^2) nested-loop approach in merge_results.", "category": "performance", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
Yelp__dumb-init__174 | Yelp/dumb-init | 174 | defect | 183db85f9dc5aebb2cc1b700d95b6588f4db84c1 | 3bc3d4f2544b893fdd4020286f103381bed19635 | Fix SIGHUP/SIGCONT sometimes reaching the child due to tty quirks | Fixes #136
To summarize, the issue in #136 is that when dumb-init calls `TIOCNOTTY`, the kernel will send a SIGHUP and SIGCONT to the dumb-init process if dumb-init is the session leader. Quoth `man tty`:
```
TIOCNOTTY
Detach the calling process from its controlling terminal.
If the process... | diff --git a/dumb-init.c b/dumb-init.c
index f437b10..7651471 100644
--- a/dumb-init.c
+++ b/dumb-init.c
@@ -37,7 +37,10 @@
#define MAXSIG 31
// Indices are one-indexed (signal 1 is at index 1). Index zero is unused.
+// User-specified signal rewriting.
int signal_rewrite[MAXSIG + 1] = {[0 ... MAXSIG] = -1};
+// O... | 1 | 1 | 0 | [{"id": "G0", "claim": "The DEBUG message in handle_signal should say 'Ignoring tty hand-off signal...' instead of 'Ignoring signal %d during its first receive.' so it is clearer why the signal is being ignored here.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Yelp__paasta__3577 | Yelp/paasta | 3,577 | defect | 08f4ca88611400d58de9cefc0c4f8d4b887ffd5b | 684760c2711eab923a57c9a79564390a39c0acec | Have setup_kubernetes_job prioritize services whose git_shas are chan… | …ging, so that real bounces take priority over big bounces. | diff --git a/paasta_tools/setup_kubernetes_job.py b/paasta_tools/setup_kubernetes_job.py
index 9f7a61f036..e5c3c201c9 100755
--- a/paasta_tools/setup_kubernetes_job.py
+++ b/paasta_tools/setup_kubernetes_job.py
@@ -23,6 +23,7 @@
import argparse
import logging
import sys
+from typing import Dict
from typing import L... | 4 | 4 | 1 | [{"id": "G0", "claim": "The new sort key should prioritize by DeploymentVersion (git sha + image_version) rather than git sha alone, so that services whose image version changed are also prioritized over big bounces.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", ... | null |
Yelp__paasta__3996 | Yelp/paasta | 3,996 | defect | dbe4ada2ce918a9fdde5f42bb16b8ca4d3d44662 | 013fcc51b5fff85b275bd4d671eb6dc851ce2e94 | Fix inconsistent spark driver and executor image | ## Description
The Spark driver and executor image version can be inconsistent in a Tron action run when a job is already scheduled before the image is updated, which causes an InvalidClassException if the image's Spark version was changed.
Behavior:
- The action was run with old spark.kubernetes.container.image... | diff --git a/paasta_tools/tron_tools.py b/paasta_tools/tron_tools.py
index dcde970af1..e95695432b 100644
--- a/paasta_tools/tron_tools.py
+++ b/paasta_tools/tron_tools.py
@@ -348,8 +348,6 @@ def build_spark_config(self) -> Dict[str, str]:
f"tron_spark_{self.get_service()}_{self.get_instance()}",
)... | 1 | 1 | 1 | [{"id": "G0", "claim": "The image passed as docker_img must include the registry URL, not just the image name: with only \"$PAASTA_DOCKER_IMAGE\" the config would become \"--conf spark.kubernetes.container.image=my_service:paasta-123abcde\" instead of \"docker-registry.com:400/my_service:paasta-123abcde\", and the regi... | null |
Yelp__paasta__4010 | Yelp/paasta | 4,010 | defect | 8b441b721146cb5e3e1ed8d024a0126382243db7 | aa659ec8fea1411e5f6023fc82e1f7376b6aefb7 | MLCOMPUTE-2733 | Add paasta names to spark driver pod annotations | Add paasta names to spark driver pod annotations.
Follow up by: https://github.com/Yelp/service_configuration_lib/pull/153 which is for executor pod annotations. | diff --git a/paasta_tools/spark_tools.py b/paasta_tools/spark_tools.py
index aa581a826c..d276371689 100644
--- a/paasta_tools/spark_tools.py
+++ b/paasta_tools/spark_tools.py
@@ -235,9 +235,18 @@ def get_spark_driver_monitoring_annotations(
Returns Spark driver pod annotations - currently used for Prometheus metad... | 1 | 1 | 1 | [{"id": "G0", "claim": "get_spark_driver_monitoring_annotations perhaps should return an empty dict (or error out) when the paasta service/instance (and ui port) config values are not present, since empty-string annotation values are not useful and without a port the pod is unscrapeable.", "category": "correctness", "v... | null |
Yelp__paasta__4011 | Yelp/paasta | 4,011 | defect | bf64b7dd7f110cc150ca385700b351911d89a020 | 55e2a5981dc2409c2ad6ead94bc0d542e3087508 | Use C-accelerated safe_load for YAML | PaaSTA is really just YAML all the way down, so using the pure Python
functions here leads to a considerable slowdown - this change alone
shaves ~20s off of setup_tron_namespace in one of our non-prod clusters
e.g., the below are from a "noop" (i.e., no tron config changes to
deploy) run of setup_tron_namespace:
... | diff --git a/paasta_tools/api/api.py b/paasta_tools/api/api.py
index f01a48dac1..7e9d7e8208 100644
--- a/paasta_tools/api/api.py
+++ b/paasta_tools/api/api.py
@@ -24,7 +24,6 @@
import manhole
import requests_cache
import service_configuration_lib
-import yaml
from pyramid.config import Configurator
from wsgicors i... | 1 | 1 | 0 | [{"id": "G0", "claim": "When running as the paasta application, a missing CSafeLoader should fail immediately rather than silently fall back to the slow pure-Python SafeLoader; the reviewer proposes assuming CSafeLoader when sys.prefix points at a paasta checkout/venv and keeping the fallback only for library use.", "c... | null |
Yelp__paasta__4012 | Yelp/paasta | 4,012 | defect | bf64b7dd7f110cc150ca385700b351911d89a020 | 5230379156273e7bbd0d0dd631a68b9eed394cbe | Implement v2 of prometheus-based uWSGI autoscaling. | This uses the AverageValue style of target for the HPA rather than a target Value, which means that the HPA will divide by the number of currently-running pods for us, instead of us having to do that division. This should lead to more accurate scaling. (Internally, the HPA then takes the metric and multiplies it by the... | diff --git a/paasta_tools/cli/schemas/autoscaling_schema.json b/paasta_tools/cli/schemas/autoscaling_schema.json
index d24f311562..d870425e12 100644
--- a/paasta_tools/cli/schemas/autoscaling_schema.json
+++ b/paasta_tools/cli/schemas/autoscaling_schema.json
@@ -6,6 +6,7 @@
"type": {
"enum... | 1 | 1 | 1 | [{"id": "G0", "claim": "The new METRICS_PROVIDER_UWSGI_V2 branch should call create_instance_uwsgi_v2_scaling_rule instead of create_instance_uwsgi_scaling_rule.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}] | null |
Yelp__paasta__4039 | Yelp/paasta | 4,039 | defect | 5cdb1916b640925a3b0e852ef9955105b24ccd6c | a749b260fad8a64e1cd78efbfe55da89410dba68 | improve cleanup of remote-run job resources | `paasta remote-run` works fine now, but I noticed that unless people call `paasta remote-run stop` explicitly, the `job` resource would remain defined forever, even if the pod is terminated by the deadline being reached.
Tackling that on two different angles:
* Setting `ttl_seconds_after_finished` in the job spec s... | diff --git a/paasta_tools/api/views/remote_run.py b/paasta_tools/api/views/remote_run.py
index eb3ec39b4b..8ec6962d69 100644
--- a/paasta_tools/api/views/remote_run.py
+++ b/paasta_tools/api/views/remote_run.py
@@ -17,20 +17,18 @@
from paasta_tools.api import settings
from paasta_tools.api.views.exception import Ap... | 2 | 2 | 0 | [{"id": "G0", "claim": "The docstring's :param line for the authentication-resources age limit reads `creds_age_limit` while the parameter is actually named `auth_age_limit`, and the reviewer suggests changing it to `auth_age_limit`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "int... | null |
Yelp__paasta__4041 | Yelp/paasta | 4,041 | defect | 7d7381cc9cfc6fd8f253b66622a1c114c77c9624 | 4cb834acd09f7a5a4c636b2f9078e86684ebfaf2 | Added code to take spark driver pool from config | ### Problem
Currently, the pool that the Spark driver of _driver on k8s tron jobs_ runs on is hardcoded to **_stable_** pool, to ensure the Spark driver not being interrupted due to spot interruptions.
However, in some cases, jobs need to pull images from the other docker registry which does not work in the stable... | diff --git a/paasta_tools/tron_tools.py b/paasta_tools/tron_tools.py
index 92d44641e3..1347d27268 100644
--- a/paasta_tools/tron_tools.py
+++ b/paasta_tools/tron_tools.py
@@ -697,13 +697,14 @@ def get_pool(self) -> str:
override this value. To control this, we have an optional config item that we'll puppet ont... | 3 | 2 | 0 | [{"id": "G0", "claim": "The new method's docstring should start on a newline and avoid the phrase 'default pool', which has a specific meaning at Yelp (a spot pool where disruption is allowed).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "It mig... | null |
Yelp__paasta__4063 | Yelp/paasta | 4,063 | defect | 8b61d65d1e2ab6a7f9cdcd7e9c73e8d3de03acab | 8ec0c76b84ec1f950db14a1d4830cc137b0d144d | FLINK-5725: Add extra Flink details to paasta status | May be easier to review first per commit
https://jira.yelpcorp.com/browse/FLINK-5725
HACKATHON-39
To speed up gathering of details for a Flink cluster/job, this PR adds
- yelpsoa and srv links to paasta status verbose output for flink
- github and sourcegraph link
- paasta log commands for flink compone... | diff --git a/paasta_tools/cli/cmds/status.py b/paasta_tools/cli/cmds/status.py
index 481daed80f..a250598056 100644
--- a/paasta_tools/cli/cmds/status.py
+++ b/paasta_tools/cli/cmds/status.py
@@ -766,6 +766,7 @@ def append_pod_status(pod_status, output: List[str]):
def _print_flink_status_from_job_manager(
service... | 4 | 3 | 1 | [{"id": "G0", "claim": "Using .replace(\"pnw-\", \"\") may remove multiple occurrences of the substring instead of only the prefix, so a prefix-only removal (or equivalent check) should be used.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new... | null |
Yelp__paasta__4078 | Yelp/paasta | 4,078 | defect | d02ed19fd118de1439bb5aa230ce058b51b8b835 | a56243141be75ea46dc490c592606af96e3c2d65 | Allow setting temporary max_instances overrides | Just as setting temporary `min_instances` overrides is useful, so would being able to do the same for `max_instances`. | diff --git a/paasta_tools/api/api_docs/oapi.yaml b/paasta_tools/api/api_docs/oapi.yaml
index 8bdc93720d..06efbee14d 100644
--- a/paasta_tools/api/api_docs/oapi.yaml
+++ b/paasta_tools/api/api_docs/oapi.yaml
@@ -269,12 +269,17 @@ components:
type: integer
description: Minimum number of instances to... | 5 | 4 | 1 | [{"id": "G0", "claim": "The docstring of set_autoscaling_override should be updated to mention the new max_instances parameter.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The max_instances validation is dead as written and the checks need rear... | null |
Yelp__paasta__4096 | Yelp/paasta | 4,096 | defect | 7b46fe7501665fc42d6c5bac8c42be107ba5880d | 43f5a78d01bea85f25fdd84ef90e049df731576e | Remote run copy file | Support copying files from remote run jobs and also adding additional files if the job is already running.
Example: https://fluffy.yelpcorp.com/i/CXvf9mq5HdkZJ93bbm2fwsfqwMPFflbh.html
Toolbox example: https://fluffy.yelpcorp.com/i/46FPk43js5W0NrHBPbTqFbjC0K25gpp6.html | diff --git a/paasta_tools/cli/cmds/remote_run.py b/paasta_tools/cli/cmds/remote_run.py
index 1056c2430e..7393a3c555 100644
--- a/paasta_tools/cli/cmds/remote_run.py
+++ b/paasta_tools/cli/cmds/remote_run.py
@@ -14,6 +14,7 @@
# limitations under the License.
import argparse
import json
+import os
import shutil
impo... | 9 | 6 | 1 | [{"id": "G0", "claim": "Consider adding a while loop to keep polling when remote_run_poll returns a 204, so `paasta remote-run copy --to-pod` works when run right after `paasta remote-run start` (explicitly fine to punt).", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1... | null |
Yelp__paasta__4101 | Yelp/paasta | 4,101 | defect | 794ff3666022b0a1e1fd874c3cf5f0459a020c16 | 23f6f3861171b5c2a826f14b2b9f96a0780f9e86 | remote-run: some minor fixes | * When remote-running existing service instances we get lucky that setup-kubernetes-job pretty much in all cases previously set up a service account when there's an IAM role associated to the service instance. We don't have the same luxury with toolbox instances. I didn't go for a conditional logic though, since it doe... | diff --git a/paasta_tools/kubernetes/remote_run.py b/paasta_tools/kubernetes/remote_run.py
index 7400723ebb..95fbc089ab 100644
--- a/paasta_tools/kubernetes/remote_run.py
+++ b/paasta_tools/kubernetes/remote_run.py
@@ -154,6 +154,7 @@ def remote_run_start(
formatted_job.metadata.name = job_name
app_wrapper = ... | 1 | 1 | 1 | [{"id": "G0", "claim": "The pull request should also exclude the readiness probe, not just the liveness probe, when building containers for jobs.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
Yelp__paasta__4105 | Yelp/paasta | 4,105 | defect | b056b85b80e30ff9cf6ff2fc2dbacd9b8786b79c | b66be1a54a408711c5d64d2a2556361c73dd9202 | Retry more intelligently when getting hosts in mesh_status | We do currently have some request-level retries using a Session() if I'm reading things correctly, but that will retry on the same host - which generally won't be too helpful for hosts that are broken/dying/gone.
This is somewhat funky-looking, but without breaking this out into another function and using something ... | diff --git a/paasta_tools/instance/kubernetes.py b/paasta_tools/instance/kubernetes.py
index e17a599cab..b70065ae95 100644
--- a/paasta_tools/instance/kubernetes.py
+++ b/paasta_tools/instance/kubernetes.py
@@ -1,4 +1,5 @@
import asyncio
+import logging
from asyncio.tasks import Task
from collections import defaultd... | 1 | 1 | 0 | [{"id": "G0", "claim": "The retry loop should iterate with range(max_retries) instead of the hardcoded range(3).", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
Yelp__paasta__4110 | Yelp/paasta | 4,110 | defect | e446a2924a74c966ba64390ea48b11239f4e8b61 | 4a5f5c1e26a4198df7a37b2ef657c8dbe64f58bc | Validate smartstack.yaml in `paasta validate` | We currently do this in an internal repo (`py-gitolite`), but I don't see why we don't just do this in `paasta validate` - especially since moving this check left means that folks are alerted to broken config earlier rather than when they attempt to integrate.
The smartstack_schema.json in this repo was behind the o... | diff --git a/paasta_tools/cli/cmds/validate.py b/paasta_tools/cli/cmds/validate.py
index 5695334129..968d518230 100644
--- a/paasta_tools/cli/cmds/validate.py
+++ b/paasta_tools/cli/cmds/validate.py
@@ -34,6 +34,9 @@
import pytz
from croniter import croniter
+from environment_tools.type_utils import available_locat... | 1 | 1 | 0 | [{"id": "G0", "claim": "The mode enum added in smartstack_schema.json lists \"http2\" twice and the duplicate should be removed.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Yelp__paasta__4116 | Yelp/paasta | 4,116 | defect | 8bc9932dea3e5a7e9c9a93bc7f3781ae2b698ab5 | 6d11ee6cfc90d584cffab80c7e4d46d442a4188c | Add pod labels for all configured metrics providers | ## Problem
Each autoscaling metric may have some specific pod labels to identify the pod for the scraper. In the case of multiple metrics, we'll need to add all the pod labels. Currently, we only provide the labels from one metric.
## Solution
Change if/else logic to if/if.
## Validation
Add tests. | diff --git a/paasta_tools/kubernetes_tools.py b/paasta_tools/kubernetes_tools.py
index be69330c57..67750146f0 100644
--- a/paasta_tools/kubernetes_tools.py
+++ b/paasta_tools/kubernetes_tools.py
@@ -2489,11 +2489,11 @@ def get_pod_template_spec(
# character limit for k8s labels (63 chars)
labe... | 2 | 1 | 0 | [{"id": "G0", "claim": "The change now sets the paasta.yelp.com/deploy_group label in several provider branches instead of once, which the reviewer notes has no real harm, and a later reply suggests adding it as a default label instead.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope":... | null |
Yelp__paasta__4120 | Yelp/paasta | 4,120 | defect | fe2d33f6301c7203df93ddd0515979a284728d9c | f076ff9ca04d31f6a39cfb457417949d68876440 | worker-load autoscaler | ## Feature
The `worker-load` autoscaler functions equivalently to the `uwsgi-v2` autoscaler except it looks at the `worker_busy` metric (instead of `uwsgi_worker_busy`). This is meant to be an autoscaler that can apply to any service that depends on worker utilization - particularly targetting both uwsgi and gunicor... | diff --git a/paasta_tools/cli/schemas/autoscaling_schema.json b/paasta_tools/cli/schemas/autoscaling_schema.json
index d870425e12..1433c7fb0b 100644
--- a/paasta_tools/cli/schemas/autoscaling_schema.json
+++ b/paasta_tools/cli/schemas/autoscaling_schema.json
@@ -11,7 +11,8 @@
"piscina",
... | 2 | 1 | 0 | [{"id": "G0", "claim": "The deploy_group Prometheus label should eventually become a default label rather than staying behind per-provider feature toggles (reviewer muses about doing this themselves in a later PR, explicitly no action for the author).", "category": "design", "verdict": "uncertain", "priority": "P3", "s... | null |
Yelp__paasta__4129 | Yelp/paasta | 4,129 | defect | b056b85b80e30ff9cf6ff2fc2dbacd9b8786b79c | e040ed212392d4677e08f9cff870c402352ccefd | adding container_port to KubernetesVersion | Unfortunately I missed that we don't have env field in container class in my previous PR: https://github.com/Yelp/paasta/pull/4118
So now I'm adding a new field to PaaSTA API | diff --git a/paasta_tools/api/api_docs/oapi.yaml b/paasta_tools/api/api_docs/oapi.yaml
index c4315c7569..aa672999f0 100644
--- a/paasta_tools/api/api_docs/oapi.yaml
+++ b/paasta_tools/api/api_docs/oapi.yaml
@@ -874,6 +874,10 @@ components:
type: object
KubernetesVersion:
properties:
+ containe... | 1 | 1 | 0 | [{"id": "G0", "claim": "The container_port description 'Port for exposing when in bridge mode' is not quite correct for Kubernetes since k8s does no port management, and should be reworded to something like 'Port the container is expecting to receive traffic on'.", "category": "documentation", "verdict": "supported", "... | null |
Yelp__paasta__4132 | Yelp/paasta | 4,132 | defect | 7d69138e3e2bcbf13787ae29a1497b6d73eea4bf | 16645dd3afc0fcd36635f2f294d0299e43eb7aff | Don't re-exec as root to pull in `local-run` | We occasionally get onpoint questions re: `paasta local-run` not working inside yelpsoa-configs - most of the time, these are non-infra engineers without sudo access who are then unable to use local-run until they deactivate their venv, directly invoke /usr/bin/paasta, or run from a shell without the venv activated.
... | diff --git a/paasta_tools/cli/cmds/local_run.py b/paasta_tools/cli/cmds/local_run.py
index dcba23f867..a45484e6d1 100755
--- a/paasta_tools/cli/cmds/local_run.py
+++ b/paasta_tools/cli/cmds/local_run.py
@@ -73,6 +73,11 @@
from paasta_tools.utils import TimeoutError
from paasta_tools.utils import validate_service_inst... | 2 | 1 | 1 | [{"id": "G0", "claim": "Add \"/bin/paasta\" to STANDARD_PAASTA_CLI_PATHS, since it is another possible standard install path that would otherwise be treated as a venv.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "It may be worth adding the PAASTA_... | null |
Yelp__paasta__4141 | Yelp/paasta | 4,141 | defect | a0d050e9ebfe072bda6f6a86f790f01880c1ceb4 | 25efc6be56064447271e7bfb1a330bd8dfc6cd45 | Handle services on registries with no ro creds | There were two bugs in my original implementation:
* we crash if there's no ro creds file (i had assumed the creds were distributed everywhere)
* we don't re-exec as root for registries with no ro creds and required auth
This diff fixes both :) | diff --git a/paasta_tools/cli/cmds/local_run.py b/paasta_tools/cli/cmds/local_run.py
index 7287cab608..8f9f885ec2 100755
--- a/paasta_tools/cli/cmds/local_run.py
+++ b/paasta_tools/cli/cmds/local_run.py
@@ -34,6 +34,7 @@
from docker import errors
from docker.api.client import APIClient
from mypy_extensions import Ty... | 3 | 3 | 1 | [{"id": "G0", "claim": "The return annotation should be `Set[str]` instead of `set[str]` (what mypy expects).", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The comment should say 'service config' instead of 'instance config'.", "category": "documen... | null |
Yelp__paasta__4179 | Yelp/paasta | 4,179 | defect | 0f185ccf357e5dc9073f26770170aa5860bbd5f1 | 2d7cb58d949ded2f777e6a72bb68593c91c98a93 | Update status display for terminating pods | This change ensures that terminating pods are still represented in the status output until they are fully removed.
<img width="1372" height="769" alt="image" src="https://github.com/user-attachments/assets/7e62bc40-1549-4856-bf66-62294722b4ad" /> | diff --git a/paasta_tools/api/api_docs/oapi.yaml b/paasta_tools/api/api_docs/oapi.yaml
index 048575f3e3..1e43d699b7 100644
--- a/paasta_tools/api/api_docs/oapi.yaml
+++ b/paasta_tools/api/api_docs/oapi.yaml
@@ -781,6 +781,11 @@ components:
type: array
items:
$ref: '#/components/schema... | 6 | 3 | 0 | [{"id": "G0", "claim": "Use abs() to keep the code minimal inside the if-else conditions instead of duplicating the humanize/status formatting for the future and elapsed cases.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Swap getattr(pod, \"d... | null |
Yelp__paasta__4203 | Yelp/paasta | 4,203 | defect | 41bd8a2843f740b3470b8d56f3c834b430449b07 | d067c14ba5876ce7ad8fddb566ad925848aea485 | replace a_sync library | this is prep for bumping to python 3.12+
- a_sync imports utaw at module import time:
https://github.com/notion/a_sync/blob/1be7d796382da28bc6101a5121b2236392cb9485/a_sync/a_sync.py#L16-L18
- utaw binds the deprecated unittest.assertEquals.
https://github.com/notion/utaw/blob/fb311063d6ec3039e286b0f4dff31... | diff --git a/paasta_tools/api/views/instance.py b/paasta_tools/api/views/instance.py
index 2f70529637..315b18c0b0 100644
--- a/paasta_tools/api/views/instance.py
+++ b/paasta_tools/api/views/instance.py
@@ -25,7 +25,6 @@
from typing import Mapping
from typing import Optional
-import a_sync
from pyramid.request imp... | 1 | 1 | 0 | [{"id": "G0", "claim": "An attribution comment for the inlined a_sync code (e.g. `# following functions are essentially a modernized version of notion/a_sync`) should be added, probably worth checking what Apache licensing requires.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "intr... | null |
Yelp__paasta__4212 | Yelp/paasta | 4,212 | defect | cc69fe315c4092eb7d4ecd78fa3cb84318011c15 | 96773da4a6ad46c0e39d8faa167317cb023325ba | Add a new endpoint to return deployment info for a (service, deploy group) | I feel like I've wanted this before - but now I need it for use in Airflow (to ensure folks aren't hardcoding tags and whatnot for the service images they're using) :p
example:
```
> curl 'http://HOST:PORT/v1/services/SERVICE/deployments/DEPLOYGROUP' | jq .
% Total % Received % Xferd Average Speed Time ... | diff --git a/paasta_tools/api/api.py b/paasta_tools/api/api.py
index eaa33d8f53..f8337ca3e8 100644
--- a/paasta_tools/api/api.py
+++ b/paasta_tools/api/api.py
@@ -163,6 +163,10 @@ def make_app(global_config=None):
"/v1/services/{service}/{instance}/tasks/{task_id}",
)
config.add_route("service.list",... | 1 | 1 | 1 | [{"id": "G0", "claim": "The endpoint path /services/{service}/container_image/{deploy_group} gets the hierarchy the wrong way round and should instead be /service/{service}/deployments/{deploy_group}, returning the whole DeploymentsJsonV2 deployments dict object, with the image including the registry possibly added as ... | null |
Yelp__paasta__4233 | Yelp/paasta | 4,233 | defect | 04bea66b239f2d57144e66a433947321c154c070 | 74fd7642904694bca932975c5d949135a7ac50e7 | Add cassandra eks support | Add support for cassandra eks following [paasta_tools/flinkeks_tools.py](https://github.com/Yelp/paasta/blob/74fd7642904694bca932975c5d949135a7ac50e7/paasta_tools/flinkeks_tools.py) | diff --git a/paasta_tools/cassandraclustereks_tools.py b/paasta_tools/cassandraclustereks_tools.py
new file mode 100644
index 0000000000..6048e9977f
--- /dev/null
+++ b/paasta_tools/cassandraclustereks_tools.py
@@ -0,0 +1,90 @@
+from typing import Optional
+
+import service_configuration_lib
+
+from paasta_tools.cassan... | 4 | 2 | 2 | [{"id": "G0", "claim": "The mappings in utils.py for INSTANCE_TYPES and INSTANCE_TYPE_TO_K8S_NAMESPACE may be missing a cassandraclustereks entry.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The obsolete import flagged by the linked failing CI ru... | null |
Yelp__paasta__4256 | Yelp/paasta | 4,256 | defect | 3ffa240b21c2a076c0357a633fda1ac0f6fad3a9 | 57f6c9151c00836e70dba3e60b005305ee355f35 | Add ssm_secrets support to Tron jobs | Add ssm_secrets support to Tron jobs, which previously only worked for EKS service instances.
`paasta_secrets_sync` was extended so that the ssm-secrets secret type also checks for ssm_secrets in Tron configs. This was required because:
1) Tron jobs are typically run in a separate namespace from long-running serv... | diff --git a/docs/source/yelpsoa_configs.rst b/docs/source/yelpsoa_configs.rst
index 57368e0740..24bcae7aee 100644
--- a/docs/source/yelpsoa_configs.rst
+++ b/docs/source/yelpsoa_configs.rst
@@ -738,6 +738,13 @@ Each Tron **action** of a job MAY specify the following:
then the command should be something available... | 2 | 1 | 0 | [{"id": "G0", "claim": "config_loader.instance_configs() raises InvalidInstanceConfig when loading Tron action configs (decompose_instance expects 'job.action' names), which suggests there is probably a bug in the config loader since it is supposed to be able to load everything.", "category": "correctness", "verdict": ... | null |
Yelp__paasta__4259 | Yelp/paasta | 4,259 | defect | fef1a21e0317205f79f08a3de630a0ee2a4a4aa1 | 6cdcf0e9adb4ef128c19b6cff1c0378b6c13a904 | Simplify flink overview None check to use jobs_running as canary | The Flink /overview endpoint returns all fields or none, so checking jobs_running alone suffices instead of checking each field individually.
🤖 Generated with [Claude Code](https://claude.ai/code) | diff --git a/paasta_tools/cli/cmds/status.py b/paasta_tools/cli/cmds/status.py
index 6e72dcf7b4..0eda08d6aa 100644
--- a/paasta_tools/cli/cmds/status.py
+++ b/paasta_tools/cli/cmds/status.py
@@ -972,15 +972,7 @@ def _print_flink_status_from_job_manager(
output.append(str(e))
return 1
- ... | 2 | 1 | 0 | [{"id": "G0", "claim": "Add a comment above the jobs_running canary check explaining why that field alone is checked: if it is missing, the other overview fields are not present either, which signals the jobmanager is unhealthy.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduc... | null |
Yelp__paasta__4270 | Yelp/paasta | 4,270 | defect | 89b8b6450f8ada01c1daf89b7600595a908cacb9 | 9ed4d8bc7e039e845113035c7ccf191a055891d7 | FLINK-5911: Add checkpoint counts to paasta status for Flink services | Ticket: https://jira.yelpcorp.com/browse/FLINK-5911
### Description
- Add per-job checkpoint counts (completed, failed, in_progress, restored) to `paasta status` output at `-vv` verbosity for all Flink services
- New `/flink/{service}/{instance}/jobs/{job_id}/checkpoints` API endpoint proxying Flink REST API check... | diff --git a/paasta_tools/api/api.py b/paasta_tools/api/api.py
index 0e8c6849ad..f67e2e1f6a 100644
--- a/paasta_tools/api/api.py
+++ b/paasta_tools/api/api.py
@@ -128,6 +128,10 @@ def make_app(global_config=None):
"flink.service.instance.job_details",
"/v1/flink/{service}/{instance}/jobs/{job_id}",
... | 9 | 7 | 1 | [{"id": "G0", "claim": "Job IDs might contain '/' (they are defined in srv-configs), which would break the new /flink/{service}/{instance}/jobs/{job_id}/checkpoints path template.", "category": "correctness", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The checkpoint match in ... | null |
Yelp__paasta__4271 | Yelp/paasta | 4,271 | defect | 6c758d171f84e5ab704936aaba573c9479a742f7 | 9e834206454e2520a816f732b5c633cffd20e6d5 | FLINK-5911: Add last restart timestamp to paasta status for Flink jobs | Ticket: https://jira.yelpcorp.com/browse/FLINK-5911
**Depends on**: #4270
### Description
- Show last restart time per Flink job at `-vv` verbosity
- Extends `JOB_DETAILS_KEYS` whitelist to pass through the `timestamps` dict from the Flink REST API
- Displays `Last restart: <time> (<humanized>)` only when the job has... | diff --git a/paasta_tools/api/api_docs/oapi.yaml b/paasta_tools/api/api_docs/oapi.yaml
index 40af36f15c..21896d9e09 100644
--- a/paasta_tools/api/api_docs/oapi.yaml
+++ b/paasta_tools/api/api_docs/oapi.yaml
@@ -255,6 +255,12 @@ components:
description: timestamp of job start time
format: float
... | 2 | 1 | 0 | [{"id": "G0", "claim": "The condition `if restarting_ts and restarting_ts > 0:` is redundant and should be simplified to `if restarting_ts:`.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "If the FlinkJobDetails fields are guaranteed to always b... | null |
Yelp__paasta__4285 | Yelp/paasta | 4,285 | defect | 553a6287e31463c504e652baa36ac53dc82b3725 | e905eb589431833d89e8132e43f520237899f260 | FLINK-5911: Extract job display functions to flink_tools (PR 3/4) | Ticket: https://jira.yelpcorp.com/browse/FLINK-5911
Refactors the monolithic _print_flink_status_from_job_manager() function (~335 lines) in status.py into modular, independently testable functions in flink_tools.py.
Part 3 of 4. Extracts the jobs table formatting and async fetch helpers out of \`status.py\` into... | diff --git a/paasta_tools/cli/cmds/status.py b/paasta_tools/cli/cmds/status.py
index 9937609860..d110be0dea 100644
--- a/paasta_tools/cli/cmds/status.py
+++ b/paasta_tools/cli/cmds/status.py
@@ -12,11 +12,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specifi... | 3 | 2 | 0 | [{"id": "G0", "claim": "`_fetch_flink_job_checkpoints` carries a private `_` prefix although the pull request calls it from another file (paasta_tools/cli/cmds/status.py); the reviewer asks whether it should drop the prefix.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced... | null |
Yelp__paasta__4286 | Yelp/paasta | 4,286 | defect | cc756ee40b982dd315c118b9e6d8b0892026d395 | e109cd5c61cb30e24344b8df67dea175abd61567 | FLINK-5911: Orchestrator cleanup in status.py (PR 4/4) | Ticket: https://jira.yelpcorp.com/browse/FLINK-5911
Part 4 of 4. Final cleanup — all Flink logic now lives in \`flink_tools.py\`; \`status.py\` is a thin orchestrator.
Also addresses feedback from PR 3 (#4285):
- \`checkpoint_data\` typed as \`Dict[str, Union[FlinkCheckpointStatus, BaseException]]\` (was \`Dict[str, ... | diff --git a/paasta_tools/cli/cmds/status.py b/paasta_tools/cli/cmds/status.py
index d110be0dea..8c3ea8534e 100644
--- a/paasta_tools/cli/cmds/status.py
+++ b/paasta_tools/cli/cmds/status.py
@@ -61,9 +61,6 @@
from paasta_tools.cli.utils import verify_instances
from paasta_tools.eks_tools import EksDeploymentConfig
f... | 1 | 1 | 0 | [{"id": "G0", "claim": "collect_flink_job_details() accepts a jobs list and returns it in the details dict, but the status.py call always passes [] even though jobs has just been fetched; either pass the jobs variable or remove the jobs parameter to avoid misleading call sites.", "category": "design", "verdict": "suppo... | null |
Yelp__paasta__4290 | Yelp/paasta | 4,290 | defect | 4d32a051ea5d96e4b7e11372c412ba466cef9507 | 13c48e596aac287a5edb1904a78de651bebf748d | AIRFLOW-3: Add a new extra-namespaces option to paasta secrets to support secret syncing without adding paasta instances | ## Summary
Adds support for syncing PaaSTA secrets to Kubernetes namespaces that have no PaaSTA instances (e.g. MWAA workloads). Previously the only way to get a secret into a namespace was to have a PaaSTA instance running there; now secrets can declare target namespaces directly in their JSON file.
**Two ne... | diff --git a/paasta_tools/cli/cmds/secret.py b/paasta_tools/cli/cmds/secret.py
index eb77dd7c53..7f5aa01d9b 100644
--- a/paasta_tools/cli/cmds/secret.py
+++ b/paasta_tools/cli/cmds/secret.py
@@ -13,11 +13,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
imp... | 4 | 3 | 0 | [{"id": "G0", "claim": "When updating an existing secret, `paasta secret` should fetch the existing list of extra namespaces so callers do not have to re-add the extra namespaces to their CLI args.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The --ext... | null |
Yelp__paasta__4303 | Yelp/paasta | 4,303 | defect | 64e7d7bc65613bd99d6bae54936b46d3ed823f1b | e64100b5f07105cfc5618fe084c1e9d66ba3d829 | Add SL2 Grafana dashboard link to paasta status output | Shows a direct link to the service-load Grafana dashboard for each instance, pre-filtered by service, ecosystem, cluster, and instance.
<img width="1512" height="138" alt="Screenshot 2026-05-11 at 14 23 21" src="https://github.com/user-attachments/assets/6560878e-b0b7-4bf4-90b4-9b143f9cc699" />
Kinda long but h... | diff --git a/paasta_tools/cli/cmds/status.py b/paasta_tools/cli/cmds/status.py
index 42ca911998..05be80111a 100644
--- a/paasta_tools/cli/cmds/status.py
+++ b/paasta_tools/cli/cmds/status.py
@@ -327,9 +327,18 @@ def paasta_status_on_api_endpoint(
is_eks: bool = False,
all_namespaces: bool = False,
) -> int:
... | 2 | 2 | 1 | [{"id": "G0", "claim": "The Grafana dashboard link is shown unconditionally for every service, so for non-kubernetes instance types (e.g. flink) the SL2 service-load charts would be empty or show unrelated data; it should only be shown for normal paasta (kubernetes) services for now, with tron and other instance types ... | null |
Yelp__paasta__4306 | Yelp/paasta | 4,306 | defect | f8855e22c165be1d4a928eb0ebc8e4bc47b5893a | 8e63d73f6e180479b9cea04d34e0f12d52778113 | Add best-effort Jenkins link to paasta status -v output | Prints a link to the service's Jenkins job page once per service when verbose mode is enabled.
Had to add `verbose` to some tests for the tests to pass
<img width="954" height="204" alt="Screenshot 2026-05-08 at 16 14 39" src="https://github.com/user-attachments/assets/db8818cb-494e-42dc-8454-9319c6d01938" />
| diff --git a/paasta_tools/cli/cmds/status.py b/paasta_tools/cli/cmds/status.py
index 42ca911998..c9899ba6d2 100644
--- a/paasta_tools/cli/cmds/status.py
+++ b/paasta_tools/cli/cmds/status.py
@@ -2147,6 +2147,14 @@ def apply_args_filters(
return clusters_services_instances
+def print_jenkins_link(service: str, ... | 3 | 3 | 1 | [{"id": "G0", "claim": "Only a single service can be present here, so the set().union()/for-loop pattern should be replaced by unpacking a single value (or a comment) to avoid future confusion.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The ... | null |
Yelp__paasta__4311 | Yelp/paasta | 4,311 | defect | 8ebed65748c91e3206d13239e04483229f52683c | 811b47be7553cd8dd4609b441cbdbea95d4924ef | Add more labels to paasta_secrets_sync timers, and support setting arbitrary dimensions via envvar | I recently added Yet Another Cronjob for paasta secrets after #4290 , but realized our paasta_system_process_duration metrics didn't have enough information to distinguish between our standard paasta servcie secret sync, and only-namespaces syncs.
This updates the paasta_secrets_sync system_timers to use some of ou... | diff --git a/paasta_tools/kubernetes/bin/paasta_secrets_sync.py b/paasta_tools/kubernetes/bin/paasta_secrets_sync.py
index bc28a693f1..1c6e2a251d 100755
--- a/paasta_tools/kubernetes/bin/paasta_secrets_sync.py
+++ b/paasta_tools/kubernetes/bin/paasta_secrets_sync.py
@@ -185,6 +185,9 @@ def main() -> None:
timer = ... | 2 | 1 | 1 | [{"id": "G0", "claim": "The new tests should use plain assert statements to stay consistent with the unittest-style tests, which the reviewer plans to enforce in a future refactor.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The test_envvar_a... | null |
Yelp__paasta__4313 | Yelp/paasta | 4,313 | defect | 44136c17367c8f4913a78af3e72b1276233c0571 | 6a7d888525f4ae42da38357c3a83b56a399c26db | STREAMAPP-15217: Support explicit pool field in Flink yelpsoa-configs | - Adds `pool` field to `FlinkDeploymentConfigDict`
- Updates `get_pool()` to check for explicit `pool` value before falling back to spot-based logic
- Enables targeting custom Karpenter pools like `flink-spot-ebs` directly from yelpsoa-configs
## Usage
```yaml
# yelpsoa-configs: flinkeks-pnw-devc.yaml
... | diff --git a/paasta_tools/flink_tools.py b/paasta_tools/flink_tools.py
index 46586715f5..c5edcf9b9a 100644
--- a/paasta_tools/flink_tools.py
+++ b/paasta_tools/flink_tools.py
@@ -114,6 +114,7 @@ class FlinkInstanceDetails(TypedDict):
class FlinkDeploymentConfigDict(LongRunningServiceConfigDict, total=False):
task... | 5 | 5 | 2 | [{"id": "G0", "claim": "The explanatory comment about the flink-spot fallback that this PR deleted should be kept (or the spot lookup default changed from None to True), since the fallback behavior is confusing without it.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}... | null |
Yelp__paasta__4323 | Yelp/paasta | 4,323 | defect | 9e932fed953beb692e8e95a36b6c106d30d45dcb | d0f41a2ee5089a9c298fd27bb144f59f238881aa | AIRFLOW-3: Add a new set-namespaces subcmd to paasta secret | In #4290 I added an option to add `extra_namespaces` to a secret w/ `paasta secret`, but doing so with an existing secret could only be done with `paasta secret update` which forced users to go through the entire process of re-encrypting the secret.
This PR instead just adds a new `set-namespaces` subcommand to `s... | diff --git a/paasta_tools/cli/cmds/secret.py b/paasta_tools/cli/cmds/secret.py
index 42e1bcaa0f..9f870c731e 100644
--- a/paasta_tools/cli/cmds/secret.py
+++ b/paasta_tools/cli/cmds/secret.py
@@ -241,7 +241,11 @@ def _add_vault_auth_args(parser: argparse.ArgumentParser):
)
-def _add_common_args(parser: argparse... | 4 | 3 | 0 | [{"id": "G0", "claim": "Add a NOTE comment above the _add_common_args(parser, include_vault_args=False) call explaining that this sub-command is entirely local so the help-text need not mention vault args.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "c... | null |
YishenTu__claudian__311 | YishenTu/claudian | 311 | defect | 5d1abc5cfffab00d398b3be528f1c8f766517f69 | e803172d91a80a290ef81224d4f8139b036b13d2 | feat(chat): support Obsidian browser selection as context (unified chip UI) | ## Background
Claudian currently handles local note context well. However, when reading web pages in Obsidian’s built-in browser (e.g., Surfing), users must manually copy selected text and paste it into the input box, which breaks flow and reduces efficiency.
This PR enables selected content in browser views to be ... | diff --git a/src/core/prompts/mainAgent.ts b/src/core/prompts/mainAgent.ts
index c1aab92793..c78e122881 100644
--- a/src/core/prompts/mainAgent.ts
+++ b/src/core/prompts/mainAgent.ts
@@ -71,11 +71,16 @@ path/to/note.md
<editor_selection path="path/to/note.md" lines="10-15">
selected text content
</editor_selection>
... | 4 | 2 | 1 | [{"id": "G0", "claim": "formatBrowserContext() inserts selectedText unescaped into the XML body, so untrusted web-page selection containing '</browser_selection>' or other tags could break the prompt structure; escape XML special chars in the body (or wrap in CDATA).", "category": "security", "verdict": "uncertain", "p... | null |
Yoctol__bottender__166 | Yoctol/bottender | 166 | defect | ab00713ebc799498de62bfbf8a730e561559445b | 52fbccdd5121245a4464c6366a134f10aa957adb | feat: add support for Slack slash commands | ~need example~
Changes:
1. slack slash command support including
* router
* example
* documentation | diff --git a/src/bot/SlackConnector.js b/src/bot/SlackConnector.js
index cb9872393..67c5a3a3d 100644
--- a/src/bot/SlackConnector.js
+++ b/src/bot/SlackConnector.js
@@ -11,6 +11,7 @@ import SlackEvent, {
type SlackRawEvent,
type Message,
type InteractiveMessageEvent,
+ type SlashCommandEvent,
} from '../cont... | 1 | 1 | 0 | [{"id": "G0", "claim": "The comment should read \"Slash Command\" instead of the typo \"Slach Command\".", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
Yoctol__bottender__709 | Yoctol/bottender | 709 | defect | 8e9dc186025af5f58cd60941ec6d3ea1e76b85d1 | b51a94c26a2a25125ab97d7e0aaa393115d81b65 | feat: bottender-dialogflow without actions | Send fulfillmentMessages to user from Dialogflow when a conversation matched an intent in Dialogflow but can't find the corresponding actions in Bottender.
Only support fulfillmentMessages when the platform equals to 'PLATFORM_UNSPECIFIED' and the message equals to 'text'. | diff --git a/packages/bottender-dialogflow/src/__tests__/index.spec.ts b/packages/bottender-dialogflow/src/__tests__/index.spec.ts
index da5a932bc..cf95ef3ef 100644
--- a/packages/bottender-dialogflow/src/__tests__/index.spec.ts
+++ b/packages/bottender-dialogflow/src/__tests__/index.spec.ts
@@ -116,7 +116,7 @@ it('sho... | 2 | 1 | 1 | [{"id": "G0", "claim": "The Dialogflow-fulfillment branch fires context.sendText through Promise.all without awaiting it, so the messages may be sent after the handler returns.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new Message type repl... | null |
Yoctol__bottender__793 | Yoctol/bottender | 793 | defect | 0e8cd82ea20e320739f7441a632d68f6428fbc56 | f3d1c1db04a680c5f6606f5084ebb6a1f95d9c7d | feat: add emojis on Line TextMessage Event | references: https://developers.line.biz/en/reference/messaging-api/#wh-text | diff --git a/packages/bottender/src/line/LineEvent.ts b/packages/bottender/src/line/LineEvent.ts
index 60ae27ee2..b66b02dd4 100644
--- a/packages/bottender/src/line/LineEvent.ts
+++ b/packages/bottender/src/line/LineEvent.ts
@@ -25,6 +25,32 @@ type TextMessage = {
id: string;
type: 'text';
text: string;
+ /**... | 2 | 2 | 0 | [{"id": "G0", "claim": "In the productId doc comment a space should be added before the period after the PDF URL so the period is not parsed as part of the link.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In the emojiId doc comment a space sho... | null |
YosefLab__Cassiopeia__101 | YosefLab/Cassiopeia | 101 | defect | 8cf54610922315e92d125379b1edac686930f795 | 5e119df234798e97155c38af42d8668856fbb60e | Added character matrix layer functionality | Added the ability to store an arbitrary number of character matrices in the `CassiopeiaTree` object using layers. This is motivated by the use of layers in `AnnData` objects, which are useful for storing expression matrices with different normalization routines.
Currently, users will have the ability to store differ... | diff --git a/AUTHORS.rst b/AUTHORS.rst
index bca563aa..12ed9b2f 100755
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -4,6 +4,9 @@ Credits
* Matthew Jones <matthew.jones@ucsf.edu>
* Alex Khodaverdian <alexkhodaverdian@berkeley.edu>
+* Richard Zhang
+* Sebastian Prillo
+* Joseph Min
* Jeffrey Quinn <jeffrey.quinn@ucsf.edu>... | 8 | 8 | 1 | [{"id": "G0", "claim": "Fix the typo in the Layers validation error message: \"ofr\" should be \"for\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a missing space between the argument name and its type in __delitem__ (\"key:str\" -> \"key:... | null |
YosefLab__Cassiopeia__117 | YosefLab/Cassiopeia | 117 | defect | 917efcdbd27b62e0e19526dcbd2d76d90d3756e6 | 19dbcffa08cdc43c5a0ab5dd08c97cdc02bcab24 | Small Parsimony | Implements the first section of small parsimony tools, supporting the Fitch-Hartigan algorithm and small parsimony computations.
Also adds the `tools` module which will store all post-tree-reconstruction tools (e.g., small parsimony, evolutionary coupling, etc.).
While this PR only implements the Fitch-Hartigan s... | diff --git a/cassiopeia/__init__.py b/cassiopeia/__init__.py
index d4410de4..e01f7388 100755
--- a/cassiopeia/__init__.py
+++ b/cassiopeia/__init__.py
@@ -13,3 +13,4 @@
from . import data
from . import critique
from . import sim
+from . import tl
diff --git a/cassiopeia/data/CassiopeiaTree.py b/cassiopeia/data/Cassi... | 6 | 6 | 1 | [{"id": "G0", "claim": "The dtype validation in fitch_hartigan should support pandas `category` dtype and should not rely on a generic `object` dtype check, since small-parsimony only works on categorical data.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "... | null |
YosefLab__Cassiopeia__119 | YosefLab/Cassiopeia | 119 | defect | 1a6a3c52bdb0e2312df942116be4093f36bad3fe | df54c58663846aa5b253c82c1a0187dbf156de7d | Ilp hybrid fixes | Hi all,
This PR contains fixes to the ILP that renames the internal files such that we can convert trees reconstructed with the ILPSolver into newicks.
I also added some additional testing for the ILP and Hybird Solvers around logging and newick conversion | diff --git a/cassiopeia/data/CassiopeiaTree.py b/cassiopeia/data/CassiopeiaTree.py
index 3b817b2b..880c9a85 100755
--- a/cassiopeia/data/CassiopeiaTree.py
+++ b/cassiopeia/data/CassiopeiaTree.py
@@ -84,7 +84,7 @@ class CassiopeiaTree:
character matrix.
cell_meta: Per-cell meta data
charac... | 2 | 2 | 0 | [{"id": "G0", "claim": "The `warnings` and `inspect` imports in HybridSolver.py are unused and should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "If the new `assertIsNotFile` helper is not used, it should be removed.", "category":... | null |
YosefLab__Cassiopeia__123 | YosefLab/Cassiopeia | 123 | defect | 072b27c84a9a91eb9a76eac8d4cbc117fb675b1e | 40c0126d405b652a4f53cb1ea12954cacb884c58 | BrownianSpatialDataSimulator | Implements the `BrownianSpatialDataSimulator`, which simulates spatial data as a Brownian process.
`n`-dimensional spatial coordinates are saved as node attributes and as columns in the `cell_meta`. | diff --git a/cassiopeia/simulator/BrownianSpatialDataSimulator.py b/cassiopeia/simulator/BrownianSpatialDataSimulator.py
new file mode 100644
index 00000000..92f54faf
--- /dev/null
+++ b/cassiopeia/simulator/BrownianSpatialDataSimulator.py
@@ -0,0 +1,115 @@
+"""
+This file defines the BrownianSpatialDataSimulator, whic... | 4 | 4 | 2 | [{"id": "G0", "claim": "DataSimulatorError should be imported from mixins rather than from cassiopeia.simulator.DataSimulator, whose error re-exports are a redundant remnant.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The class docstring should make ... | null |
YosefLab__Cassiopeia__135 | YosefLab/Cassiopeia | 135 | defect | 670dd12d949bf466f67c1117e5f6e912ae3c860d | 7f9dd7795c3068015911a8b0a37cecbd716efa15 | Fix clerical issues | Hi all,
Here we have some additional tests and minor fixes:
1) Testing that errors are thrown when initializing the tree with both the character matrix and the tree. Specifically, we test to make sure that if the leaves of the tree and the character matrix do not agree, an error is thrown.
2) We now throw errors w... | diff --git a/cassiopeia/data/CassiopeiaTree.py b/cassiopeia/data/CassiopeiaTree.py
index c3bb7997..c91448d5 100755
--- a/cassiopeia/data/CassiopeiaTree.py
+++ b/cassiopeia/data/CassiopeiaTree.py
@@ -1020,10 +1020,16 @@ def get_character_states(
The full character state array of the specified node.
... | 7 | 7 | 1 | [{"id": "G0", "claim": "The new error guard in get_character_states for unannotated character states appears unnecessary since populate_tree always annotates nodes, and the reviewer asks for a concrete case where it would be hit.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, ... | null |
YosefLab__Cassiopeia__141 | YosefLab/Cassiopeia | 141 | defect | 53e705b29ad184fa634697e436596db61a165723 | d15255f969b4df720b9163fdccc8d1bc8bbc93d0 | Bulk remove leaf | Hi,
I noticed that my simulation pipelines were significantly slower, specifically in sub-sampling. I believe this is due to the fact that beforehand, were were calling `register_data_with_tree` between removing each individual node. So now, I've made removing leaves and pruning lineages into a bulk function that hand... | diff --git a/cassiopeia/data/CassiopeiaTree.py b/cassiopeia/data/CassiopeiaTree.py
index c3bb7997..4ed42ab1 100755
--- a/cassiopeia/data/CassiopeiaTree.py
+++ b/cassiopeia/data/CassiopeiaTree.py
@@ -1179,9 +1179,9 @@ def subset_clade(
Args:
node: Node identifier in the object.
copy: R... | 3 | 3 | 1 | [{"id": "G0", "claim": "The docstring of `remove_leaves_and_prune_lineages` should make clear that `nodes` can be either a single leaf as a string or a list of leaves.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The second line of the `Raises` ... | null |
YosefLab__Cassiopeia__142 | YosefLab/Cassiopeia | 142 | defect | 3b454a7a7863e769a4f255926d282107863a6b52 | cb4bf7752b5176f648c56f68dbaa6b4d0db85abf | global alignment | Global alignment implementation (#127, #136, #139)
* Added a `method` argument to `pp.align_sequences` which can either be `local` (default) or `global`.
* Moved alignment functions to `pp.alignment_utilities`.
* Bumped some dependencies that were required.
* The gap open and gap extend penalties were left as is (2... | diff --git a/cassiopeia/preprocess/alignment_utilities.py b/cassiopeia/preprocess/alignment_utilities.py
index 5fca74c4..afc53748 100644
--- a/cassiopeia/preprocess/alignment_utilities.py
+++ b/cassiopeia/preprocess/alignment_utilities.py
@@ -3,10 +3,101 @@
Invoked through pipeline.py and supports the align_sequences ... | 5 | 5 | 1 | [{"id": "G0", "claim": "The docstring of `align_global` says it performs local alignment when the function actually performs global alignment using Needleman-Wunsch.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "In the `align_local` and `align_gl... | null |
YosefLab__Cassiopeia__143 | YosefLab/Cassiopeia | 143 | defect | 39ff16aa62130d908d78d554027789ba757cd174 | ae245c3e109eb3cba321db9a0389ee405306630d | Preprocessing speedup | #138
Optimized the following functions
| function | before | after | speedup |
|--------------------------------------|--------------|--------|---------|
| `pp.utilities.error_correct_intbc` | 2 min | 1 min | 2x |
| `pp.utilities.record_stats` | 20 sec... | diff --git a/cassiopeia/preprocess/UMI_utils.py b/cassiopeia/preprocess/UMI_utils.py
index b7b5d4c4..81ba8262 100755
--- a/cassiopeia/preprocess/UMI_utils.py
+++ b/cassiopeia/preprocess/UMI_utils.py
@@ -643,7 +643,7 @@ def merge_annotated_clusters(
def correct_umis_in_group(
cell_group: pd.DataFrame, max_umi_di... | 3 | 2 | 1 | [{"id": "G0", "claim": "In docstrings touched by the pull request, every line after the first in a Returns statement needs an extra indentation, here in correct_umis_in_group and elsewhere.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "map_intbcs... | null |
YosefLab__Cassiopeia__148 | YosefLab/Cassiopeia | 148 | defect | 6a4479e260a5fbefc663e0cecb7dfd51a4a01376 | 241ae8cf45eb74ef4278f4f2c126daa091e67e5b | Morans I | Implemented the Moran's I statistic in cassiopeia/tools/autocorrelation.py.
To do so, I also implemented a helper function for getting phylogenetic weight matrices.
I also changed the behavior in initializing `CassiopeiaTrees` where if a networkx object has an attribute `length`, then the branch lengths will be i... | diff --git a/cassiopeia/data/CassiopeiaTree.py b/cassiopeia/data/CassiopeiaTree.py
index 8ec35f58..ce7203d0 100755
--- a/cassiopeia/data/CassiopeiaTree.py
+++ b/cassiopeia/data/CassiopeiaTree.py
@@ -184,7 +184,9 @@ def populate_tree(
# instantiate branch lengths
for u, v in self.edges:
- ... | 7 | 6 | 2 | [{"id": "G0", "claim": "The spacing in `np.zeros((N , N ))` (spaces after the N) looks odd, as if black did not format it.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "compute_phylogenetic_weight_matrix should use tree.get_distances instead of... | null |
YosefLab__Cassiopeia__15 | YosefLab/Cassiopeia | 15 | defect | bc4cbd76d53da785a5ab957baf7b23fdbc11eb97 | a91dbf27d794576ab6fe1d1b774aa3c3e97e9843 | Process pipeline richard | Made some formatting changes to the error correct UMI related files, including naming conventions and logging | diff --git a/cassiopeia/ProcessingPipeline/process/UMI_utils.py b/cassiopeia/ProcessingPipeline/process/UMI_utils.py
index 60e0a924..a5bdcc96 100644
--- a/cassiopeia/ProcessingPipeline/process/UMI_utils.py
+++ b/cassiopeia/ProcessingPipeline/process/UMI_utils.py
@@ -7,12 +7,13 @@
import array
import heapq
import num... | 6 | 6 | 1 | [{"id": "G0", "claim": "The imports in UMI_utils.py should be alphabetized.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The function correct_UMIs_in_group should be renamed to the pythonic error_correct_umis.", "category": "maintainability"... | null |
YosefLab__Cassiopeia__150 | YosefLab/Cassiopeia | 150 | defect | 15dc005666b0c9da627145df07a30b162136e3a7 | 0fed423c9e6d6fcc5047ae163f38d8ba7712e6e9 | [Ready for Review] Expansion probabilities | Computing expansion probabilities on a tree.
Adds a file to the `tools` module called `topology.py` which will store several types of utilities for computing statistics of the topology of a tree. So far, I've implemented a function that computes a probability that a given subclade was generated from a neutral coales... | diff --git a/cassiopeia/tools/__init__.py b/cassiopeia/tools/__init__.py
index e4549f00..a099d222 100644
--- a/cassiopeia/tools/__init__.py
+++ b/cassiopeia/tools/__init__.py
@@ -3,3 +3,4 @@
from .autocorrelation import compute_morans_i
from .branch_length_estimator import IIDExponentialBayesian, IIDExponentialMLE
f... | 5 | 5 | 2 | [{"id": "G0", "claim": "The docstring's explanation of what is being computed is unclear and should be rewritten, e.g. as the probability that under a coalescent model the subclade would have had at least as many leaves as observed — a one-sided p-value.", "category": "documentation", "verdict": "supported", "priority"... | null |
YosefLab__Cassiopeia__153 | YosefLab/Cassiopeia | 153 | defect | 3002617a00e1281ef073a6f17b6dd55c3337bdad | 704731d2962dbca9a9ce726c82330380165be764 | Cophenetic Correlations | Computes cophenetic correlation for a given lineage, will resolve #152 . | diff --git a/cassiopeia/data/utilities.py b/cassiopeia/data/utilities.py
index ba503d94..e6518254 100755
--- a/cassiopeia/data/utilities.py
+++ b/cassiopeia/data/utilities.py
@@ -18,8 +18,7 @@
def get_lca_characters(
- vecs: List[Union[List[int], List[Tuple[int, ...]]]],
- missing_state_indicator: int,
+ ... | 3 | 3 | 0 | [{"id": "G0", "claim": "The two string literals in the numbaize warning should be concatenated into one string (and black --line-length=80 confirmed).", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The docstring should also document how long the... | null |
YosefLab__Cassiopeia__205 | YosefLab/Cassiopeia | 205 | defect | f4644586139484418c1e5cebe9e58205bd41693f | 73cd868c2b0130312653ae2bd556a213bd3e1ced | Fast UPGMA and NJ with CCPhylo | The C implementations of UPGMA and NJ in [CCPhylo](https://bitbucket.org/genomicepidemiology/ccphylo/src/master/) are significantly faster than the current Cassiopeia implementations of these algorithms. This update adds a `CCPhyloSolver` subclass of `DistanceSolver` which writes the dissimilarity matrix to a temp file... | diff --git a/README.md b/README.md
index f2882800..ddbb201d 100755
--- a/README.md
+++ b/README.md
@@ -45,7 +45,9 @@ For developers:
* Run the command ``gurobi.sh`` from a terminal window
* From the Gurobi installation directory (where there is a setup.py file), use ``python setup.py install --user``
-4. In... | 9 | 6 | 3 | [{"id": "G0", "claim": "Add docstring descriptions for the two new constructor parameters `fast` and `method`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Use the `Literal` type for the method parameter so the accepted method values are clear."... | null |
YosefLab__Cassiopeia__226 | YosefLab/Cassiopeia | 226 | defect | 9f272fc962d26cee1a0a9b379087ce8b49cca1de | d4936462d00392307e139fd11ac0ecfab77858ca | Ambiguous greedy & parallel dissimilarity computation | This PR implements two important changes.
## Supporting ambiguous alleles in Cassiopeia Greedy algorithm.
Specific changes:
* Enabled greedy splits to be found when states are ambiguous (by flattening ambiguous states)
* Enabled missing data assignment in greedy splits when ambiguous states are present
* A few... | diff --git a/cassiopeia/config.ini b/cassiopeia/config.ini
index cc497800..ee828068 100755
--- a/cassiopeia/config.ini
+++ b/cassiopeia/config.ini
@@ -1,2 +1,2 @@
[Paths]
-ccphylo_path = /path/to/ccphylo/ccphylo
+ccphylo_path = /Users/mgjones/software/ccphylo/ccphylo
diff --git a/cassiopeia/data/CassiopeiaTree.py b/ca... | 8 | 7 | 2 | [{"id": "G0", "claim": "cassiopeia/config.ini — which the commit carries with the author's personal ccphylo path — should be removed from the commit.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The docstring of get_mutations_along_edge should note how... | null |
YosefLab__Cassiopeia__229 | YosefLab/Cassiopeia | 229 | defect | 2ca07df5a682cd159d4c2119458049b44507eb59 | b1491a9c07122f2101087a9a7d0eb02f2b0b80e9 | Sequential lineage tracing data simulator | This PR adds a `SequentialLineageTracingDataSimulator` class for modeling sequential lineage tracing systems such as the DNA Typewriter described by [Choi et al, Nature 2022](https://www.nature.com/articles/s41586-022-04922-8) | diff --git a/cassiopeia/simulator/SequentialLineageTracingDataSimulator.py b/cassiopeia/simulator/SequentialLineageTracingDataSimulator.py
new file mode 100755
index 00000000..0d8f2468
--- /dev/null
+++ b/cassiopeia/simulator/SequentialLineageTracingDataSimulator.py
@@ -0,0 +1,280 @@
+"""
+A Sequential lineage tracing ... | 4 | 3 | 0 | [{"id": "G0", "claim": "The constructor should not allow an initiation_rate (or continuation_rate) of 0, questioning whether zero makes sense for these rates.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The uninitiated-site waiting time should be drawn ... | null |
YosefLab__Cassiopeia__27 | YosefLab/Cassiopeia | 27 | defect | e5f26ceae5a8fede3696477d43749f732285b011 | 0a1741954090e81c87502a4c4cb92050654c5c8d | Processing pipeline | Implemented an abstract class `DistanceSolver` and a subclass `NeighborJoiningSolver`. | diff --git a/cassiopeia/__init__.py b/cassiopeia/__init__.py
index 7f679659..d13eff8c 100755
--- a/cassiopeia/__init__.py
+++ b/cassiopeia/__init__.py
@@ -7,4 +7,5 @@
__email__ = "mattjones315@berkeley.edu"
__version__ = "0.0.1"
-from . import pp
\ No newline at end of file
+from . import pp
+from . import solver
\... | 1 | 1 | 0 | [{"id": "G0", "claim": "Question whether solve() should use the named sample indices of the character matrix and then relabel them to the numerical indices, instead of just directly using the numerical indices.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
YosefLab__Cassiopeia__36 | YosefLab/Cassiopeia | 36 | defect | 552a60544d1b9a1a94921be20a60862b29f3ddcb | c5c9541dcb189caf4edf8fd5b1524650dca685f3 | Process pipeline richard | Added maxcutsolver and graph_utils, as well as tests for the maxcut | diff --git a/cassiopeia/solver/GreedySolver.py b/cassiopeia/solver/GreedySolver.py
index 70006f37..08a1f17b 100755
--- a/cassiopeia/solver/GreedySolver.py
+++ b/cassiopeia/solver/GreedySolver.py
@@ -78,6 +78,14 @@ def perform_split(
def solve(self) -> nx.DiGraph:
"""Implements a top-down greedy solving pr... | 9 | 9 | 0 | [{"id": "G0", "claim": "The MaxCutSolver class docstring sits inside __init__; it should be placed between the class declaration and the __init__ function declaration.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The perform_split summary docstr... | null |
YosefLab__Cassiopeia__56 | YosefLab/Cassiopeia | 56 | defect | d6ad6edb3514f567dd2c833fc3b367e195774920 | 64eefb21772a4b59ebd5a2a16e098d69fe93ecaf | Bugfix: do not expose internals of the CassiopeiaTree | E.g. `return self.__cache["leaves"][:]` instead of `return self.__cache["leaves"]`. (The latter returns a pointer to the internal cached list; if the user modifies it the cache breaks.) | diff --git a/cassiopeia/data/CassiopeiaTree.py b/cassiopeia/data/CassiopeiaTree.py
index 99e9f10d..5500d5c5 100644
--- a/cassiopeia/data/CassiopeiaTree.py
+++ b/cassiopeia/data/CassiopeiaTree.py
@@ -14,11 +14,13 @@
This object can be passed to any CassiopeiaSolver subclass as well as any
analysis module, like a branc... | 1 | 1 | 1 | [{"id": "G0", "claim": "Add a quick test to make sure the internal objects are not modified if you, for example, get the nodes and change the name (or delete a node).", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
YosefLab__Cassiopeia__68 | YosefLab/Cassiopeia | 68 | defect | e0e17f54cf545855e89826cc0c737d809389a934 | 5739768facb75dcabfcea9b468a0c934eca7be8f | New utilities | New utilities that will be useful for real and simulated pipelines --
(1) Bootstrapping functionality:
-- given a character matrix, generate several bootstrap replicates assuming independent characters.
-- given an alleletable, generate bootstrap character matrices respecting the intBCs (i.e. sample intBCs rathe... | diff --git a/cassiopeia/data/utilities.py b/cassiopeia/data/utilities.py
index acd185fb..daff34f8 100644
--- a/cassiopeia/data/utilities.py
+++ b/cassiopeia/data/utilities.py
@@ -1,12 +1,16 @@
"""
General utilities for the datasets encountered in Cassiopeia.
"""
-from typing import Callable, Dict, List, Optional
+fr... | 9 | 8 | 2 | [{"id": "G0", "claim": "The bootstrap sample count parameter should be renamed from `B` to a lowercase, more expressive name such as `n_bootstraps` or `num_bootstraps`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The docstring phrase 'samplin... | null |
YosefLab__Cassiopeia__74 | YosefLab/Cassiopeia | 74 | defect | 5615a8eb3cd900fd3af54a6616791c43def18788 | a4d1342db0885a1cf3ae9ffe29f62f1a45c1e15c | Add concrete class TumorWithAFitSubclone that implements a TreeSimulator | I also added bulk `get_times` and `set_times` methods to the `CassiopeiaTree`. I still need to add tests in CassiopeiaTree for these two methods, but before let's make sure that you like these methods and their semantics too. | diff --git a/cassiopeia/data/CassiopeiaTree.py b/cassiopeia/data/CassiopeiaTree.py
index 92c60d47..84ed254c 100644
--- a/cassiopeia/data/CassiopeiaTree.py
+++ b/cassiopeia/data/CassiopeiaTree.py
@@ -557,6 +557,40 @@ def set_time(self, node: str, new_time: float) -> None:
self.get_time(child) - new_time... | 5 | 3 | 0 | [{"id": "G0", "claim": "set_times should set node times through the existing set_time API (e.g. by traversing the tree) rather than writing to the internal network directly, so that time logic lives in one place if the backend changes.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": ... | null |
YosefLab__Cassiopeia__86 | YosefLab/Cassiopeia | 86 | defect | cdba95c5c1db32735bfb42c2a611b6d201501299 | fc0e9852ea535c6b61edaef1357cd1f047c3fa29 | Critique | Refactored critique library to utilize the `CassiopeiaTree` API. Uses Tarjan's LCA lookup algorithm for the triplets correct routine. | diff --git a/cassiopeia/critique/compare.py b/cassiopeia/critique/compare.py
index 28a82fe6..bf775b87 100644
--- a/cassiopeia/critique/compare.py
+++ b/cassiopeia/critique/compare.py
@@ -4,18 +4,19 @@
function.
"""
from collections import defaultdict
+import copy
import ete3
+import itertools
import networkx as nx... | 2 | 1 | 0 | [{"id": "G0", "claim": "The tests associated with the PercolationSolver are hanging (as of 4/13/21), possibly due to some import issue, and this should be looked into.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "In annotate_tree_depths, number_of... | null |
YosefLab__Cassiopeia__95 | YosefLab/Cassiopeia | 95 | defect | c0112261fb14ac6fa2c01750ea2f616c10345e00 | 7046bf1004b3b25e0751c9f04476f8a576372ce0 | General bd simulator | Hi Matt,
This is the PR for the use of the generator in the solver, as well as some clerical fixes.
I added one similarity function with tests. Also, in the NeighborJoiningSolver, we were keeping the root node around after the fact and keeping it in the character matrix as a sample. This potentially throws off down... | diff --git a/cassiopeia/critique/compare.py b/cassiopeia/critique/compare.py
index bf775b87..fa10f281 100644
--- a/cassiopeia/critique/compare.py
+++ b/cassiopeia/critique/compare.py
@@ -16,7 +16,7 @@
def triplets_correct(
- tree1: CassiopeiaTree, tree2: CassiopeiaTree, number_of_trials: int = 1000
+ tree1: ... | 7 | 5 | 1 | [{"id": "G0", "claim": "The string check in set_character_matrix could be replaced with `if not character_matrix.index.dtype == str`, which would be a cleaner and constant-time check.", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The code in remo... | null |
YosysHQ__yosys__4303 | YosysHQ/yosys | 4,303 | defect | 0a854cf4cea669dd78c9a29657c29a70a651ec6d | 22cd05b51b8b9209e54ba2838ef1263ac7084f32 | Infrastructure to run a Sat solver as a command | As discussed on the slack channel, here is a patch for a solver interface using an arbitrary command (I used kissat for my test).
It also removes some unused code that was supposed to register arbitrary solvers.
As the moment, it is only usable for experimental purposes from the C++. I didn't implement any direct a... | diff --git a/Makefile b/Makefile
index 391fb7288f3..814656e9009 100644
--- a/Makefile
+++ b/Makefile
@@ -632,6 +632,7 @@ $(eval $(call add_include_file,kernel/yosys.h))
$(eval $(call add_include_file,kernel/yw.h))
$(eval $(call add_include_file,libs/ezsat/ezsat.h))
$(eval $(call add_include_file,libs/ezsat/ezminisat... | 11 | 9 | 6 | [{"id": "G0", "claim": "The PR should not remove the SatSolver registration globals (yosys_satsolver/yosys_satsolver_list) that let a plugin register a different SAT solver; instead of removing them, keep them and arrange for an ezcommand solver to be instantiable through this.", "category": "design", "verdict": "suppo... | null |
YosysHQ__yosys__4344 | YosysHQ/yosys | 4,344 | defect | bc1499928779bae5b6483e96c2a3db2c8202cf64 | 39e8157996a0b30f72843efec606ca7e0d29b728 | cost: add keep_hierarchy pass with min_cost argument | Modules being flattened improves QoR in practice. It also makes the yosys runtime take much longer.
This PR creates cost.cc with linear cost models for almost all internal cell types to estimate the size of a module after techmapping. To get most of these numbers, I used a modified version of the `test_cell` command... | diff --git a/Makefile b/Makefile
index f8d628010c5..5306c8498cc 100644
--- a/Makefile
+++ b/Makefile
@@ -646,7 +646,7 @@ $(eval $(call add_include_file,backends/rtlil/rtlil_backend.h))
OBJS += kernel/driver.o kernel/register.o kernel/rtlil.o kernel/log.o kernel/calc.o kernel/yosys.o
OBJS += kernel/binding.o
-OBJS +... | 11 | 7 | 2 | [{"id": "G0", "claim": "The long chains of `type == ID(...)` comparisons wrapped in clang-format off/on markers with inconsistent indentation are ugly to read; `type.in(...)` may work better.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "All of... | null |
YosysHQ__yosys__4497 | YosysHQ/yosys | 4,497 | defect | 9abdf363a347522b5c2ce97c25b31deb4e84b2da | 0afc91ec09c1c407490d5a52e58581abc5f533b2 | bitpattern: comments | Since `kernel/bitpattern.h` is meant to be installed in #4494, its behavior is now exposed to external project developers. This PR adds comments describing the file's functionality and intended use case | diff --git a/kernel/bitpattern.h b/kernel/bitpattern.h
index 7a8eb39f9f2..ddc0e4607be 100644
--- a/kernel/bitpattern.h
+++ b/kernel/bitpattern.h
@@ -25,6 +25,15 @@
YOSYS_NAMESPACE_BEGIN
+/**
+ * This file implements BitPatternPool for efficiently storing
+ * sets of fixed-width 2-valued logic constants compressed ... | 4 | 3 | 1 | [{"id": "G0", "claim": "Reword the new file-level comment so it stops describing a bit pattern as a signal, along the lines of the reviewer's proposed wording.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Summarize the match() doc-comment as 'tw... | null |
YosysHQ__yosys__5243 | YosysHQ/yosys | 5,243 | defect | fb024c4d550cee882d59e4abcfe282e18049cafd | 609f92d8bbcf55b9c42fb078daec3fd012195e27 | Make `log` functions variadic templates | _What are the reasons/motivation for this change?_
This makes all `log`-related functions support `std::string`-related types directly, leveraging the work in PR #5221 which does this for `stringf()`. This PR also adds support for `std::string_view` --- this is notable because printing `string_view`s using old-schoo... | diff --git a/frontends/verilog/verilog_lexer.l b/frontends/verilog/verilog_lexer.l
index 8280c00676c..95623848157 100644
--- a/frontends/verilog/verilog_lexer.l
+++ b/frontends/verilog/verilog_lexer.l
@@ -162,7 +162,7 @@ static bool is_hex_dig(char c, int *val, parser::location_type loc)
*val = c - 'A' + 0xA;
ret... | 2 | 2 | 2 | [{"id": "G0", "claim": "This pull request adds 1-2% runtime to the jpeg synthesis perf test, even when built with C++20 and LTO.", "category": "performance", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The 'with Verific' CI builds fail because the pull request changed loggin... | null |
YosysHQ__yosys__5255 | YosysHQ/yosys | 5,255 | defect | bf9aaac0fe7220ff14290c8925980a6a97cfcc7f | 3e8746e78b07d6873ad9ce0e66f0ac4a5597a75d | Reapply "Add groups to command reference" | _What are the reasons/motivation for this change?_
#4860 was reverted from main so that it could be reviewed more.
_Explain how this is achieved._
Reapply #4860, and make any other changes needed.
_If applicable, please suggest to reviewers how they can test the change._
| diff --git a/.github/workflows/prepare-docs.yml b/.github/workflows/prepare-docs.yml
index fb1fab42613..b47f5f3ddec 100644
--- a/.github/workflows/prepare-docs.yml
+++ b/.github/workflows/prepare-docs.yml
@@ -59,7 +59,6 @@ jobs:
with:
name: cmd-ref-${{ github.sha }}
path: |
- d... | 1 | 1 | 1 | [{"id": "G0", "claim": "The unconditionally included <version> / source_location machinery makes the signature of Pass::Pass() compiler dependent, creating an explicit ABI breakage when a C++20 codebase links against Yosys built under C++17, and an explicit define to opt in would be better than a compiler check.", "cat... | null |
YosysHQ__yosys__5302 | YosysHQ/yosys | 5,302 | defect | bfc9a322e2a854418e6679e141be3d482dde808c | f5ef5b70d72dd474d8a8308ae9fbee714134eac7 | Improve commutative hashing. | _What are the reasons/motivation for this change?_
The simple XOR `commutative_eat()` implementation produces a lot of collisions. https://www.preprints.org/manuscript/201710.0192/v1/download is a useful reference on this topic.
Running the included `hashTest.cc` without the hashlib changes, I get 49,580,349 coll... | diff --git a/kernel/hashlib.h b/kernel/hashlib.h
index 7a5650fa37a..840ff8331e7 100644
--- a/kernel/hashlib.h
+++ b/kernel/hashlib.h
@@ -12,6 +12,7 @@
#ifndef HASHLIB_H
#define HASHLIB_H
+#include <array>
#include <stdexcept>
#include <algorithm>
#include <optional>
@@ -100,7 +101,7 @@ class HasherDJB32 {
uin... | 3 | 1 | 1 | [{"id": "G0", "claim": "The removed commutative_eat method should be kept and marked [[deprecated]] instead, kept around indefinitely or until a YS_HASHING_VERSION bump.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "boost::hash_combine could be used ins... | null |
YosysHQ__yosys__5316 | YosysHQ/yosys | 5,316 | defect | c5d096b7b8302181a1329959891e4e6b352efcdc | 60099e5005aa4f67cde989aaee46711eb511c4c2 | Cleanup `RTLIL::Const` | _What are the reasons/motivation for this change?_
https://github.com/YosysHQ/yosys/issues/5312 explains how `Const` is currently very inefficient. This PR fixes a lot of that.
_Explain how this is achieved._
The main piece of work here is to remove all direct calls to `Const::bits()`. We add some new APIs to ... | diff --git a/backends/btor/btor.cc b/backends/btor/btor.cc
index 1daf68c9df8..ca39164bec9 100644
--- a/backends/btor/btor.cc
+++ b/backends/btor/btor.cc
@@ -709,12 +709,13 @@ struct BtorWorker
}
}
- Const initval;
+ Const::Builder initval_bits(GetSize(sig_q));
for (int i = 0; i < GetSize(sig_q); i++)... | 4 | 2 | 1 | [{"id": "G0", "claim": "Const::resize() unconditionally bitvectorizes, so replacing c.bits().resize(i, val) with c.resize(i, val) does not avoid bitvectorization, and the reviewer asks whether the author intends to change resize().", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.