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
seed4j__seed4j__12683
seed4j/seed4j
12,683
defect
014df62344bd1ab3d4dd84c584d25e94fbe18b00
1cf03b5236d5511babc23a5a926d67b42b0449f4
Upgrade Sonarqube to 25.4
Following https://github.com/jhipster/jhipster-lite/pull/12289
diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 023e368bd9a..d60c9f1d13f 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -448,8 +448,8 @@ jobs: working-directory: /tmp/jhlite/${{ matrix.app }}/ run: | ...
2
2
2
[{"id": "G0", "claim": "The CI part of the pull request had not been updated yet for the Sonar token change and still needed updating.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The CI failed because it tried to get the Sonar token before the so...
null
seed4j__seed4j__12940
seed4j/seed4j
12,940
defect
fe1df3d449e186ebea968d373e0d51d9e65ee2bc
57ef334322fcda3cf1f7620fc582bac2c9251a82
Add sonar-typescript module
Fix #12735
diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 0bf6be07d15..4626c5c3840 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -470,11 +470,7 @@ jobs: if: steps.tests-requirement-check.outputs.execute_tests == 'true' ...
4
3
2
[{"id": "G0", "claim": "The sonar-typescript logic should live in the existing SonarQubeModuleFactory under a single renamed feature (sonarqube), because applying both sonar-typescript and a sonar-qube-java module would generate the same files.", "category": "design", "verdict": "uncertain", "priority": "P1", "scope": ...
null
seed4j__seed4j__13315
seed4j/seed4j
13,315
defect
5e89c843a3eecfe9537170d52fb3fa8415cf250a
c41d3b659080b3b25068384bd32df3fcc0bacfe1
Add Angular i18n support using Transloco
This should closes #10413 This is my first PR since a while so any feedbacks are more than welcome 😄
diff --git a/src/main/java/com/seed4j/generator/client/angular/i18n/application/AngularI18nApplicationService.java b/src/main/java/com/seed4j/generator/client/angular/i18n/application/AngularI18nApplicationService.java new file mode 100644 index 00000000000..b520aee31f6 --- /dev/null +++ b/src/main/java/com/seed4j/gene...
5
5
2
[{"id": "G0", "claim": "The pull request forgot the Cucumber feature file for the new angular-i18n module that sibling i18n modules (react-i18n.feature, vue-i18n.feature) have.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The `.and()` closing the ASSE...
null
seed4j__seed4j__13491
seed4j/seed4j
13,491
defect
bff68cf2b8ab648e7b2598549b92d42969a109bc
16e5a249fcfb0b4883cd9d1e9d8e7b578f275b15
Fix: update dependency keycloak-js to v26.2.1
Fix #13486
diff --git a/src/main/java/com/seed4j/generator/client/angular/security/oauth2keycloak/domain/AngularOAuth2KeycloakModuleFactory.java b/src/main/java/com/seed4j/generator/client/angular/security/oauth2keycloak/domain/AngularOAuth2KeycloakModuleFactory.java index 13462a22546..89f1abef7ab 100644 --- a/src/main/java/com/s...
1
1
0
[{"id": "G0", "claim": "The new assertion `.containing(\"mockOauth2AuthService\")` in AngularOAuth2KeycloakModuleFactoryTest could be replaced with `.matchingSavedSnapshot()`, since it better visualizes the expected file and is a stronger assertion.", "category": "testing", "verdict": "supported", "priority": "P2", "sc...
null
seek-oss__sku__1050
seek-oss/sku
1,050
defect
508cdc8d12153169de527bd34a6dc85ade7def7d
2e227f76c9da6d06e2693e0f04a8364badc339f1
Add experimental `renderToStringAsync` parameter for `renderApp`
### Reasoning/Details in ChangeSet - Added TanStack's react-query to a new fixture, to more genuinely recreate a suspended component. - Unfortunately, I only found out towards the end it embeds the the date in the dehydrated state, so I put in a hack to set the date to SEEK's 100th anniversary (If the fixture is ...
diff --git a/.changeset/sharp-berries-report.md b/.changeset/sharp-berries-report.md new file mode 100644 index 000000000..8a507052b --- /dev/null +++ b/.changeset/sharp-berries-report.md @@ -0,0 +1,37 @@ +--- +'sku': minor +--- + +Add experimental `renderToString` parameter in `renderApp` + +The new `renderToString` m...
9
8
3
[{"id": "G0", "claim": "The `renderToString` parameter could be set directly instead of wrapped in an arrow `(node) => renderToString(node)` that only forwards its argument.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new render prop shou...
null
seek-oss__sku__1243
seek-oss/sku
1,243
defect
3d652d4bbddc20002583a2f4322b41cc27a2d8f2
6d1499f7a3507023d2e752e8f05d135f2a7c6b37
Emit sku config path in generated ESLint config, don't redundantly load ESLint config
Currently sku both loads its own ESLint config programmatically _and_ lets ESLint load the config from `eslint.config.mjs`. Given that these are both the same configs, this is redundant. Removing the programmatic loading from `runESlint` simplifies a few functions as they no longer need to be passed a `skuContext`. ...
diff --git a/.changeset/vast-toys-drive.md b/.changeset/vast-toys-drive.md new file mode 100644 index 000000000..68295da04 --- /dev/null +++ b/.changeset/vast-toys-drive.md @@ -0,0 +1,5 @@ +--- +'sku': patch +--- + +`configure`: Emit resolve sku config path to generated ESLint config diff --git a/.changeset/witty-dodos...
1
1
0
[{"id": "G0", "claim": "The changeset line should read \"`lint|format`: Avoid redundantly loading ESLint config\" instead of \"Don't redundantly load\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
seek-oss__sku__1261
seek-oss/sku
1,261
defect
2d6e5f3cab1792e054ae36dfd898774735141d02
eb28cc36fd0b55b40cf032a4d6f0e32d16b4d89d
Strip assertions during `vite` builds
During production webpack builds, assertions are stripped from the bundle. Currently this is handled by https://github.com/unassert-js/babel-plugin-unassert. Vite builds need to emulate this behaviour. For Vite there are 3 viable options: 1. the babel plugin we already use 2. https://github.com/unassert-js/rollup...
diff --git a/.changeset/bumpy-lies-raise.md b/.changeset/bumpy-lies-raise.md new file mode 100644 index 000000000..0348d0838 --- /dev/null +++ b/.changeset/bumpy-lies-raise.md @@ -0,0 +1,5 @@ +--- +'sku': minor +--- + +`vite build`: Strip assertions during production build diff --git a/packages/sku/package.json b/packa...
1
1
1
[{"id": "G0", "claim": "The assertion-removal test should run for the vite bundler as well as webpack, via describe.for(['vite', 'webpack']).", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
seek-oss__sku__1273
seek-oss/sku
1,273
defect
ed527393f86ba823226015771521717d387dfe01
fade387c788d5941a92bf0fe16fe99724ce03a9e
Vitest fixes
Fix for the `cli` parsing part of the new `vitest` runner for `sku`. Fix the peer dependencies for `@sku-lib/vitest`. Fix error handling for the installation prompt part of `@sku-lib/vitest`.
diff --git a/fixtures/sku-test/package.json b/fixtures/sku-test/package.json index 7fbce3bed..b926ee915 100644 --- a/fixtures/sku-test/package.json +++ b/fixtures/sku-test/package.json @@ -3,6 +3,7 @@ "private": true, "type": "module", "devDependencies": { + "@vitest/coverage-v8": "^3.2.1", "sku": "wor...
7
6
2
[{"id": "G0", "claim": "The vitest snapshot output could be cleaned up using stripVTControlCharacters from node:util.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "`sku` should move its `vitest` dependency to a dev dependency, and `@sku-lib/vit...
null
seek-oss__sku__1298
seek-oss/sku
1,298
defect
d76bd1c2a6eb3e1e5ba9be3714f0fa00e4656c0a
0655009393d081f85069c96bdf40f57a00480df9
enable supportedBrowsers when running vite
Enable the `supportedBrowsers` from the `skuConfig` to work with `vite`.
diff --git a/.changeset/real-dancers-dig.md b/.changeset/real-dancers-dig.md new file mode 100644 index 000000000..afe59cccc --- /dev/null +++ b/.changeset/real-dancers-dig.md @@ -0,0 +1,5 @@ +--- +'sku': minor +--- + +`sku: vite` enable `supportedBrowsers` when running `sku` with the `vite` bundler. diff --git a/packa...
3
3
2
[{"id": "G0", "claim": "Add a comment at the top of browserslist-to-esbuild.ts referencing the original marcofugaro/browserslist-to-esbuild implementation it was copied from.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Copy the upstream browser...
null
seek-oss__sku__1305
seek-oss/sku
1,305
defect
77d6a2dfd19a79f2653d731b07d48233c479cdd1
db418e00d9df95c9475962167fa8aa9788cee48a
Remove unused vite apis
While experimental support with Vite is available, some APIs are still under development. Static site generation is our primary focus for the Vite bundler at this time, so SSR commands with the experimental Vite bundler flags will now throw an error. Config functions have been slightly renamed as well to match thei...
diff --git a/.changeset/blue-adults-take.md b/.changeset/blue-adults-take.md new file mode 100644 index 000000000..ce4da424d --- /dev/null +++ b/.changeset/blue-adults-take.md @@ -0,0 +1,7 @@ +--- +'sku': minor +--- + +Explicitly deny commands unsupported by the vite bundler + +While experimental support with Vite is a...
1
1
0
[{"id": "G0", "claim": "core-js-pure should be removed from onlyBuiltDependencies in pnpm-workspace.yaml, since its install script only logs a message and is not worth allowing.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
seek-oss__sku__1311
seek-oss/sku
1,311
defect
1ea7bdc72eadabe4c7faf77f39c51b57d4fcd3f0
2383bd54441be35440053a4dcda9f7956c9d2f79
`init, configure`: Create/suggest recommended PNPM configuration
`sku init` will now run `pnpm add --config pnpm-plugin-sku` if PNPM >=10 is detected. `sku configure` will log warnings about - `.npmrc` files, with a suggesting to migrate to `pnpm-workspace.yaml` - Missing `pnpm-plugin-sku` config dep - A PNPM version < 10.13.0, which is the minimum version that supports automa...
diff --git a/packages/sku/src/openBrowser/index.ts b/packages/sku/src/openBrowser/index.ts index 1164b40de..27fefb4dc 100644 --- a/packages/sku/src/openBrowser/index.ts +++ b/packages/sku/src/openBrowser/index.ts @@ -2,13 +2,13 @@ // https://github.com/facebook/create-react-app/commit/d2de54b25cc25800df1764058997e3e27...
4
3
0
[{"id": "G0", "claim": "The action-dispatching `createOrUpdatePnpmConfig`/`getPnpmConfigAction` pair should be split into separate functions called directly (e.g. `createPnpmConfig`, `updatePnpmConfig`, with no `noop`), because the single function is trying to do too much and the indirection would be simpler without it...
null
seek-oss__sku__1327
seek-oss/sku
1,327
defect
8552a700fba7e48886c40eb3f73cc1991cee40e5
a9d49d1e3798cc1a4557c29af7589fb9790ac386
`vite`: Add `displayNamesProd` support
Adds `displayNamesProd` configuration support to the experimental Vite bundler to achieve feature parity with webpack
diff --git a/.changeset/huge-ghosts-brake.md b/.changeset/huge-ghosts-brake.md new file mode 100644 index 000000000..b8ee41b9a --- /dev/null +++ b/.changeset/huge-ghosts-brake.md @@ -0,0 +1,5 @@ +--- +'sku': minor +--- + +`vite`: Add support for `displayNameProd` `sku.config option diff --git a/fixtures/display-names-p...
6
6
1
[{"id": "G0", "claim": "The changeset file has an unintentional back-tick before `sku.config option` and should read `sku.config option`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "`prodBabelPlugins` should be typed `Array<string | [string, ob...
null
seek-oss__sku__1339
seek-oss/sku
1,339
defect
ba0fd2aa00e895a10968bca71b9f527e01ac9e02
d0610d4f17d7b974a74117848f506bb83224ba75
`vite`: add pathAliases config for custom import paths
Adds support for custom path aliases in Vite projects via a new `pathAliases` configuration option.
diff --git a/.changeset/fine-ducks-peel.md b/.changeset/fine-ducks-peel.md new file mode 100644 index 000000000..43d967126 --- /dev/null +++ b/.changeset/fine-ducks-peel.md @@ -0,0 +1,5 @@ +--- +'sku': minor +--- + + Add pathAliases config for custom import paths in Vite projects. Automatically provides src/* alias an...
13
12
0
[{"id": "G0", "claim": "pathAliases should be a plain Record<string, string> rather than an array of records, which would simplify some of the logic.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The node_modules validation test should also assert on th...
null
seek-oss__sku__1405
seek-oss/sku
1,405
defect
e3906e3c2de8fe346664507b3ea6ca91305a4168
0b749e455eded781c9a8f1ce23aa568c8e3d03fb
Add warnings for unnecessary polyfills in `start`/`start-ssr` commands
# 🏴‍☠️ 🦜 POLY(fill) WANT A CRACKER? 🦜 🏴‍☠️ Our browser support policy has been evolving, but the polyfills teams use don't always keep up, resulting in larger bundle sizes than what is necessary. We've added warnings during `sku start` and `sku start-ssr` to help teams identify unnecessary polyfills that are no...
diff --git a/packages/sku/src/program/commands/start-ssr/start-ssr.action.ts b/packages/sku/src/program/commands/start-ssr/start-ssr.action.ts index 79c33d560..fd6d0d736 100644 --- a/packages/sku/src/program/commands/start-ssr/start-ssr.action.ts +++ b/packages/sku/src/program/commands/start-ssr/start-ssr.action.ts @@ ...
11
9
2
[{"id": "G0", "claim": "The polyfill registry list may not be 100% correct or exhaustive, and the author asks reviewers to highlight anything that looks wrong.", "category": "correctness", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "detectUnnecessaryPolyfills should filter a...
null
seek-oss__sku__1432
seek-oss/sku
1,432
defect
9b2f4b0c888c71b802a38ab9838bd93172c2a65a
04024cf1b7b9cdbc7e40d54d7156330545717ba1
`start(vite)`: fix fallback port displayed
Previously, when `sku start` encountered a port conflict and automatically switched to a fallback port, the output URL incorrectly displayed the original (unavailable) port instead of the actual fallback port being used. This fix ensures the output URL accurately reflects the fallback port that the application is runni...
diff --git a/.changeset/cuddly-lamps-say.md b/.changeset/cuddly-lamps-say.md new file mode 100644 index 000000000..eb13740ba --- /dev/null +++ b/.changeset/cuddly-lamps-say.md @@ -0,0 +1,5 @@ +--- +'sku': patch +--- + +`start(vite)`: Correct fallback port will be displayed when initial port is taken diff --git a/fixtur...
1
1
0
[{"id": "G0", "claim": "Swap the chalk usage in printUrls for node:util's styleText, since the codebase is slowly moving off Chalk.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}]
null
seek-oss__sku__1442
seek-oss/sku
1,442
defect
04eea40bb0706c118b993a12ea5ce49df7a29aec
180fd56bb8c2ed517165e96e54a4ca9e7f8aa006
Handle generics in expect chains
Once again vibe coded. Sorry not sorry. I tried to get this working upstream but it looks like it won't land any time soon: https://github.com/vitest-dev/vitest/pull/8266
diff --git a/.changeset/moody-laws-pick.md b/.changeset/moody-laws-pick.md new file mode 100644 index 000000000..20a422008 --- /dev/null +++ b/.changeset/moody-laws-pick.md @@ -0,0 +1,13 @@ +--- +'@sku-lib/codemod': minor +--- + +jest-to-vitest: Transform generics in `.resolves`/`.rejects` expect chains with `satisfies...
2
1
0
[{"id": "G0", "claim": "The implementation could use a more exhaustive ast-grep pattern match instead of findAll plus string fiddling, which might give more precise initial-query results and make extracting and manipulating arguments easier.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "in...
null
seek-oss__sku__885
seek-oss/sku
885
defect
954f4dd0d41effca7ba9719e6a9a567b841b3c23
5fff6cba32a9cd5c1caef60f7e6017c01d781dc6
Update webpack-related deps, clean up some deps
Not really sure why we had `webpack-dev-server` pinned. Also no idea how `require-from-string` got included in [this PR from a while ago](https://github.com/seek-oss/sku/pull/710/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R146). It's currently unused, and AFAICT it never was used. Als...
diff --git a/.changeset/many-nails-drop.md b/.changeset/many-nails-drop.md new file mode 100644 index 000000000..7f847150b --- /dev/null +++ b/.changeset/many-nails-drop.md @@ -0,0 +1,5 @@ +--- +'sku': patch +--- + +Bump `@pmmmwh/react-refresh-webpack-plugin` and `webpack-dev-server` dependencies. Remove unused depende...
2
1
0
[{"id": "G0", "claim": "babel-plugin-unassert should be bumped to its latest version (mrm007's accompanying idea of adding node:assert/strict to the plugin's default patterns was retracted in the same message).", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "pre_existing"}, {"id": "...
null
seek-oss__sku__966
seek-oss/sku
966
defect
33b01c5975acb9ad9d6043b09d2be26c516ce3ed
725d5d38a5c519289317d3e7b1e5b653dd156b18
Add support for removing functions named `invariant` and assertions from `tiny-invariant`
## Support `invariant` function and `tiny-invariant` library [`tiny-invariant`](https://www.npmjs.com/package/tiny-invariant) is a small, 0 dependency assertion library. The standard way of importing its assertion function is to name it `invariant`, which is why I added it to the `variables` config for `babel-plugin...
diff --git a/.changeset/seven-apes-tap.md b/.changeset/seven-apes-tap.md new file mode 100644 index 000000000..bf6d248f1 --- /dev/null +++ b/.changeset/seven-apes-tap.md @@ -0,0 +1,18 @@ +--- +'sku': minor +--- + +Add support for removing assertion functions named `invariant` and assertions from the `tiny-invariant` li...
1
1
0
[{"id": "G0", "claim": "The 'Supported Assertion Function Names' list should put `invariant` before `assert`, and possibly add a one-liner explaining why.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
segler-alex__RadioDroid__722
segler-alex/RadioDroid
722
defect
b085caa8f8d09649ff319824c04db15ab0523101
ef79bb300bce40f7ba86256ce1dbbe049bc55039
Upgrade ExoPlayer from 2.9.6 to 2.11.4
It seems to work just fine. The biggest issue is probably the required increase of minSdkVersion from 15 to 16. For now I've left all the original callbacks of our `IcyDataSource` and used the original routines to spread the metadata that's now received with the new callback `onMetadata` in `ExoPlayerWrapper`. On...
diff --git a/app/build.gradle b/app/build.gradle index 1b9bb5524..a900d87e1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -18,7 +18,7 @@ android { defaultConfig { applicationId "net.programmierecke.radiodroid2" - minSdkVersion 15 + minSdkVersion 16 targetSdkVersion 28 ...
16
10
4
[{"id": "G0", "claim": "After connection losses the audio comes back garbled because the metadata frames are played as audio (metadata offsets are miscomputed after the connection regains), and none of the reconnect approaches currently work with ExoPlayer 2.11.", "category": "correctness", "verdict": "supported", "pri...
null
segment-boneyard__nightmare__43
segment-boneyard/nightmare
43
defect
a3ba57e68dcf4445dbcdae4812961e00cb49339e
786f978766f78b040e01fec7f1e80effbd017b63
added a on() action, to handle phantom events.
Allows a user to attach callback to Phantom's page events. https://github.com/ariya/phantomjs/wiki/API-Reference-WebPage#callbacks-list Added tests, but for some reason the alert, prompt, and confirm event tests cause phantomjs to crash. However, they all work fine in normal usage. I have no idea what the issue is. Pe...
diff --git a/Readme.md b/Readme.md index 97b4177d..ba59b1aa 100644 --- a/Readme.md +++ b/Readme.md @@ -107,6 +107,23 @@ Set the `useragent` used by PhantomJS. #### .viewport(width, height) Set the `width` and `height` of the viewport, useful for screenshotting. Weirdly, you have to set the viewport before calling `.g...
2
2
0
[{"id": "G0", "claim": "Use markdown instead of HTML for the event list in the Readme.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Pass the callback directly to page.set instead of wrapping it in a function.", "category": "maintainability", "ve...
null
segment-boneyard__nightmare__437
segment-boneyard/nightmare
437
defect
f9f5143784aab193a154b073496723fcd8e07461
e3ca31c9ff67cd68dd29a80de9462240a9f26997
Added ability to return buffer from pdf
fixes #431
diff --git a/lib/actions.js b/lib/actions.js index c29d00fa..f408c041 100644 --- a/lib/actions.js +++ b/lib/actions.js @@ -450,13 +450,23 @@ exports.screenshot = function (path, clip, done) { exports.pdf = function (path, options, done) { debug('.pdf()'); - if (typeof options === 'function' && !done) { + if (ty...
1
1
0
[{"id": "G0", "claim": "The new test should use `Buffer.isBuffer` instead of an explicit `buf instanceof Buffer` check, for readability.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
segment-boneyard__nightmare__585
segment-boneyard/nightmare
585
defect
d855401bdfe57c6258a13dcf7b8e917950528df3
97e94ea6243bb2c645a4df180c4d54c292f1f4ed
test nonexistent selectors for `.type()` and `.insert()`, change exceptions to use `chai-as-promised`
Fixes #577.
diff --git a/lib/actions.js b/lib/actions.js index 8c34dc11..58b89e4e 100644 --- a/lib/actions.js +++ b/lib/actions.js @@ -145,7 +145,10 @@ exports.type = function() { } else { this.evaluate_now(function (selector) { document.querySelector(selector).focus(); - }, function() { + }, function(err) { +...
2
2
0
[{"id": "G0", "claim": "The error messages for a failed .type()/.insert() should be more explicit — e.g. saying the element could not be found and/or prefixed with the action name — so users can tell why the action failed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}...
null
segment-boneyard__nightmare__992
segment-boneyard/nightmare
992
defect
ba4bf06064b9c870cd87e03e1b008c635504717d
902e30a69ad9b94d47ed6cb883e97273a4e1a112
Override nightmare `Promise` library
Native ES6 Promises are nice, but libraries like [Bluebird](npmjs.com/package/bluebird) offer a lot of nice additional features. I'd like to be able to specify which Promise library/factory nightmare uses internally to wrap return values from `.then()` and `.catch()` *(inspired by [mongoose.Promise](http://mongoosejs.c...
diff --git a/Readme.md b/Readme.md index 8a5c9bd6..0d2c3b36 100644 --- a/Readme.md +++ b/Readme.md @@ -20,6 +20,7 @@ Many thanks to [@matthewmueller](https://github.com/matthewmueller) and [@rosshi - [Extract from the page](#extract-from-the-page) - [Cookies](#cookies) - [Proxies](#proxies) + - [Promises](#pr...
4
1
0
[{"id": "G0", "claim": "The require('bluebird') in the 'should allow to use external Promise' test could be assigned to a variable at the beginning of the generator function, which might look nicer.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "T...
null
segmentio__agecache__14
segmentio/agecache
14
defect
6857a7326986d54084336dfeb50fc32d15969459
bab267ab5840e392bb1c06093845a3680548b7b6
Resize method
This method resizes the cache capacity at runtime. We'd use it to scale our cache size up/down based on actual need.
diff --git a/cache.go b/cache.go index 59680b0..308a6c5 100644 --- a/cache.go +++ b/cache.go @@ -399,6 +399,29 @@ func (cache *Cache) Stats() Stats { } } +// Resize the cache to hold at most n entries. If n is smaller than the current +// size, entries are evicted to fit the new size. +func (cache *Cache) Resize(n...
2
2
1
[{"id": "G0", "claim": "Resize should return an error instead of panicking when given a non-positive capacity, letting the caller decide how to handle it at runtime.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The `if n >= c { return }` guard in Resiz...
null
segmentio__analytics-go__156
segmentio/analytics-go
156
defect
0126b29dd57f27a1493902a3da9adb46f0073640
57794f9920892b679c3a9effb155c6fcfb05cf5b
Expose the Message interface Validate method
By exposing the Message interfaces validate() method it allows the analytics types to be used externally in other code and not confined to the analytics-go library.
diff --git a/alias.go b/alias.go index 0084d20..b424c2b 100644 --- a/alias.go +++ b/alias.go @@ -2,6 +2,8 @@ package analytics import "time" +var _ Message = (*Alias)(nil) + // This type represents object sent in a alias call as described in // https://segment.com/docs/libraries/http/#alias type Alias struct { ...
2
2
0
[{"id": "G0", "claim": "The unexported internal() method that panics should be applied to all of the message types, not just Track, whose internal() is the only one with a panic body at S1.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The doc comment o...
null
segmentio__analytics-go__169
segmentio/analytics-go
169
defect
efd445faea4f9e73051c7bd22bf7fd0f02f59ee3
10b0033c0d144c26c181529cc591403b4424b9eb
Remove message internal-only restriction and add ValidateFields
This change removes the `internal()` method requirement for the `Message` interface. This is added so that only internal types may implement the `Message` interface. However, we have a need in two of our services to implement a custom message type with less restrictive value requirements. The `Validate()` method of the...
diff --git a/alias.go b/alias.go index e9dbe85..8ba0f73 100644 --- a/alias.go +++ b/alias.go @@ -19,10 +19,6 @@ type Alias struct { Integrations Integrations `json:"integrations,omitempty"` } -func (msg Alias) internal() { - panic(unimplementedError) -} - func (msg Alias) Validate() error { if len(msg.UserId) =...
1
1
1
[{"id": "G0", "claim": "Enforcing a map[string]interface{} argument in ValidateFields may be too opinionated about the contexts in which the function can be used; the author should consider other approaches.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
segmentio__analytics-go__66
segmentio/analytics-go
66
defect
ab34a85c387c25d72a3c6ab5bf7092db19380b37
ab3a4c222f31717d0ab3e1237f1b781ff8552639
Close client twice (v3.0)
@f2prateek @calvinfo Fixes #55 Follow up of #62 but will merge into `v3.0` instead of `master`. Please let me know if anything needs to be changed.
diff --git a/analytics.go b/analytics.go index 15ddd37..8b919e5 100644 --- a/analytics.go +++ b/analytics.go @@ -1,9 +1,9 @@ package analytics import ( + "io" "io/ioutil" "os" - "sync" "bytes" "encoding/json" @@ -124,7 +124,6 @@ type Client struct { shutdown chan struct{} uid func() string now ...
1
1
1
[{"id": "G0", "claim": "The second, duplicated TestCloseTwice function in analytics_test.go should be removed.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
segmentio__analytics-go__67
segmentio/analytics-go
67
defect
ab34a85c387c25d72a3c6ab5bf7092db19380b37
dd193f8cae49611d69b9a08960b39713432f6bf1
add analytics.Logger interface + .gitignore
@f2prateek @calvinfo Fixes #54 These changes add the `analytics.Logger` interface to make it easier to plug any logger to instances of `analytics.Client`. Please take a look and let me know if anything should be changed.
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..980eaf9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.g...
3
2
0
[{"id": "G0", "claim": "would this be better as `INFO:` (same for error)?", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "could we just do `var _ Logger = (*testing.T)(nil)` to assert interface compliance?", "category": "testing", "verdict": "supported", ...
null
segmentio__analytics-go__70
segmentio/analytics-go
70
defect
87fcf6e00878b267750a73aa23bd74bbf5eacdef
bf5cac2ebfdbedabb3080126af49d46d1c084fcf
Enqueue
@f2prateek @calvinfo Fixes #58 Fixes #56 Fixes #53 Hey guys, this pull request fixes the three issues mentioned above and adds a bunch of tests, it's more changes at once that I was expecting to make but as I was digging into the problems I realized making the changes individually would have required a lot of te...
diff --git a/alias.go b/alias.go new file mode 100644 index 0000000..472bbfa --- /dev/null +++ b/alias.go @@ -0,0 +1,50 @@ +package analytics + +import "time" + +// This type represents object sent in a alias call as described in +// https://segment.com/docs/libraries/http/#alias +type Alias struct { + MessageId strin...
3
1
1
[{"id": "G0", "claim": "The Alias message type is missing a few top-level properties that the API supports, e.g. integrations.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The internal serializable representation of the messages adds internal comp...
null
segmentio__analytics-next__1008
segmentio/analytics-next
1,008
defect
72dc35a46d7ba8ab90cab7a5190e9820c7dd0765
ab0b974168058fea75c716e2ed9d9030a6f6600e
Change segmentio to 'Destination' type
<!--- Hello! And thanks for contributing to the Analytics-Next 🎉 - Please add: - a description of your PR, including the what and why - a changeset (if applicable) Also make sure to describe how you tested this change, include any gifs or screenshots you find necessary. ---> This PR changes the segmen...
diff --git a/.changeset/lucky-chicken-wink.md b/.changeset/lucky-chicken-wink.md new file mode 100644 index 000000000..b3d23c41b --- /dev/null +++ b/.changeset/lucky-chicken-wink.md @@ -0,0 +1,6 @@ +--- +'@segment/analytics-next': minor +'@segment/analytics-node': minor +--- + +Change segmentio to destination type diff...
1
1
1
[{"id": "G0", "claim": "Switching segmentio to 'destination' type means destinations (or failures) no longer block segment, and there are no browser tests asserting that behavior — add some.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
segmentio__analytics-next__1015
segmentio/analytics-next
1,015
defect
a8b2a238aeeaecf051046765dc1b3aa5c90225b1
7ce0d51001ca64e827a057657029329e23c8a265
Node: deprecate `maxEventsInBatch` in favor of `flushAt`
Deprecate `maxEventsInBatch` in favor of `flushAt`. The purpose is to establish consistency between our SDKs, regardless of language. (Basically, let's go back to the original naming of maxEventsInBatch) Docs Change: https://github.com/segmentio/segment-docs/pull/5808
diff --git a/.changeset/fifty-trains-act.md b/.changeset/fifty-trains-act.md new file mode 100644 index 0000000000..c80f793e59 --- /dev/null +++ b/.changeset/fifty-trains-act.md @@ -0,0 +1,5 @@ +--- +'@segment/analytics-node': major +--- + +Deprecate `maxEventsInBatch` in favor of our commonly used: `flushAt`. The purp...
3
2
1
[{"id": "G0", "claim": "The `??=` assignments added in the constructor may not be transpiled and could cause problems with the minimum Node.js versions the package supports.", "category": "correctness", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The constructor should not mut...
null
segmentio__analytics-next__1032
segmentio/analytics-next
1,032
defect
833ade8571319a029f8e23511967ccb02d3496d4
a1012fbb80174604265a5229c3734545d3022960
Support loading analytics into a custom global variable when using snippet version 5.2.1 or later
<!--- Hello! And thanks for contributing to the Analytics-Next 🎉 - Please add: - a description of your PR, including the what and why - a changeset (if applicable) Also make sure to describe how you tested this change, include any gifs or screenshots you find necessary. ---> Fixes #1014 Please refe...
diff --git a/.changeset/kind-crabs-report.md b/.changeset/kind-crabs-report.md new file mode 100644 index 000000000..34d836747 --- /dev/null +++ b/.changeset/kind-crabs-report.md @@ -0,0 +1,6 @@ +--- +'@segment/analytics-next': patch +'@internal/browser-integration-tests': patch +--- + +Fix globalAnalyticsKey feature d...
9
5
1
[{"id": "G0", "claim": "The new standalone-custom-key.html integration test should follow the pattern of the other integration tests and live in standalone-playground.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The integration test loads analytics fr...
null
segmentio__analytics-next__1096
segmentio/analytics-next
1,096
defect
42d72f7a3f7566da01a45fcbe30276264b69e527
c145ac6a53c322dcee14a213d623ca2e5bd4e52e
Network signals
<!--- Hello! And thanks for contributing to the Analytics-Next 🎉 - Please add: - a description of your PR, including the what and why - a changeset (if applicable) Also make sure to describe how you tested this change, include any gifs or screenshots you find necessary. ---> - [ ] I've included a chan...
diff --git a/packages/signals/browser-signals/src/core/signal-generators/network.ts b/packages/signals/browser-signals/src/core/signal-generators/network.ts new file mode 100644 index 000000000..770510abb --- /dev/null +++ b/packages/signals/browser-signals/src/core/signal-generators/network.ts @@ -0,0 +1,80 @@ +import...
6
6
0
[{"id": "G0", "claim": "NetworkGenerator should be registered together with the DOM generators in a single registerGenerator call instead of a second separate call.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G2", "claim": "NetworkData should define concret...
null
segmentio__analytics-next__1100
segmentio/analytics-next
1,100
defect
1dbffec33cca61b2e1bd8e75def2bd9a90fa1494
fd295d5e531aa5adc003ca759038bee220e3be7b
Flush keepalive batches past keepalive limit
This PR immediately sends any batches that are over the 64 KB limit when the keepalive option is turned on to help prevent any data loss. - [ ] I've included a changeset (psst. run `yarn changeset`. Read about changesets [here](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md)).
diff --git a/.changeset/shaggy-dryers-press.md b/.changeset/shaggy-dryers-press.md new file mode 100644 index 000000000..efc9755a5 --- /dev/null +++ b/.changeset/shaggy-dryers-press.md @@ -0,0 +1,5 @@ +--- +'@segment/analytics-next': minor +--- + +Flush large keepalive requests diff --git a/packages/browser/src/plugins...
1
1
1
[{"id": "G0", "claim": "Should we add padding below the 64 KB keepalive limit, since in practice the max size is the total of all outbound requests with keep-alive and the buffer may be competing with other requests?", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
segmentio__analytics-next__1166
segmentio/analytics-next
1,166
defect
58ca71afc4515852bd162f076136473c60a5b897
ab4213033628a3a093c3559ea5a86051c75fd502
Signals sampling
<!--- Hello! And thanks for contributing to the Analytics-Next 🎉 - Please add: - a description of your PR, including the what and why - a changeset (if applicable) Also make sure to describe how you tested this change, include any gifs or screenshots you find necessary. ---> - [ ] I've included a chan...
diff --git a/packages/browser/src/browser/index.ts b/packages/browser/src/browser/index.ts index c9d1927ecf..603f80a31c 100644 --- a/packages/browser/src/browser/index.ts +++ b/packages/browser/src/browser/index.ts @@ -122,6 +122,15 @@ export interface CDNSettings { version: number } | {} + /** + ...
9
8
3
[{"id": "G0", "claim": "This cancellation/sampling setup logic in Signals.start() would be better suited to AnalyticsService, e.g. an analyticsService.signalsDisabled() facade, to keep initialization tidy.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "T...
null
segmentio__analytics-next__1341
segmentio/analytics-next
1,341
defect
ece6393914bec99bbcb95523cee494ebc45f353b
72253e62fa668e703646808215be11cf59c000cc
Emit integration invoke error metric for destination load failures
## Summary - Classic destination script loading (`loadIntegration`) and construction (`buildIntegration`) failures were not emitting any `analytics_js.integration.invoke.error` metrics — errors went straight to `handleLoadError` in event-queue.ts which only does `console.warn` and removes the plugin - Action destinati...
diff --git a/packages/browser/src/browser/index.ts b/packages/browser/src/browser/index.ts index 32801d93c..7114e0670 100644 --- a/packages/browser/src/browser/index.ts +++ b/packages/browser/src/browser/index.ts @@ -173,7 +173,10 @@ async function registerPlugins( options, tsubMiddleware, pluginSources ...
1
1
1
[{"id": "G0", "claim": "The new load-failure metric in remoteLoader tags failures with `integrationName: remotePlugin.creationName` while action destination metrics elsewhere in the module use the plugin's name (`this.action.name`), so load failures will be tagged under a different integration_name than the successful ...
null
segmentio__analytics-next__284
segmentio/analytics-next
284
defect
361031c6c2b223f1fd7ab1b2c30938881da25246
29e2525b973a91ed16f0a12edd07115b4c8676c8
Allow integrations that exist as an object
<!--- Hello! And thanks for contributing to the Analytics-Next 🎉 ---> AJS classic sent events to integrations that weren't explicitly true but existed in the integrations object when All: false is set. For example, `integrations: { All: false, Intercom: { user_hash: 'foo' } }` should send d...
diff --git a/src/core/queue/__tests__/event-queue.test.ts b/src/core/queue/__tests__/event-queue.test.ts index e34613f6e..2b78c2683 100644 --- a/src/core/queue/__tests__/event-queue.test.ts +++ b/src/core/queue/__tests__/event-queue.test.ts @@ -422,6 +422,35 @@ describe('Flushing', () => { expect(amplitude.track...
2
1
1
[{"id": "G0", "claim": "Check whether any type definitions need updating to support integrations that exist as an object.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "pre_existing"}, {"id": "G1", "claim": "The truthy `denyList[p.name]` check should be made explicit (e.g. `denyList[...
null
segmentio__analytics-next__313
segmentio/analytics-next
313
defect
ad055b3449f5ee62656bf21acd9540b614f582bc
8e60c19e666af560c99a4d8472b9ce184e011724
Ensure source middleware is added first in buffered operations
<!--- Hello! And thanks for contributing to the Analytics-Next 🎉 ---> This PR ensures that source middleware is added before other buffered operations are ran - for example on the initial page call in the segment snippet. ## Testing MW ran on snippet page call: ![image](https://user-images.githubuserc...
diff --git a/src/browser.ts b/src/browser.ts index c66872e69..067205912 100644 --- a/src/browser.ts +++ b/src/browser.ts @@ -85,7 +85,7 @@ function hasLegacyDestinations(settings: LegacySettings): boolean { ) } -function flushBuffered(analytics: Analytics): void { +async function flushBuffered(analytics: Analytic...
2
1
1
[{"id": "G0", "claim": "For simplicity, drop the async/await special case and instead run `addSourceMiddleware` immediately (without the `setTimeout`) while the rest of the buffered operations still run async in their own task.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id...
null
segmentio__analytics-next__360
segmentio/analytics-next
360
defect
343da6cd92ce0ec54c09174a3d728a15b0f4d0cf
d5836cb8e7971b4fa77aeff2e0196f47bf9f64df
Fix analytics on initialize
<!--- Hello! And thanks for contributing to the Analytics-Next 🎉 ---> This PR provides a fix to event handler registration during setup. By flushing event emitters from the buffer prior to a full buffer flush, we register the events early enough for user provided callbacks to fire as desired. ## Testing ...
diff --git a/src/__tests__/standalone-analytics.test.ts b/src/__tests__/standalone-analytics.test.ts index e70240e66..da36a5421 100644 --- a/src/__tests__/standalone-analytics.test.ts +++ b/src/__tests__/standalone-analytics.test.ts @@ -12,6 +12,7 @@ const page = jest.fn() const setAnonymousId = jest.fn() const regis...
1
1
0
[{"id": "G0", "claim": "Flush the buffered `on` handlers at the same time as `flushAnonymousUser` (i.e. earlier) so the code block with `analytics.initialized`/`analytics.emit` does not need to be moved, which may also fix the tests.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced...
null
segmentio__analytics-next__413
segmentio/analytics-next
413
defect
86ed4948916d2f37bfc037c32491f437ce47cd7f
332f739406ff518b79c9e7472d921d9f23c75db6
Add support for segment inspector
This patch adds the interface that allows inspector clients to connect and monitor all Segment activity happening on the page. This API is not related to the events API (over Emitter interface) by design, as both of these API's serve a very distinct purpose and will be developed at their own pace without breaking each ...
diff --git a/src/analytics.ts b/src/analytics.ts index 83411cd86..bf5771ea0 100644 --- a/src/analytics.ts +++ b/src/analytics.ts @@ -28,6 +28,7 @@ import type { MiddlewareFunction, } from './plugins/middleware' import { version } from './generated/version' +import { inspectorHost } from './inspector' const depr...
1
1
0
[{"id": "G0", "claim": "Drop the IIFE and let `inspectorHost` work off an `Analytics` object so values like the user id come from analytics (e.g. `analytics.user.id()`) instead of `localStorage.getItem('ajs_user_id')`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
segmentio__analytics-next__414
segmentio/analytics-next
414
defect
86ed4948916d2f37bfc037c32491f437ce47cd7f
8dbc6e31ed817d8cddc303c0058ddafa9e047079
feature: Add support for specifying CDN URL during .load call
This a continuation of https://github.com/segmentio/analytics-next/pull/407 which addresses https://github.com/segmentio/analytics-next/issues/362.
diff --git a/src/analytics.ts b/src/analytics.ts index 83411cd86..547f7c7bf 100644 --- a/src/analytics.ts +++ b/src/analytics.ts @@ -39,6 +39,7 @@ const _analytics = globalAny.analytics export interface AnalyticsSettings { writeKey: string + cdn?: string timeout?: number plugins?: Plugin[] [key: string]...
8
6
1
[{"id": "G0", "claim": "The library should not add a class whose methods are all static (a bag of functions); it should export plain functions operating on a CDN data structure as before, because classes are not tree-shakeable and do not allow minifying method names.", "category": "design", "verdict": "supported", "pri...
null
segmentio__analytics-next__418
segmentio/analytics-next
418
defect
5177fc1648f54b5719d68297f36de92864f7480b
13bf322a2b891d33b999640e499861ee8b4c79fd
fixes qa ci job by making integrations checking more resilient
QA job was failing again. The main cause was due to how we check the event's `integrations` object between classic and next. `analytics-next` can include action-destinations which classic doesn't, so we're seeing 1-2 sources where `integrations` contains more data with `next` due to these destinations than `classic`. ...
diff --git a/qa/__tests__/smoke.test.ts b/qa/__tests__/smoke.test.ts index fae614b37..274132c58 100644 --- a/qa/__tests__/smoke.test.ts +++ b/qa/__tests__/smoke.test.ts @@ -59,7 +59,17 @@ function compareSchema(results: RemovePromise<ReturnType<typeof run>>) { 'properties.url', 'messageId', - 'anon...
1
1
0
[{"id": "G0", "claim": "A comment showing an example of the ancestor-key expansion (e.g. ['hello', 'foo.bar.baz'] -> ['hello', 'foo.bar.baz', 'foo.bar', 'foo']) should be added above the do/while logic so a future reader does not have to follow the imperative logic.", "category": "documentation", "verdict": "supported"...
null
segmentio__analytics-next__552
segmentio/analytics-next
552
defect
aa3c901acd77597aa3c9bcb992369a39ef860919
8f44a30e29927e256b2a4acd3b0c44052ee0f35b
Suspend event deliveries until middlewares are ready
This patch fixes an important issue where a middleware will miss out on augmenting any events while it's being prepped up. Those events will reach all the destinations as-is without going through the said middleware. With this patch, `addSourceMiddleware` is now classified as a critical task, and thus will seize...
diff --git a/packages/browser/src/core/analytics/index.ts b/packages/browser/src/core/analytics/index.ts index 465b40eeae..9891f70518 100644 --- a/packages/browser/src/core/analytics/index.ts +++ b/packages/browser/src/core/analytics/index.ts @@ -354,19 +354,22 @@ export class Analytics extends Emitter { } asyn...
5
3
2
[{"id": "G0", "claim": "The TaskGroup class should have tests covering its behaviour, which could also be written at the integration level.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The run method could be typed as '<ReturnT, Operation extends (......
null
segmentio__analytics-next__629
segmentio/analytics-next
629
defect
6c3579999d8696b3ebd0ff5c52493a73ca11cdec
febb791463b1de006a299ac02930c3f667a02e70
Fix action destination middleware bug
<!--- Hello! And thanks for contributing to the Analytics-Next 🎉 - Please add: - a description of your PR, including the what and why - a changeset (if applicable) Also make sure to describe how you tested this change, include any gifs or screenshots you find necessary. ---> This PR fixes a bug where ...
diff --git a/.changeset/rich-icons-nail.md b/.changeset/rich-icons-nail.md new file mode 100644 index 000000000..ef305f219 --- /dev/null +++ b/.changeset/rich-icons-nail.md @@ -0,0 +1,5 @@ +--- +'@segment/analytics-next': patch +--- + +Fix bug where destination middleware were applying to other plugin types diff --git ...
1
1
0
[{"id": "G0", "claim": "A comment should be added explaining why the code has this if statement (skipping transform for non-destination plugin types).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
segmentio__analytics-next__638
segmentio/analytics-next
638
defect
4644afc5be2dac90465e16a485ef5c34ff694da3
3358219e1757384f3be66109971a1c9e5f384dda
RFC - Storage Layer for Plugins V2 💿
Second version of the RFC ( first version [here](https://github.com/segmentio/analytics-next/pull/594) ) Problem: If a plugin needs to use browser storage ( cookies, LS, etc. ), it has to implement the storage handling functionality, and Cookie handling in particular requires decent amount of code. Furthermore, plu...
diff --git a/packages/browser/src/core/analytics/index.ts b/packages/browser/src/core/analytics/index.ts index 77ee771937..42ebf54f20 100644 --- a/packages/browser/src/core/analytics/index.ts +++ b/packages/browser/src/core/analytics/index.ts @@ -24,7 +24,14 @@ import { } from '../events' import { Plugin } from '../p...
11
8
1
[{"id": "G0", "claim": "UniversalStorage should be made fully generic (like the event emitter) so callers get fully typed keys and values.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The number-to-string coercion inside getAndSync is confusing and sho...
null
segmentio__analytics-next__651
segmentio/analytics-next
651
defect
975fcf0c8dc081ce8a2d3386f780760d897fc558
99ad31ebf71054bc30577a52eb30508ec25769bc
Feature/node punch list
Addressing some issues and asserting feature parity https://segment.com/docs/connections/sources/catalog/libraries/server/node/#configuration 1. Added host/path setting with validation and tests 2. Flattened and normalized Settings 3. Added doc strings to make migration smooth. 4. Remove the word "Node" from publ...
diff --git a/packages/node-integration-tests/src/perf-tests/server-start-analytics.ts b/packages/node-integration-tests/src/perf-tests/server-start-analytics.ts index 18bff68c2..dc0c52aec 100644 --- a/packages/node-integration-tests/src/perf-tests/server-start-analytics.ts +++ b/packages/node-integration-tests/src/perf...
1
1
0
[{"id": "G0", "claim": "Two of the assertions in the 'should ignore slashes' test are identical — tryCreateFormattedUrl('http://foo.com', '/bar') appears twice — and the reviewer questions how those 2 lines are different.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
segmentio__analytics-next__683
segmentio/analytics-next
683
defect
98d1b127082f5fc7904980a561220c64c26edff3
c93a031eb85c2d1c15d79e490af5e70198d146a6
Adds integration test for action destinations in addDestinationMiddleware
Per the work done in https://github.com/segmentio/analytics-next/pull/597, there was a question of whether or not the existing `addDestinationMiddleware` function would support action destinations. It appears that the logic that used to only allow `LegacyDestinations` into the plugins array was removed at some point, a...
diff --git a/packages/browser/src/browser/__tests__/integration.test.ts b/packages/browser/src/browser/__tests__/integration.test.ts index 967d82702..7b97f1b47 100644 --- a/packages/browser/src/browser/__tests__/integration.test.ts +++ b/packages/browser/src/browser/__tests__/integration.test.ts @@ -18,6 +18,7 @@ impor...
1
1
0
[{"id": "G0", "claim": "The action-destination scenario should be broken out into its own test case (e.g. 'addDestinationMiddleware should include action destinations') instead of being overloaded into the existing 'supports registering destination middlewares' test, so the scenario is not refactored away.", "category"...
null
segmentio__analytics-next__688
segmentio/analytics-next
688
defect
f64835ab78c98938c7453870b3db0e13edee6df6
3c024dd30d8a06ecb3acdfd1fc5514199a3c7a46
Undefined options bug
Addressing #649, there was a gap in the `resolveArguments` logic that wouldn't let `options` be set if `properties` were `undefined`, as the original logic did not account for the case where `properties` wouldn't be defined.
diff --git a/packages/browser/src/core/arguments-resolver/__tests__/index.test.ts b/packages/browser/src/core/arguments-resolver/__tests__/index.test.ts index e47fa0f61..7c56255d3 100644 --- a/packages/browser/src/core/arguments-resolver/__tests__/index.test.ts +++ b/packages/browser/src/core/arguments-resolver/__tests...
1
1
1
[{"id": "G0", "claim": "The pull request is missing a changeset and one should be added.", "category": "process", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
segmentio__analytics-next__697
segmentio/analytics-next
697
defect
6119d8f51e2de13fe538b6ba3e6473ccb469cc28
570335df44f1d0f0867a8e0ab0161aa8dff187ec
node: eliminate flush delay
If closeAndFlush is called, we to wait for pending events to make it to the segment plugin before flushing, but not wait any additional time for the flushInterval to expire.
diff --git a/packages/node/src/__tests__/graceful-shutdown-integration.test.ts b/packages/node/src/__tests__/graceful-shutdown-integration.test.ts index 637c7ad16..bda49aaa7 100644 --- a/packages/node/src/__tests__/graceful-shutdown-integration.test.ts +++ b/packages/node/src/__tests__/graceful-shutdown-integration.tes...
3
2
2
[{"id": "G0", "claim": "The comment's guarantee that no more items will enter the batch after close may not hold if someone adds an `after` plugin, though worst case the batch would just be sent on the timeout as prior to these changes.", "category": "correctness", "verdict": "uncertain", "priority": "P2", "scope": "in...
null
segmentio__analytics-next__764
segmentio/analytics-next
764
defect
ef47e9e469390062b44790b6f92bb976708fab71
3d9488c7a18c58d2ff38b6fd693379b7e94a1c2b
Add comprehensive message lifecycle events
Add `delivery_retry` lifecycle event and update `message_enriched` to include the Plugin that enriched the message
diff --git a/.changeset/orange-mayflies-sip.md b/.changeset/orange-mayflies-sip.md new file mode 100644 index 0000000000..085e4f2df9 --- /dev/null +++ b/.changeset/orange-mayflies-sip.md @@ -0,0 +1,6 @@ +--- +'@segment/analytics-next': patch +'@segment/analytics-core': patch +--- + +Add comprehensive message lifecycle ...
4
3
1
[{"id": "G0", "claim": "The new delivery_retry event is of questionable value, since most delivery and segment.io plugins handle their own retries outside the main event queue and only before plugins/source middleware can trigger a pipeline retry.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope...
null
segmentio__analytics-next__864
segmentio/analytics-next
864
defect
40745ffe649556195405118d0f33e81d8e7c3b14
b607ecbd9d8aeb436c58ff5061b507e322ffb73c
Introduce Client Hints API
<!--- Hello! And thanks for contributing to the Analytics-Next 🎉 - Please add: - a description of your PR, including the what and why - a changeset (if applicable) Also make sure to describe how you tested this change, include any gifs or screenshots you find necessary. ---> This PR introduces the Cli...
diff --git a/packages/browser/src/core/analytics/index.ts b/packages/browser/src/core/analytics/index.ts index f597303e8..7ca8efa53 100644 --- a/packages/browser/src/core/analytics/index.ts +++ b/packages/browser/src/core/analytics/index.ts @@ -48,6 +48,7 @@ import { version } from '../../generated/version' import { P...
8
7
1
[{"id": "G0", "claim": "Encapsulate the client-hints code into a separate file/folder, e.g. under browser/lib/client-hints/.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Avoid augmenting global Navigator interfaces, which leaks into consumers'...
null
segmentio__analytics-next__888
segmentio/analytics-next
888
defect
9ff3fe48e21f846a39379db7d23a79bc58996d03
9af8b89261818c2987d9ff6026bfe4b9adcea123
Fix query string bug
<!--- Hello! And thanks for contributing to the Analytics-Next 🎉 - Please add: - a description of your PR, including the what and why - a changeset (if applicable) Also make sure to describe how you tested this change, include any gifs or screenshots you find necessary. ---> - Since we started looking...
diff --git a/.changeset/neat-emus-call.md b/.changeset/neat-emus-call.md new file mode 100644 index 000000000..e1f4da6b4 --- /dev/null +++ b/.changeset/neat-emus-call.md @@ -0,0 +1,5 @@ +--- +'@segment/analytics-next': patch +--- + +Fix query string parsing bug that was causing events containing the 'search' property w...
3
1
1
[{"id": "G0", "claim": "page.search should always be a string per the Segment page spec, and while the typeof guard stops errors from being thrown it does not exactly solve the underlying issue of track event.properties overriding page.", "category": "correctness", "verdict": "opposed", "priority": "P1", "scope": "pre_...
null
segmentio__analytics-next__915
segmentio/analytics-next
915
defect
70cc6e61a809bd44a9e34555b64da9a3b8672fdf
d4dca8d1d3b5992c772f99851d01605162cb333e
Fix batching after page navigation
<!--- Hello! And thanks for contributing to the Analytics-Next 🎉 - Please add: - a description of your PR, including the what and why - a changeset (if applicable) Also make sure to describe how you tested this change, include any gifs or screenshots you find necessary. ---> This PR addresses a bug wh...
diff --git a/.changeset/orange-actors-hug.md b/.changeset/orange-actors-hug.md new file mode 100644 index 000000000..2d444d9c6 --- /dev/null +++ b/.changeset/orange-actors-hug.md @@ -0,0 +1,5 @@ +--- +'@segment/analytics-next': patch +--- + +Fix batching after page navigation diff --git a/.github/PULL_REQUEST_TEMPLATE ...
2
2
0
[{"id": "G0", "claim": "The onPageChange callback type signature should be (unloaded: boolean) => void rather than (...args: boolean[]) => void, since only one bool argument is passed.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The explicit 'boo...
null
segmentio__analytics-next__946
segmentio/analytics-next
946
defect
ee855bad751c393a40dcbde7ae861f27d2b4da26
82e0cc8b24cc90d73366c6f42268786afa11173a
Add sentAt field to node for Segment events
<!--- Hello! And thanks for contributing to the Analytics-Next 🎉 - Please add: - a description of your PR, including the what and why - a changeset (if applicable) Also make sure to describe how you tested this change, include any gifs or screenshots you find necessary. ---> This PR updates node to in...
diff --git a/packages/node/src/__tests__/http-client.integration.test.ts b/packages/node/src/__tests__/http-client.integration.test.ts index d84562fd2..5fdd4ed56 100644 --- a/packages/node/src/__tests__/http-client.integration.test.ts +++ b/packages/node/src/__tests__/http-client.integration.test.ts @@ -37,6 +37,9 @@ c...
1
1
1
[{"id": "G0", "claim": "sentAt should be set only at the root of the request body (same level as .batch), not added to every individual event, matching the old analytics-node behaviour since the ingestion pipeline appends the value to each event.", "category": "design", "verdict": "supported", "priority": "P1", "scope"...
null
segmentio__analytics-next__974
segmentio/analytics-next
974
defect
6628624cfdf748522adf60e3b2e3c3b834915175
a97d76fb26d04c7066687c210cafe4ce10ca1f57
Add @segment/analytics-generic-utils
Add @segment/analytics-generic-utils package. The impetus is I want to use this package for some new consent work. I did a small refactor with node (as an example), but there are more methods to share.
diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 03105313e..e803dd908 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -98,6 +98,21 @@ steps: key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}" paths: ['.yarn/cache/'] + - label: '[Generic Utils] Lint + Test...
4
3
0
[{"id": "G0", "claim": "The new LICENSE file should say 'Copyright © 2023 Segment' instead of 2021.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The README sentence should drop the duplicated word ('represents contains' -> 'contains').", "catego...
null
segmentio__asm__11
segmentio/asm
11
defect
cc82da336798ab943f0b427dfe8f483353f43614
37e37ca2acd03cbb4f1de7daf446befb7a8e9701
mem.ContainsByte
This PR introduces a `mem.ContainsByte` function that checks whether the input contains a byte. It's equivalent to `bytes.IndexByte(input, byte) != -1`
diff --git a/build/internal/x86/bytes.go b/build/internal/x86/bytes.go index bde765ff..e5e2f7a4 100644 --- a/build/internal/x86/bytes.go +++ b/build/internal/x86/bytes.go @@ -94,39 +94,64 @@ func GenerateCopy(name, doc string, transform []func(Op, Op)) { CMOVQLT(x, n) Store(n, ReturnIndex(0)) - VariableLengthByte...
3
2
1
[{"id": "G0", "claim": "Asks whether ContainsByte should provide the same signature as IndexByte, returning the index of the matched byte instead of just a bool.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The main AVX2 loop could get a bit more speed b...
null
segmentio__asm__3
segmentio/asm
3
defect
7b56d31d1ee16ef213e5c8e85d4f977457024520
c4e23ac9553bfc7683e9fba8b59f9b05b3bf3f19
bswap.Swap64
This PR introduces a `bswap.Swap64(b []byte)` function that performs a byte swap on each 64-bit qword in the input buffer (i.e. `BSWAPQ`). Example with 64KiB of input: ``` cpu: Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz BenchmarkSwap64-4 1000000 1077 ns/op 60864.99 MB/s ``` The function will be used...
diff --git a/Makefile b/Makefile index 9c068705..64c35a65 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,7 @@ dstdir := $(CURDIR) srcdir := $(CURDIR)/build sources := \ - $(wildcard $(srcdir)/*_asm.go \ - $(srcdir)/bloom/*_asm.go) + $(wildcard $(srcdir)/*/*_asm.go) targets := \ $(patsubst $(srcdir)/%_asm.go,$...
3
3
2
[{"id": "G0", "claim": "MOVBE may not be part of the default x86 instruction set, and AVO is adding MOVBE to the required features of the generated assembly, so the code should avoid relying on it.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The ...
null
segmentio__asm__37
segmentio/asm
37
defect
f36a5581abfccd27f4c6d09785eb1c8fd4ea443b
00c187ef5ada0efd2e2203f6cd2daf2c5243b256
Base64
I was curious how fast we could might be able to do some base64 encoding, so I started this based on https://github.com/aklomp/base64/tree/master/lib/arch/avx2 with some tweaks. This is a first pass, but it shows a 10x performance increase without much optimization. The thought is this might be a faster way to encode `...
diff --git a/base64/base64.go b/base64/base64.go new file mode 100644 index 00000000..dd2128d4 --- /dev/null +++ b/base64/base64.go @@ -0,0 +1,67 @@ +package base64 + +import ( + "encoding/base64" +) + +const ( + StdPadding rune = base64.StdPadding + NoPadding rune = base64.NoPadding + + encodeStd = "ABCDEFGHIJKLMNOP...
1
1
1
[{"id": "G0", "claim": "A VZEROUPPER instruction should be added before returning from the AVX2 decode routine so stale upper vector register state does not cause SSE-only slowdowns.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
segmentio__asm__4
segmentio/asm
4
defect
7b56d31d1ee16ef213e5c8e85d4f977457024520
f09f25c0dd1cfe0631901f68528f9f1aad4d72ea
CPU Feature Handling
This PR introduces a centralized strategy for enabling CPU feature checking branches. This is done through the a few new pieces: 1. A new `cpu` package that collects some needed CPU feature flags and packs them into a single 64-bit integer. This is similar conceptually to the results of invoking `CPUID` directly, bu...
diff --git a/Makefile b/Makefile index 9c068705..eabf2e00 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,22 @@ dstdir := $(CURDIR) srcdir := $(CURDIR)/build -sources := \ - $(wildcard $(srcdir)/*_asm.go \ - $(srcdir)/bloom/*_asm.go) +sources := $(wildcard \ + $(srcdir)/*_asm.go \ + $(srcdir)/bloom/*_asm.go \ +) ...
2
1
0
[{"id": "G0", "claim": "The package in build/internal/x86/cpu.go is named amd64 even though the directory is x86, and should be named to match the directory.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer asked whether TESTQ could potentiall...
null
segmentio__asm__40
segmentio/asm
40
defect
f36a5581abfccd27f4c6d09785eb1c8fd4ea443b
bb2ad5c0133f47933128bedfc918c7a7937d4370
zip package, SumUint64.
Here's a first go at providing some zip like functionality. Definitely open to package name and feedback on organization. I was thinking perhaps we can implement for a few types and probably some other SSE instructions for mul, div, sub, etc. ``` rjenkins@lappy:~/asm/zip$ go test -v -cpu 1,2,4,8,16 -bench . === R...
diff --git a/build/zip/zip_asm.go b/build/zip/zip_asm.go new file mode 100644 index 00000000..c32acf05 --- /dev/null +++ b/build/zip/zip_asm.go @@ -0,0 +1,110 @@ +// +build ignore + +package main + +import ( + . "github.com/mmcloughlin/avo/build" + . "github.com/mmcloughlin/avo/operand" + "github.com/mmcloughlin/avo/re...
9
5
1
[{"id": "G0", "claim": "The end offsets could be computed by shifting left (SHLQ) by 3 instead of multiplying by 8.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The generated assembly's AVX2 feature check is commented out because of a relocation e...
null
segmentio__chamber__111
segmentio/chamber
111
defect
7c1c368306411c8a6d04ae00fd6e06711566673c
10749f5229807df7f265e4c8c93a0d4c027919d9
S3 backend
This PR adds an experimental S3 backend. We have run into some AWS rate limiting issues around using Parameter Store at scale, even when using the newer GetParameterByPaths API. For some very high concurrency cases, we want to explore using S3 with server side encryption, and it would be nice if we could continue to ...
diff --git a/README.md b/README.md index ed9ae605..5ba8c424 100644 --- a/README.md +++ b/README.md @@ -196,6 +196,14 @@ for more details. If you'd like to use a different region for chamber without changing `AWS_REGION`, you can use `CHAMBER_AWS_REGION` to override just for chamber. +## S3 Backend (experimental) +...
5
3
1
[{"id": "G0", "claim": "The S3 backend should not default to a bucket named chamber-secrets; instead it should fail with an error when CHAMBER_S3_BUCKET is not set.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The switch in getSecretStore could be simp...
null
segmentio__chamber__118
segmentio/chamber
118
defect
77c61e07b53557e67a0f1d23cf8aca4064b69133
5b5bbe39e568679662cdc6073c59678d1bae5dda
Support Variable Depths and improve regex
Based on the work of #70 but improving the regex and adding a separate validator for `/` paths. Given we have no tests, I have left some comments explaining how the validation is expected to work, but I can easily remove it if you believe its too much noise/ugly. (which it is, but I dont know how else to document th...
diff --git a/cmd/list.go b/cmd/list.go index 83adedc8..61ce877c 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -66,13 +66,12 @@ func list(cmd *cobra.Command, args []string) error { func key(s string) string { _, noPaths := os.LookupEnv("CHAMBER_NO_PATHS") - if !noPaths { - tokens := strings.Split(s, "/") - secret...
5
4
2
[{"id": "G0", "claim": "Unit tests covering the validation formats should be added in store/ssmstore_test.go (runnable with go test ./...), since the file does not actually test the regexes.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "SSMStore should...
null
segmentio__chamber__227
segmentio/chamber
227
defect
e6c04494a55512adac4c4f2530dc9ac8b676b662
70817fb99ada0f0e02ad246601b10fd346f5ecd1
feat: Add `exec --strict`
Strict mode ensures that the values getting injected are the values you expect. It is off by default. In strict mode, `chamber exec` ensures that every injected secret has a corresponding env var in the parent environment with a sentinel value (default `chamberme`). One use case is that you if you're using chambe...
diff --git a/.circleci/config.yml b/.circleci/config.yml index 4fe8f075..b7521f04 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,8 +2,7 @@ version: 2 jobs: test-install-golang-prev: docker: - - image: circleci/golang:1.10 - working_directory: /go/src/github.com/segmentio/chamber + ...
4
3
0
[{"id": "G0", "claim": "Exec should log that pristine mode is enabled (at least when debugging) so users realize it is on.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a short unit test for Environ.Map(), even though the behavior is straig...
null
segmentio__chamber__242
segmentio/chamber
242
defect
72a39a7787ae7f021cd52cdf9b087730435c78ee
d414ac7382d3c99324a5eceb070e5b92fc8d58f9
Label support for SSMStore
Added support for SSMStore. Format: `/foo:v1`, `/foo` service, `v1` is the label. This is backwards compatible and does not break existing API.
diff --git a/cmd/exec.go b/cmd/exec.go index 95dbd9de..fb337ba9 100644 --- a/cmd/exec.go +++ b/cmd/exec.go @@ -87,7 +87,7 @@ func execRun(cmd *cobra.Command, args []string) error { } for _, service := range services { - if err := validateService(service); err != nil { + if err := validateServiceWithLabel(servic...
2
1
0
[{"id": "G0", "claim": "It would be nice to add the k value to the test scenario name so that a failing case can be distinguished.", "category": "testing", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "nit: the else blocks in parseServiceLabel are unnecessary since the if alwa...
null
segmentio__chamber__347
segmentio/chamber
347
defect
79dd716042dbc826455bc9fe52290fe09a3d8c87
ade72496d6ae1391006a218a569862dd7ed07f20
fix: enhance error message to clarify validity of forward slashes in service names
enhance error message to clarify validity of forward slashes in service names Resolves #333
diff --git a/cmd/root.go b/cmd/root.go index 174ec8a2..5685a328 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -110,7 +110,7 @@ func validateService(service string) error { } } else { if !validServicePathFormat.MatchString(service) { - return fmt.Errorf("Failed to validate service name '%s'. Only alphanumeric...
2
2
0
[{"id": "G0", "claim": "In validateService's error message, use single spaces and the two-word forms \"forward slash\" and \"full stop\" to match the style used elsewhere.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In validateServiceWithLabe...
null
segmentio__chamber__385
segmentio/chamber
385
defect
6f02bdfbc657c0f5aeb1295ef32e252e2b516e32
7fab80106d3c0e67ec57957c99378afe1558cef8
Fix `chamber env` and `chamber export -f dotenv`
This was reported in https://github.com/segmentio/chamber/issues/366: `chamber` made no effort to sanitize keys for either of these commands or formats, which can result in invalid variable names being used for both of these output formats. This PR fixes half of the problem (invalid characters in retrieved keys when re...
diff --git a/cmd/env.go b/cmd/env.go index 03473f21..189f7073 100644 --- a/cmd/env.go +++ b/cmd/env.go @@ -3,13 +3,19 @@ package cmd import ( "fmt" "regexp" + "sort" "strings" + "github.com/alessio/shellescape" analytics "github.com/segmentio/analytics-go/v3" "github.com/segmentio/chamber/v2/utils" + "gi...
3
2
0
[{"id": "G0", "claim": "The regexps in validateShellName should be moved into the shared list of valid format regexps in cmd/root.go instead of being defined inline.", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `i` counter in sortedKeys is c...
null
segmentio__chamber__40
segmentio/chamber
40
defect
acc4072df92f2763217ccfa5373e14f342e178ba
b2635286ed40f47650c73b06aa9536cc42149a94
Delete entries
This PR addresses an issue I had where an incorrect secret key was added to a service and there seemed to be no way of removing this key once it was there. It adds the following command: ```bash $ chamber del service key ``` command, which just attempts to delete the specified key for that service using `ss...
diff --git a/README.md b/README.md index b3d6cf04..eca6f5dc 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,16 @@ that is unneeded. Parameter store automatically versions secrets and passing the `--version/-v` flag to read can print older versions of the secret. Default version (-1) is the latest secret. + +#...
2
2
2
[{"id": "G0", "claim": "The `del` command in the README should be renamed `chamber delete`.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The delete command should be named `chamber delete`, and the branch should be rebased on master.", "category": "des...
null
segmentio__chamber__507
segmentio/chamber
507
defect
6e1ecd6f3a6eb7e999a1f3accc181c5031fada19
913716b09ccc7c1baa09b417a9f912672ec7e671
feat: Add tag read, write, and delete commands
The new commands are for reading, writing, and deleting tags on the underlying resources representing secrets. For now, the commands are only implemented for SSM parameters.
diff --git a/cmd/root.go b/cmd/root.go index 334e9a8b..5eab037b 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -21,6 +21,8 @@ var ( validKeyFormat = regexp.MustCompile(`^[\w\-\.]+$`) validServicePathFormat = regexp.MustCompile(`^[\w\-\.]+(\/[\w\-\.]+)*$`) validServicePathFormatWithLabel =...
2
1
1
[{"id": "G0", "claim": "SSMStore.WriteTags only uses the current tags when deleting other tags, so ReadTags should be called only in that case instead of unconditionally on every write.", "category": "performance", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The --delete-oth...
null
segmentio__chamber__548
segmentio/chamber
548
defect
e79a86416595d7caf16e713868e02f369d72e127
8bd05d6ad81de56ae46b57716fd62f229390b796
feat: Enforce required tags in SSM store
The behavior is as follows: * When writing a new secret, all required tags must be provided. * When writing tags to a secret, and other tags are being deleted, then all required tags that are already present on the secret must be provided. * When deleting tags from a secret, required tags may not be provided. T...
diff --git a/store/ssmstore.go b/store/ssmstore.go index aca5171f..16dc2f8d 100644 --- a/store/ssmstore.go +++ b/store/ssmstore.go @@ -162,6 +162,11 @@ func (s *SSMStore) write(ctx context.Context, id SecretId, value string, tags ma return errors.New("tags on write only supported for new secrets") } + err = s.ch...
3
1
0
[{"id": "G0", "claim": "The reviewer thought that a required tag already present and not being updated should be allowed to stay, and asks the author to elaborate on the for loop and especially the if statement that flags it as missing.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope":...
null
segmentio__events__3
segmentio/events
3
defect
234b365c5a512742b0f894213e5efbf39412a867
b97e563251bee3de15de5a6cdee1e027d06fdc3e
Httpevents
@f2prateek @yields Alright last change for tonight, this is a `http.Handler` wrapper which automatically produces access logs. I have a couple of questions about the change, see inline.
diff --git a/httpevents/handler.go b/httpevents/handler.go new file mode 100644 index 0000000..3b16ca0 --- /dev/null +++ b/httpevents/handler.go @@ -0,0 +1,79 @@ +package httpevents + +import ( + "net/http" + + "github.com/segmentio/events" +) + +// NewHandler wraps the HTTP handler with and access logger which generat...
6
2
0
[{"id": "G0", "claim": "The access-log call in the response writer's WriteHeader should perhaps be a Debug call, since there are arguments both for and against emitting access logs in production.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The keyed f...
null
segmentio__events__30
segmentio/events
30
defect
1801272406b7df9bbc4d227fe041fc1930b2c6e3
bd3358ccdb1a49a3dcc77aad1b6d02585769d464
Delete Authorization header from logs
Currently, the httpevents logger logs all headers. This opens the possibility for logging credentials via the Authorization header. This PR removes the Authorization header to prevent situations of logging credentials to logs
diff --git a/httpevents/handler_test.go b/httpevents/handler_test.go index c7052cc..6d976d4 100644 --- a/httpevents/handler_test.go +++ b/httpevents/handler_test.go @@ -41,6 +41,7 @@ func TestHandler(t *testing.T) { req := httptest.NewRequest("GET", "/hello?answer=42", nil) req.Header.Set("User-Agent", "httpevent...
1
1
1
[{"id": "G0", "claim": "Deleting the Authorization header in reset() mutates the original request rather than only the logging copy, which would prevent the application from reading that header; the deletion should happen on the copy instead.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope...
null
segmentio__events__6
segmentio/events
6
defect
386ae464cb0fecd1e04e31ad7fb6547d0a000166
27c6750f66cdb94910b432355de4e95b2dbefe53
add text.Handler.EnableArgs
@f2prateek Follow up of our earlier conversation, add a way to control the output of the text handler that doesn't depend on how the events were generated.
diff --git a/text/handler.go b/text/handler.go index 765473f..256efd7 100644 --- a/text/handler.go +++ b/text/handler.go @@ -21,6 +21,7 @@ type Handler struct { Prefix string // written at the beginning of each formatted event TimeFormat string // format used for the event's time TimeLocat...
1
1
0
[{"id": "G0", "claim": "The pull request should add a couple of tests to improve coverage.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
segmentio__evergreen__1324
segmentio/evergreen
1,324
defect
674d9a1d31786e7d00088b8553f353d7fee59732
0c22faf71b8c6047543374abb1649e2809fe11bf
Associate library-generated `description`, `hint` and `validationMessage` nodes with `aria-describedby`
Closes #1323. ## Overview When an author provides `description`, `hint` and `validationMessage` values as strings, `evergreen-ui` now generates the right `aria-describedy` values to ensure that these messages are exposed to assistive technology. ⚠️ **Note:** Authors are still required to write their own `aria-desc...
diff --git a/src/form-field/src/FormField.js b/src/form-field/src/FormField.js index e23b4d7544..ad5087ef08 100644 --- a/src/form-field/src/FormField.js +++ b/src/form-field/src/FormField.js @@ -26,15 +26,27 @@ const FormField = memo( <FormFieldLabel htmlFor={labelFor} isAstrixShown={isRequired} {...labelPro...
2
2
1
[{"id": "G0", "claim": "The aria-describedby value added in SelectField lands on the Select's wrapper element instead of the inner <select>; the Select component should always pass aria-describedby down to the inner select element.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introdu...
null
segmentio__evergreen__1352
segmentio/evergreen
1,352
defect
b76bd424bead9fc43b1c30412fa36d14b938235c
aca32428cbe0f6c02db51177387abe9b3f7b3782
correctly forward className in code component
<!--- Hello! And thanks for contributing to Evergreen 🎉 We appreciate the time you took to open this pull request. Please take a couple more minutes to document your pull request to ensure we can quickly review it and provide you feedback. Unfortunately, if we do not have enough information or the feature does...
diff --git a/src/typography/src/Code.js b/src/typography/src/Code.js index b81318908..6b7f10092 100644 --- a/src/typography/src/Code.js +++ b/src/typography/src/Code.js @@ -12,7 +12,7 @@ const Code = memo( const styleProps = useStyleConfig('Code', { appearance }, pseudoSelectors, internalStyles) - return <T...
1
1
1
[{"id": "G0", "claim": "Add a test case covering the className forwarding bug fix in the Code component.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
segmentio__evergreen__1421
segmentio/evergreen
1,421
defect
2839d832e9b5489f690f6898739043f3308b885c
61f43361e0c05a75a7bc1ade96ebd9b2878add61
Swap with @faker-js/faker, update imports
<!--- Hello! And thanks for contributing to Evergreen 🎉 We appreciate the time you took to open this pull request. Please take a couple more minutes to document your pull request to ensure we can quickly review it and provide you feedback. Unfortunately, if we do not have enough information or the feature does...
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88778a77c..63c18a9e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node_version: [12] + node_version: [14.18] steps: ...
2
2
1
[{"id": "G0", "claim": "Use the named import `import { faker } from '@faker-js/faker'` instead of the default import, because the default export is to be removed in a future major release (and, if only English locales are needed, `import faker from '@faker-js/faker/locale/en'` to load ~600kb instead of ~2.5mb).", "cate...
null
segmentio__evergreen__1524
segmentio/evergreen
1,524
defect
80f4f65714a02cdca69f6f4ac5663e38db111ec7
19a73d65f3f8d2a7b4233a8b57ee64766cad89a0
Adds HTML name attribute support for RadioGroup
<!--- Hello! And thanks for contributing to Evergreen 🎉 We appreciate the time you took to open this pull request. Please take a couple more minutes to document your pull request to ensure we can quickly review it and provide you feedback. Unfortunately, if we do not have enough information or the feature does...
diff --git a/src/radio/__tests__/RadioGroup.test.js b/src/radio/__tests__/RadioGroup.test.js index ee914af84..e488c6278 100644 --- a/src/radio/__tests__/RadioGroup.test.js +++ b/src/radio/__tests__/RadioGroup.test.js @@ -49,5 +49,12 @@ describe('Radio Group', () => { expect(onChangeMock).toBeCalledTimes(1) }) ...
1
1
1
[{"id": "G0", "claim": "Add a test verifying that each radio input still has a (auto-generated) name attribute when the name prop is not passed in.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
segmentio__evergreen__1541
segmentio/evergreen
1,541
defect
05e9253409460fd4d22bec2f14ed62fb288c9419
634d186070ebc779ef8b12600422baa8a5330846
feat(FilePicker): props for i18n support
<!--- Hello! And thanks for contributing to Evergreen 🎉 We appreciate the time you took to open this pull request. Please take a couple more minutes to document your pull request to ensure we can quickly review it and provide you feedback. Unfortunately, if we do not have enough information or the feature does...
diff --git a/docs/documentation/components/file-picker.mdx b/docs/documentation/components/file-picker.mdx index 9813537dc..9f42a039d 100644 --- a/docs/documentation/components/file-picker.mdx +++ b/docs/documentation/components/file-picker.mdx @@ -30,3 +30,9 @@ ```jsx <FilePicker disabled width={250} /> ``` + +## L...
2
2
1
[{"id": "G0", "claim": "The doc-site example does not recognize the new FilePicker properties even after following the readme and running yarn build.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The four static text props should be reduced to tw...
null
segmentio__evergreen__219
segmentio/evergreen
219
defect
9d606cf4e34b3ed352d923de2111e7deee6fa49b
dc3c7c2086d179edb67f50e209e8e496af4f018c
Fix popover not closed when toggle button has children
Closes #218 **In this PR** Fix the popover not being closed when clicking on button that has children (icon...) ![kapture 2018-07-10 at 17 32 05](https://user-images.githubusercontent.com/7209644/42544518-3b576f78-8467-11e8-93a9-27f52bb38a0d.gif)
diff --git a/src/popover/src/Popover.js b/src/popover/src/Popover.js index 93b5567d8..996f74799 100644 --- a/src/popover/src/Popover.js +++ b/src/popover/src/Popover.js @@ -168,7 +168,7 @@ export default class Popover extends Component { onBodyClick = e => { // Ignore clicks on the popover or button - if (...
2
2
1
[{"id": "G0", "claim": "Node.contains() checks the node itself as well, so the `this.targetRef === e.target` self-check is redundant and the condition could be simplified to just `this.targetRef.contains(e.target)`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id"...
null
segmentio__evergreen__619
segmentio/evergreen
619
defect
6c03c7ced3b4e8e3eddd2e5027328388ffdf3ccf
e925d5f72ac7296be71c82bd0f6579c94e985e97
Add placholder on FilePicker component
The issue #531 said about need of the placeholder filepicker need to be dynamic, because the default placeholder is in english, so now the placeholder is passed from props.
diff --git a/docs/src/IA.js b/docs/src/IA.js index f0f786441..18a3f768e 100644 --- a/docs/src/IA.js +++ b/docs/src/IA.js @@ -169,7 +169,8 @@ export default { id: 'filepicker', github: githubLink('file-picker'), name: 'Filepicker', - image: Filepicker + image:...
2
2
0
[{"id": "G0", "claim": "Can you please update the storybook with examples (and provide screenshots) for the new placeholder change.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The placeholder-defaulting if/else block could be replaced by a defa...
null
segmentio__fasthash__9
segmentio/fasthash
9
defect
a72b379d632eab4b49e4f4b2c765cfebf0a74796
397837f3fd6acc708c0bda7b0c89fb6f2613e322
optimize small strings
This PR adds a couple of loop-unrolling code to reduce the number of iterations when dealing with small strings: ``` benchmark old ns/op new ns/op delta BenchmarkHash32/fnv1a/optimized/strlen=4 6.05 4.26 -29.59% BenchmarkHash32/fnv1a/optimized/s...
diff --git a/fasthashtest/fasthashtest.go b/fasthashtest/fasthashtest.go index 7faa998..378367b 100644 --- a/fasthashtest/fasthashtest.go +++ b/fasthashtest/fasthashtest.go @@ -1,12 +1,16 @@ package fasthashtest -import "testing" +import ( + "fmt" + "strings" + "testing" +) // TestHashString64 is the implementati...
1
1
0
[{"id": "G0", "claim": "AddString32 in fnv1/hash32.go should also unroll the loops for the >=4 and >=2 remaining-length cases, not just >=8.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
segmentio__kafka-go__1010
segmentio/kafka-go
1,010
defect
bef291169c84baf468cbb0b6dc0833cc9cff74ca
2ecdc69853a19ca6533bd049801058194adfc428
Support for offsetdelete
Closes #1009 The tests need kafka 2.4 to successfully run.
diff --git a/offsetdelete.go b/offsetdelete.go new file mode 100644 index 000000000..47447262d --- /dev/null +++ b/offsetdelete.go @@ -0,0 +1,106 @@ +package kafka + +import ( + "context" + "fmt" + "net" + "time" + + "github.com/segmentio/kafka-go/protocol/offsetdelete" +) + +// OffsetDelete deletes the offset for a co...
4
4
0
[{"id": "G0", "claim": "The integration tests should be gated around the proper kafka versions using a construct like the one in createpartitions_test.go.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The test function name TestOffsetDeleteequest shoul...
null
segmentio__kafka-go__1013
segmentio/kafka-go
1,013
defect
750193894a7e8eeb4adbed1d1f86dfe43ed3b2b8
2c79e5a9f90d96c833b833fc3d0553548f9775a4
Support metadata request v6
Add support for metadata requests with v6. MSK Serverless fails with a EOF for all metadata requests with a version of less than 6. This is one step towards fixing https://github.com/segmentio/kafka-go/issues/967
diff --git a/conn.go b/conn.go index 35d131018..493728015 100644 --- a/conn.go +++ b/conn.go @@ -943,44 +943,36 @@ func (c *Conn) ReadPartitions(topics ...string) (partitions []Partition, err err topics = nil } } + metadataVersion, err := c.negotiateVersion(metadata, v1, v6) + if err != nil { + return nil, er...
1
1
1
[{"id": "G0", "claim": "In ReadPartitions' read closure, the error from c.readTopicMetadatav6/v1 is assigned to the named return err but then discarded because the closure returns nil, so the reviewer asks whether that error needs to be returned.", "category": "correctness", "verdict": "supported", "priority": "P1", "s...
null
segmentio__kafka-go__1015
segmentio/kafka-go
1,015
defect
750193894a7e8eeb4adbed1d1f86dfe43ed3b2b8
23fb9abf2dcba70b87934c9357b5d9c26b9f5532
Add WriteBackoffMin/Max config to Writer
Added Writer config to configure min and max delay between reties. No changes in the logic or default values.
diff --git a/writer.go b/writer.go index f95c76fff..c183a8b97 100644 --- a/writer.go +++ b/writer.go @@ -113,6 +113,18 @@ type Writer struct { // The default is to try at most 10 times. MaxAttempts int + // WriteBackoffMin optionally sets the smallest amount of time the writer waits before + // it attempts to wri...
1
1
0
[{"id": "G0", "claim": "The struct tags of the new WriteBackoffMin/WriteBackoffMax fields should be aligned (metric tag padded one space further) so the WriterStats fields line up, per the provided suggestion block.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
segmentio__kafka-go__1095
segmentio/kafka-go
1,095
defect
f6986fb02ee7f8c6d6708da3f44b7ccf28fa435b
a967871ee4163dbe29acccb82fa72db94d54d3c1
Add DeleteGroups function to Client
Implement DeleteGroups protocol and add it to Client.
diff --git a/deletegroups.go b/deletegroups.go new file mode 100644 index 000000000..a7cd79b5d --- /dev/null +++ b/deletegroups.go @@ -0,0 +1,64 @@ +package kafka + +import ( + "context" + "fmt" + "net" + "time" + + "github.com/segmentio/kafka-go/protocol/deletegroups" +) + +// DeleteGroupsRequest represents a request ...
2
2
1
[{"id": "G0", "claim": "The TestDeleteGroupsResponse test only uses ErrorCode 1 (a failure); the reviewer asks for an additional test case that succeeds.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "DeleteGroups should use the makeError function inste...
null
segmentio__kafka-go__1119
segmentio/kafka-go
1,119
defect
fd64eaa0cdfbef329b842936ab06ce146f15d9df
15c6979b34b7b2083faacb0f0b24050b8e3462c3
KIP-546: Add Client Quota APIs
KIP: https://cwiki.apache.org/confluence/display/KAFKA/KIP-546%3A+Add+Client+Quota+APIs+to+the+Admin+Client API docs: https://kafka.apache.org/protocol#The_Messages_DescribeClientQuotas https://kafka.apache.org/protocol#The_Messages_AlterClientQuotas I followed a similar code style to what was used for [alter...
diff --git a/alterclientquotas.go b/alterclientquotas.go new file mode 100644 index 000000000..131523d14 --- /dev/null +++ b/alterclientquotas.go @@ -0,0 +1,134 @@ +package kafka + +import ( + "context" + "fmt" + "net" + "time" + + "github.com/segmentio/kafka-go/protocol/alterclientquotas" +) + +// AlterClientQuotasReq...
10
8
6
[{"id": "G0", "claim": "Asks whether the client response should group all errors in an errors map field on the return instead of keeping them nested under the individual entries, as other client methods do.", "category": "design", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "...
null
segmentio__kafka-go__1162
segmentio/kafka-go
1,162
defect
c293a8c49389ab9d9750532fbb81826c43fa25fc
dfecdb8b9449b1378992ecd4d5f96eeb3ea99755
offsetfetch request topics are now nullable
### Issue #1115 ### Fix made the "Topics" filed of offsetfetch's Request (https://github.com/segmentio/kafka-go/blob/main/protocol/offsetfetch/offsetfetch.go#L11) nullable in order to make it compliant with Kafka API specs ### Testing Setup: P1 ------> [T1] ------> {CG1} -------> C1 P12------...
diff --git a/offsetfetch.go b/offsetfetch.go index 61fcba2e3..d79e9062c 100644 --- a/offsetfetch.go +++ b/offsetfetch.go @@ -81,10 +81,20 @@ func (c *Client) OffsetFetch(ctx context.Context, req *OffsetFetchRequest) (*Off }) } - m, err := c.roundTrip(ctx, req.Addr, &offsetfetch.Request{ - GroupID: req.GroupID, ...
2
2
0
[{"id": "G0", "claim": "Add a comment at this spot explaining that topics can be null and Kafka will return information on all topics as per the spec.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Simplify by changing topics to a nil slice (var t...
null
segmentio__kafka-go__1166
segmentio/kafka-go
1,166
defect
c293a8c49389ab9d9750532fbb81826c43fa25fc
28383ab2c486e4f98a25ecadb77e96d45035142d
Support describeacls
Support describeacls API [API Docs](https://kafka.apache.org/protocol#The_Messages_DescribeAcls) I based this PR on similar work done here https://github.com/segmentio/kafka-go/pull/1119 Additionally I fixed the tags for createacls protocol as I noticed those did not match the [API docs](https://kafka.apache.o...
diff --git a/createacl_test.go b/createacl_test.go index 4f4b15380..57fdb1139 100644 --- a/createacl_test.go +++ b/createacl_test.go @@ -5,9 +5,10 @@ import ( "testing" ktesting "github.com/segmentio/kafka-go/testing" + "github.com/stretchr/testify/assert" ) -func TestClientCreateACLs(t *testing.T) { +func Tes...
6
5
2
[{"id": "G0", "claim": "Add tests for the createacls protocol message structs using prototest.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Move the DescribeACLs test code added to createacl_test.go into a separate describeacls_test file.", "category"...
null
segmentio__kafka-go__1168
segmentio/kafka-go
1,168
defect
8ceaf94e9b2d7b082297e4476134b7c241985a91
8da13e8a3dbf121bd87b729c1d5792c89d9adb3c
support userscramcredentials apis
Support userscramcredentials APIs [DescribeUserScramCredentials API Docs](https://kafka.apache.org/protocol#The_Messages_DescribeUserScramCredentials) [AlterUserScramCredentials API Docs](https://kafka.apache.org/protocol#The_Messages_AlterUserScramCredentials) I based this PR on similar work done here https:/...
diff --git a/alteruserscramcredentials.go b/alteruserscramcredentials.go new file mode 100644 index 000000000..daf21a732 --- /dev/null +++ b/alteruserscramcredentials.go @@ -0,0 +1,115 @@ +package kafka + +import ( + "context" + "fmt" + "net" + "time" + + "github.com/segmentio/kafka-go/protocol/alteruserscramcredential...
6
6
1
[{"id": "G0", "claim": "The doc comment on DescribeUserScramCredentialsResponse reads \"describeed\" and should read \"described\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The test suite should also test deletion of user SCRAM credentials, ...
null
segmentio__kafka-go__1174
segmentio/kafka-go
1,174
defect
f4ca0b48296538eb5639027cd83f40a3828caf7d
d6c061add63260b50d6549872bb49869778aa544
Deleteacls support
Support deleteacls API [API Docs](https://kafka.apache.org/protocol#The_Messages_DeleteAcls)
diff --git a/deleteacls.go b/deleteacls.go new file mode 100644 index 000000000..64cbd26d1 --- /dev/null +++ b/deleteacls.go @@ -0,0 +1,114 @@ +package kafka + +import ( + "context" + "fmt" + "net" + "time" + + "github.com/segmentio/kafka-go/protocol/deleteacls" +) + +// DeleteACLsRequest represents a request sent to a...
1
1
1
[{"id": "G0", "claim": "The test should, in addition to checking for non-error in deleteResp, query for a deleted ACL and expect an empty/'not found' response to verify the ACL was actually deleted.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
segmentio__kafka-go__1204
segmentio/kafka-go
1,204
defect
4eabe8b75a6ba5111b60513174c62cf0802ae31c
2bf3bf7d48bfb2bfa2841de2b2851c5a46034853
Changed AlterPartitionReassignments request to support multiple topics
- Allowed assigning to multiple topics with AlterPartitionReassignments - Make BrokerIds in AlterPartitionReassignments nullable to support canceling ongoing partition reassignments
diff --git a/alterpartitionreassignments.go b/alterpartitionreassignments.go index ec76dbd8b..9c5fc536d 100644 --- a/alterpartitionreassignments.go +++ b/alterpartitionreassignments.go @@ -13,11 +13,8 @@ type AlterPartitionReassignmentsRequest struct { // Address of the kafka broker to send the request to. Addr net...
1
1
1
[{"id": "G0", "claim": "Refactor this PR to not introduce breaking API changes — replacing the existing Topic/Assignments fields (and the map-shaped response) with Topics maps is a breaking change that cannot be supported.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
segmentio__kafka-go__1218
segmentio/kafka-go
1,218
defect
f2d9e087266352d276b3cb951b4c668c114b8b75
fe3531c569083c9bf1ee2cbd08ca0a2137788248
add methods for parsing and stringifying acl related resources
Add methods for parsing ACL related resources and converting them between their kafka-go and human readable versions This is taken from Sarama https://github.com/IBM/sarama/blob/3ca69a884964f10c228a382d184b0d5005c342e1/acl_types.go#L35
diff --git a/createacls.go b/createacls.go index 672f6fdce..601974171 100644 --- a/createacls.go +++ b/createacls.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "net" + "strings" "time" "github.com/segmentio/kafka-go/protocol/createacls" @@ -42,6 +43,43 @@ const ( ACLPermissionTypeAllow ACLPermissionType =...
2
1
0
[{"id": "G0", "claim": "The ResourceType String mapping should cover ResourceTypeBroker (and a comment explaining why Broker and Cluster share a value would help future reviewers).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Hard-coding the e...
null
segmentio__kafka-go__1232
segmentio/kafka-go
1,232
defect
c6378c391a970fc19c1dbd664016f09c6a73ea8d
4f0b6b590ce83624d4ccd4200442b3209f30bbf0
Add Chunk Size to RR Balancer (Increased Batching Ability)
The motivation here is to try to get Kafka-Go's RR Balancer to batch more aggressively. The RR Balancer naively iterates through the available partitions, putting a single message on each of them until the batch timeout. If it could put x messages on each partition before moving onto the next one, it would still be e...
diff --git a/balancer.go b/balancer.go index f4768cf88..f16d76322 100644 --- a/balancer.go +++ b/balancer.go @@ -4,6 +4,7 @@ import ( "hash" "hash/crc32" "hash/fnv" + "math" "math/rand" "sort" "sync" @@ -54,6 +55,35 @@ func (rr *RoundRobin) balance(partitions []int) int { return partitions[offset%length] ...
2
2
2
[{"id": "G0", "claim": "The counter initialization inside the if statement writes rr.counter while only a read lock (RLock) is held, so the mutex must be locked for writes there (suggested as plain Lock/Unlock around the whole body).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "intro...
null
segmentio__kafka-go__1233
segmentio/kafka-go
1,233
defect
f2d9e087266352d276b3cb951b4c668c114b8b75
6c3c820896f741f03d3c6d8041bdb790859ac0bb
Add RawProduce API
This PR adds a new `RawProduce` API to the client. The background/context for this API is: we have an internal system that does buffering of Kafka messages on disk, and needs to flush that data to Kafka without having to decode/re-encode the data and incur a 2x cost of compression/encoding. In this context, it would be...
diff --git a/protocol/protocol.go b/protocol/protocol.go index ebf91a798..c6d36f161 100644 --- a/protocol/protocol.go +++ b/protocol/protocol.go @@ -213,6 +213,37 @@ func Register(req, res Message) { } } +// OverrideTypeMessage is an interface implemented by messages that which to override the standard +// request...
2
2
1
[{"id": "G0", "claim": "In RegisterOverride, k2 should be assigned from res.ApiKey() rather than req.ApiKey(), since as written the request/response API key mismatch check compares req to itself and can never fire.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1...
null
segmentio__kafka-go__1421
segmentio/kafka-go
1,421
defect
3f6808045dfce56553562afa2ede13fabd640603
658edf33f85f519579bbd0b1536d8f16175b7461
feat: support describegroups v5
Attempt to resolve https://github.com/segmentio/kafka-go/issues/1212 https://kafka.apache.org/41/design/protocol/#The_Messages_DescribeGroups
diff --git a/protocol/describegroups/describegroups.go b/protocol/describegroups/describegroups.go index a4d12048a..5a9d7ccf3 100644 --- a/protocol/describegroups/describegroups.go +++ b/protocol/describegroups/describegroups.go @@ -10,8 +10,11 @@ func init() { // Detailed API definition: https://kafka.apache.org/pr...
3
1
0
[{"id": "G0", "claim": "The explicit compact tag markers the PR adds in describegroups.go are unnecessary because the encoder handles compaction automatically when flexible=true, and should be simplified to match the pattern used in heartbeat.go and createtopics.go.", "category": "maintainability", "verdict": "uncertai...
null
segmentio__kafka-go__1431
segmentio/kafka-go
1,431
defect
3ce29796ef96c7f55bfb64b505c0fcb3c2fd233e
a97ca2bac8c1747fa7b8df85fffd94d88bb4b93f
fix: describe groups should not fail on an issue with a single group
## Summary - https://twilio-engineering.atlassian.net/browse/TUBE-3799 - `DescribeGroups` loops through all groups returned by the broker and decodes member metadata and assignments for each. Previously, a decode failure on any single group's member would cause the entire call to return an error, preventing all other...
diff --git a/describegroups.go b/describegroups.go index 4faf7a01..0bbee796 100644 --- a/describegroups.go +++ b/describegroups.go @@ -135,11 +135,13 @@ func (c *Client) DescribeGroups( for _, member := range apiGroup.Members { decodedMetadata, err := decodeMemberMetadata(member.MemberMetadata) if err != nil...
1
1
1
[{"id": "G0", "claim": "When a group has multiple members and one member fails to decode, the group is returned with a partially populated Members list; the reviewer asks whether the list should be cleared instead and asks for a test of a multi-member group where only one member fails.", "category": "correctness", "ver...
null
segmentio__kafka-go__543
segmentio/kafka-go
543
defect
b7a001a250a3133e9477587629c05c060bb89811
fab1751acd3865d1c27584ea075876a77ea2f2d7
fix zstd decoder leak
This PR aims to resolve a memory leak that would occur under some circumstances when reading from partitions containing batches compressed with zstd. The zstd encoders and decoders are retained by the goroutines they start internally, which causes their finalizers to never go called. The solution implemented here co...
diff --git a/client_test.go b/client_test.go index 4330ce664..e971d4efb 100644 --- a/client_test.go +++ b/client_test.go @@ -6,27 +6,43 @@ import ( "io" "math/rand" "net" - "sync" "testing" "time" "github.com/segmentio/kafka-go/compress" + ktesting "github.com/segmentio/kafka-go/testing" ) func newLoc...
5
2
1
[{"id": "G0", "claim": "Fix the comment typo: \"fater being closed\" should read \"after being closed\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The rewritten Close no longer sets w.c to nil as the code it replaces did.", "category": "corre...
null
segmentio__kafka-go__545
segmentio/kafka-go
545
defect
b7a001a250a3133e9477587629c05c060bb89811
b068eea451cf034d5ad134218cb81de07da78462
improve custom resolver support by allowing port to be overridden
This PR improves the support for a custom `Resolver` by allowing it to return a port that overrides the original address. I took the opportunity to consolidate this same logic to a helper function and added some test cases for each of the scenarios I could think of. This should fix #231
diff --git a/dialer.go b/dialer.go index dad26261e..a1bd32d2d 100644 --- a/dialer.go +++ b/dialer.go @@ -322,17 +322,11 @@ func (d *Dialer) authenticateSASL(ctx context.Context, conn *Conn) error { func (d *Dialer) dialContext(ctx context.Context, network string, address string) (net.Conn, error) { if r := d.Resol...
3
3
1
[{"id": "G0", "claim": "The port from the original address should take priority when one is specified, falling back to the resolver's port only when none was given, and otherwise defaulting to 9092, instead of preferring the resolved port; explicitly specified ports being overridden by the resolver is surprising user e...
null
segmentio__kafka-go__716
segmentio/kafka-go
716
defect
711387657efffcd9af516d7853cebcdf39688d57
856cfc3c8ee33c98e3651eedaffe712779333990
Preserve message order across batches.
Attempt to preserve message order across batches. Fixes #686
diff --git a/writer.go b/writer.go index ff619efed..c75f62d24 100644 --- a/writer.go +++ b/writer.go @@ -189,9 +189,9 @@ type Writer struct { closed uint32 group sync.WaitGroup - // Manages the current batch being aggregated on the writer. + // Manages the curret set of partition-topic writers. mutex sync.Mu...
9
9
2
[{"id": "G0", "claim": "Fix the typo \"curret\" in the comment above the writers map (\"current\" intended).", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Rename ptWriter to partitionWriter, since these writers are tied to a topic-partition pair....
null
segmentio__kafka-go__775
segmentio/kafka-go
775
defect
02a2e42fbb239e6a3366fd53c75083402de0d33d
e75ec2b599c8b6d5635f3d1c697cbf5bc767e1a5
Allow Writer to automatically create topics.
Potential Fix for #683 Writer now sets AutoCreateTopics to true when calling for metadata. Transport will now make a metadata request to the server if the metadata cache does not contain the requested topic and AutoCreateTopics is true. We then update the metadata cache after sending the metadata request to the ...
diff --git a/transport.go b/transport.go index 52e067e47..3b3685713 100644 --- a/transport.go +++ b/transport.go @@ -344,14 +344,29 @@ func (p *connPool) roundTrip(ctx context.Context, req Request) (Response, error) switch m := req.(type) { case *meta.Request: - // We serve metadata requests directly from the tr...
2
2
0
[{"id": "G0", "claim": "The AllowAutoTopicCreation check should be tested once before the loop over cached topics instead of inside the loop.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The loop over cached topics could break early once requestNe...
null
segmentio__kafka-go__776
segmentio/kafka-go
776
defect
df0521cc163fa87e00833896f4d34ebfbed116ba
1e7a5a4655b195201e24ab23713b11140c22c696
Check for broker existence when forming partition replica and ISR lists
Data for each partition returned by Conn.ReadPartitions includes the list of replicas and the ISR for the partition. The broker data is copied from the list of currently available brokers, retrieved from Kafka metadata. It can happen that a broker is not present in metadata (due to being down, for example), but sti...
diff --git a/conn.go b/conn.go index 1e79fab52..7c4d579bb 100644 --- a/conn.go +++ b/conn.go @@ -995,9 +995,11 @@ func (c *Conn) ReadPartitions(topics ...string) (partitions []Partition, err err } makeBrokers := func(ids ...int32) []Broker { - b := make([]Broker, len(ids)) - for i, id := range ids { - ...
2
2
0
[{"id": "G0", "claim": "makeBrokers should allocate the broker slice up front with capacity len(ids) (b := make([]Broker, 0, len(ids))) instead of a nil slice, so appends don't cause extra allocations.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "...
null