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
Seneca-CDOT__telescope__2541
Seneca-CDOT/telescope
2,541
defect
17d5c1522e7b799d4d9b826ec0223c4bb3714ea9
88a0b13f85527d9d168723aae7172df8b03291ac
Added a Bull client, and a route /feeds/info to query queue's info
<!-- Thanks for sending a pull request! - if this is your first time, please ensure you have read through our contributor guide: https://github.com/Seneca-CDOT/telescope/blob/master/docs/CONTRIBUTING.md --> ## Issue This PR Addresses This fixes #2414 <!-- 1. Automatically close the issue when this PR is mer...
diff --git a/src/api/posts/package.json b/src/api/posts/package.json index 398d53c296..39f78c1788 100644 --- a/src/api/posts/package.json +++ b/src/api/posts/package.json @@ -17,6 +17,7 @@ }, "dependencies": { "@senecacdot/satellite": "^1.x", + "bull": "^4.1.1", "express-validator": "^6.10.0", "...
8
6
5
[{"id": "G0", "claim": "The res.json call in /feeds/info should be moved inside the try/catch, and jobNum need not be repeated (res.json({ jobNum })).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The 404 message should read 'Feed not found for id'...
null
Seneca-CDOT__telescope__2575
Seneca-CDOT/telescope
2,575
defect
15a2d61348fcff67b738f66e18ef097bf207ccef
5eee73dbb4a8675ebc0835104aec7fee9e192b6d
Adding /feeds/delayed route to Posts service, adding test in posts/te…
…st/feeds.test.js, fixing the setDelayedFeeds function in posts/src/storage.js and backend/utils/storage.js <!-- Thanks for sending a pull request! - if this is your first time, please ensure you have read through our contributor guide: https://github.com/Seneca-CDOT/telescope/blob/master/docs/CONTRIBUTING.md -->...
diff --git a/src/api/posts/src/routes/feeds.js b/src/api/posts/src/routes/feeds.js index 1cfa8710d6..158b7bcf32 100644 --- a/src/api/posts/src/routes/feeds.js +++ b/src/api/posts/src/routes/feeds.js @@ -1,6 +1,6 @@ const { Router, logger, isAuthenticated, isAuthorized } = require('@senecacdot/satellite'); const Feed ...
1
1
0
[{"id": "G0", "claim": "getDelayedFeeds makes many extra async Redis TTL calls to compute a timeLeft field that is not used anywhere, and just knowing a feed is delayed is probably enough.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
Seneca-CDOT__telescope__3178
Seneca-CDOT/telescope
3,178
defect
e254fc29a02856cf3a32d7bf1fe482efdfafda10
499b1df58bc7ecbe46eb86f1ffc3bffe4f2723e1
Integrate Satellite tests with jest config
This has Satellite use our Jest config. I've also turned-down the logging in tests. Partially deals with #3175.
diff --git a/jest.config.base.js b/jest.config.base.js index 50efc4a0dc..1a7fe9e651 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -3,6 +3,10 @@ const path = require('path'); // Pull in the default development environment for all tests. Override as necessary require('dotenv').config({ path: path.join(...
2
2
2
[{"id": "G0", "claim": "Running `pnpm test satellite` (or `pnpm test src/satellite`) from the repository root finds 0 tests and exits with code 1 — the `testMatch` pattern in satellite's jest.config.js appears to be wrong, so the Satellite suite cannot be run through the root test command.", "category": "testing", "ver...
null
Seneca-CDOT__telescope__3190
Seneca-CDOT/telescope
3,190
defect
f55e473f1ebcdbbf09018629b636c5dd2fb9b526
16180af8996b32e71e92d4f9ffc5cb0cf743d395
feat: Banner image placeholder and fallback background
## Issue This PR Addresses Fixes #2925 - Add loading banner image background by displaying a tiny 40px wide image (minimal loading time) and transitioning in the main 2000px wide image (long loading time) when it finishes loading - Add fallback gradient banner background - Fix inconsistent image src, request a ...
diff --git a/src/api/image/src/lib/photos.js b/src/api/image/src/lib/photos.js index c86b4a92d6..8b07133458 100644 --- a/src/api/image/src/lib/photos.js +++ b/src/api/image/src/lib/photos.js @@ -37,6 +37,15 @@ function getRandomPhotoFilename() { return path.join(photosDir, photoFilename); } +// If users want to g...
3
3
2
[{"id": "G0", "claim": "The JSDoc comment above the celebrate validation in image.js needs updating to document that an integer image index is now accepted alongside an image name.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The photo-at-index ...
null
Seneca-CDOT__telescope__3294
Seneca-CDOT/telescope
3,294
defect
618531d05a21712c5978fb0069ebf19719f2cf67
56e76ac3002747f378aca291e1475c17000bca05
Setup Eslint for SSO
<!-- Thanks for sending a pull request! - if this is your first time, please ensure you have read through our contributor guide: https://github.com/Seneca-CDOT/telescope/blob/master/docs/CONTRIBUTING.md --> Fixes #3155 ## Issue This PR Addresses Fix the `Eslint` configuration for `SSO` files. <!-- 1. Automatic...
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 518bf08e89..3c80e56d72 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -305,17 +305,20 @@ importers: src/api/sso: specifiers: '@jcoreio/wait-for-postgres': 2.0.0 + '@senecacdot/eslint-config-telescope': 1.1.0 '@senecacdot/satellite': ^1.2...
3
1
0
[{"id": "G0", "claim": "Remove the supertest dev dependency from src/api/sso/package.json because it is not needed / SSO does not use it.", "category": "correctness", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer is unsure why the strip-json-comments resolution line...
null
Seneca-CDOT__telescope__3391
Seneca-CDOT/telescope
3,391
defect
61665ae3dfef67bf1213a5e6e6738974e8efcf9b
3315e81f13255f37cfc712d769ce9102f3af7803
Remove Satellite info from Dashboard. Update old Satellite links
<!-- Thanks for sending a pull request! - if this is your first time, please ensure you have read through our contributor guide: https://github.com/Seneca-CDOT/telescope/blob/master/docs/CONTRIBUTING.md --> ## Issue This PR Addresses Part of #3389 <!-- 1. Automatically close the issue when this PR is merg...
diff --git a/src/api/search/test/query.test.js b/src/api/search/test/query.test.js index 1ad1dab0fe..1867c56be0 100644 --- a/src/api/search/test/query.test.js +++ b/src/api/search/test/query.test.js @@ -273,7 +273,7 @@ describe('query routers', () => { describe('Test queries that pass validation', () => { // ...
1
1
0
[{"id": "G0", "claim": "With the Satellite cards removed the dashboard page looks empty on the right side, and the dashboard cards need to be rearranged to be more visually appealing (the reviewer notes this is not a big deal).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
Seneca-CDOT__telescope__3496
Seneca-CDOT/telescope
3,496
defect
284ef7bc3c1bbd7696d40c2d5c67900d1d379dbb
05ed7ee18c77c735cd38b8dbefca52266bc58475
Add issuesURL field in /projects/:namespace/:name? route
<!-- Thanks for sending a pull request! - if this is your first time, please ensure you have read through our contributor guide: https://github.com/Seneca-CDOT/telescope/blob/master/docs/CONTRIBUTING.md --> ## Issue This PR Addresses Fixes #3495 <!-- 1. Automatically close the issue when this PR is merged ...
diff --git a/src/api/dependency-discovery/src/dependency-list.js b/src/api/dependency-discovery/src/dependency-list.js index f7ffdc7c71..d2eec3ce85 100644 --- a/src/api/dependency-discovery/src/dependency-list.js +++ b/src/api/dependency-discovery/src/dependency-list.js @@ -46,6 +46,15 @@ async function getNpmPackageIn...
2
2
0
[{"id": "G0", "claim": "The label list ('hacktoberfest', 'good first issue', 'help wanted') defined here and in github.js should instead be a global variable exported from github.js, so the same set of labels does not live in two places.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope"...
null
Seneca-CDOT__telescope__3569
Seneca-CDOT/telescope
3,569
defect
60c0eda6882c3d51dbef1504836c48b1ee7c4a37
4d721b96d54badbd60d94b37820f3f6af5fe3fb9
Wait on SAML login to be ready
Wait for `login` container to be ready . Fix #3504 I can reproduce this e2e test failure consistently locally by running the e2e test right after spinning up the containers. So one of the containers must be not ready and make the test fail. In #3504, following my suggestion, @humphd has tried to debug the `tes...
diff --git a/config/env.development b/config/env.development index 181fb83d3d..93390fedd7 100644 --- a/config/env.development +++ b/config/env.development @@ -71,6 +71,9 @@ SSO_PORT=7777 # SSO Service URL SSO_URL=http://localhost/v1/auth +# Single Sign On (SSO) service front page URL +SAML_URL=http://localhost:8081...
4
2
0
[{"id": "G0", "claim": "Consider switching to a maintained fork of the docker-simplesamlphp image (e.g. https://github.com/kenchan0130/docker-simplesamlphp) instead of the currently used one.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "pre_existing"}, {"id": "G1", "claim": "The ...
null
Seneca-CDOT__telescope__3768
Seneca-CDOT/telescope
3,768
defect
30731846b8c85ec6f8b5af64f635a8e738e60402
f25806464b88e7c004f96c12215fa0b21789bd67
Allow feed URL to be given during sign up
<!-- Thanks for sending a pull request! - if this is your first time, please ensure you have read through our contributor guide: https://github.com/Seneca-CDOT/telescope/blob/master/docs/CONTRIBUTING.md --> ## Issue This PR Addresses Resolves #3689 <!-- 1. Automatically close the issue when this PR is merged ...
diff --git a/src/api/feed-discovery/src/middleware.js b/src/api/feed-discovery/src/middleware.js index 29188c23ae..e97865c9e9 100644 --- a/src/api/feed-discovery/src/middleware.js +++ b/src/api/feed-discovery/src/middleware.js @@ -1,6 +1,6 @@ const { logger, createError } = require('@senecacdot/satellite'); -const {...
3
1
1
[{"id": "G0", "claim": "The list of content types accepted by isFeedUrl includes types the rss-parser module may not be capable of parsing, so it should be limited to valid Atom + RSS types only.", "category": "correctness", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "A test s...
null
SerenityOS__jakt__1011
SerenityOS/jakt
1,011
defect
9434c1f99f74248075186979f575af13ac5c4ffc
2205ca25bb179153f3d303033141b6c876c3e6ae
jakttest: Add Windows OSAL pieces for filesystem and process management
Add a CMake build rule for jakttest as well. The file traversal and discovery code works, but the process spawning code will remain "looks correct according to the docs" until there's an alternative to run-one.sh. We can't run a bash script in powershell with ./ the way Unix OS's do it. Behold: it doesn't work...
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8951615f66..de67e49ea2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,26 +46,22 @@ jobs: if: ${{ matrix.platform == 'macos-latest' }} run: brew install coreutils - - name: Build Jakt Stage 1 Self...
2
2
0
[{"id": "G0", "claim": "The Windows get_num_cpus() should return sys_info.dwNumberOfProcessors, as Boost.Thread does, instead of __builtin_popcountl(sys_info.dwActiveProcessorMask).", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Building the project...
null
SerenityOS__jakt__820
SerenityOS/jakt
820
defect
3241cebfe2ce578b3521c6ee3e7ebce3c02c57c5
7fb3e95370953fff22dd9f2c20f2afa66aabab23
jakttest: Parallelize Jakttest
Rewrote Jakttest so it accepts all the test files and runs them through a process scheduler to be able to run the tests in parallel. The binary gets a clean temporary directory where it places one temporary directory per job. It uses that to store both C++ temporaries from Jakt compiler's output and stderr/stdout resul...
diff --git a/jakttest/jakttest.jakt b/jakttest/jakttest.jakt index b1a3d89c42..19c871d61b 100644 --- a/jakttest/jakttest.jakt +++ b/jakttest/jakttest.jakt @@ -2,7 +2,11 @@ import error { JaktError, print_error } import lexer { Lexer } import parser { Parser } -function usage() => "usage: jakttest [-h] [OPTIONS] <pa...
7
5
3
[{"id": "G0", "claim": "After parsing errors are printed and the usage shown, main should return instead of continuing to run despite the invalid arguments.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The parser could also check whether the temp-...
null
SerenityOS__serenity__18287
SerenityOS/serenity
18,287
defect
e931b2ecd9481c760dfaffafd3197c8a8a1c77de
af0c29bf495699a3b1e4628333a13f95d855cad9
LibWeb: Implement `URL.canParse(url, base)`
This pull request implements the `URL.canParse` static function, recently introduced by https://github.com/whatwg/url/pull/763 and does some related cleanup. ![image](https://user-images.githubusercontent.com/42888162/231174373-d4a51643-0caa-47c4-9074-706723a9bbea.png)
diff --git a/AK/URL.cpp b/AK/URL.cpp index 303b9a7356ad5e1..16cee01228c7a23 100644 --- a/AK/URL.cpp +++ b/AK/URL.cpp @@ -44,7 +44,7 @@ URL URL::complete_url(StringView relative_url) const if (!is_valid()) return {}; - return URLParser::parse(relative_url, this); + return URLParser::parse(relative_...
1
1
0
[{"id": "G0", "claim": "The base_url parameter of URLParser::parse should be `Optional<URL> const&` instead of being passed by value, since there is no need to copy it.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
SerenityOS__serenity__18716
SerenityOS/serenity
18,716
defect
50413c23266926944c641a99bcd03461e5224a8b
a95d73668ddd40ae980ba220540715b81a4a2b30
LibGfx/JPEG: Add support for 12 bits JPEGs
Why do we need that? To make Ladybird be the first browser to display [yo.jpg](https://github.com/nico/jpegfiles/blob/main/12-bit-progressive.jpg) of course! It also fixes #18720 as it brings support for `SOF2` images with 4 Huffman tables.
diff --git a/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp b/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp index 0255394365457ce..8d6108803ac6a8e 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp @@ -73,6 +73,7 @@ #define JPEG...
6
2
1
[{"id": "G0", "claim": "The commit message should read \"allows\" instead of \"allow\".", "category": "documentation", "verdict": "uncertain", "priority": "P3", "scope": "unclear"}, {"id": "G1", "claim": "The clamp call should be folded into the clamp_to_8_bits lambda (or a wrapping helper) for code deduplication.", "c...
null
SerenityOS__serenity__25864
SerenityOS/serenity
25,864
defect
fea6ee7565a8f0288470997f8c203c594d972c8e
6ecb378ce12ab850fd2845ce2af4093253107e8b
LibC: Remove strtold impossible assert and add tests
Removed the impossible assertion of sizeof(double) == sizeof(long double) in strtold, and made it use c_str_to_floating_point casted to long double. This fixes the crash but suffers from lack of precision. Our eisel-lemire implementation on FloatingPointStringConversions needs a big overhaul to work properly with long ...
diff --git a/Tests/AK/CMakeLists.txt b/Tests/AK/CMakeLists.txt index 40914ac0b63364..2d002d46195e67 100644 --- a/Tests/AK/CMakeLists.txt +++ b/Tests/AK/CMakeLists.txt @@ -34,6 +34,7 @@ set(AK_TEST_SOURCES TestFixedPoint.cpp TestFloatingPoint.cpp TestFloatingPointParsing.cpp + TestFloatingPointStringCo...
5
5
1
[{"id": "G0", "claim": "The changes to TestFloatingPointStringConversions.cpp should be in a separate commit, not mixed with the LibC change.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Instead of duplicating nearly identical code across many...
null
SerenityOS__serenity__26169
SerenityOS/serenity
26,169
defect
f9544b2aacc83d86482c65272f73bdb744533f95
5c78081daac511dfb7bedcb43c4efeba3ddfd133
AK+LibC: Optimize time component conversion
Fixes #26079 (#12729 should probably also be closed at this point even without this PR, because I don't think there's been a noticable performance issue with `time_to_tm()` since at least #16760. Also, the existing loop based approaches were pretty fast already to be fair, but this does slightly speed those up). The...
diff --git a/AK/Array.h b/AK/Array.h index 14e92bb4c648fa..1c36dfa2a83ec0 100644 --- a/AK/Array.h +++ b/AK/Array.h @@ -10,6 +10,7 @@ #include <AK/Optional.h> #include <AK/Span.h> #include <AK/StdLibExtras.h> +#include <AK/Tuple.h> #include <AK/TypedTransfer.h> namespace AK { @@ -63,6 +64,30 @@ struct Array { ...
9
6
1
[{"id": "G0", "claim": "The magic-number constants in days_to_time (1460, 36524, 146097) should be spelled as derivations such as 4 * 365, 365 * 100 + 100/4 - 1 and 365 * 400 + 100 - 3.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "365 is not t...
null
SerenityOS__serenity__26211
SerenityOS/serenity
26,211
defect
2ccc394e65a6939d8a63b9e2f064f33217599a2d
d6c7e1884ff8167905d501f2ce38868c86a395be
LibGfx/CCITT: Add a CCITT4 Encoder
@nico don't hesitate to ping me if you need more options like EOL codes or padding bytes
diff --git a/AK/Array.h b/AK/Array.h index 1c36dfa2a83ec01..f5aab14de548ead 100644 --- a/AK/Array.h +++ b/AK/Array.h @@ -8,6 +8,7 @@ #include <AK/Iterator.h> #include <AK/Optional.h> +#include <AK/ReverseIterator.h> #include <AK/Span.h> #include <AK/StdLibExtras.h> #include <AK/Tuple.h> @@ -112,12 +113,23 @@ str...
8
5
0
[{"id": "G0", "claim": "The loop counter should be zero-initialised with `= 0` instead of `{}` per codebase style.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The cast of bitmap.width() may be off for big sizes; a VERIFY to ensure it always works woul...
null
SerenityOS__serenity__26260
SerenityOS/serenity
26,260
defect
0ff1f39b8bc77b2c49cda4444445919e6a2d8871
84a713e918913f3f95b35bfc7a40028630ea0a35
LibGfx: Make TestImageDecoder slightly faster
Some low-hanging fruits for a 15% runtime reduction. Most of the time is spent in the JPEG2000 decoder though, but this is for another time. ``` Before: TestImageDecoder Time (mean ± σ): 1.151 s ± 0.021 s [User: 1.126 s, System: 0.025 s] Range (min … max): 1.133 s … 1.203 s 10 runs ``` ``` ...
diff --git a/Userland/Libraries/LibGfx/ImageFormats/BilevelImage.h b/Userland/Libraries/LibGfx/ImageFormats/BilevelImage.h index f403b2c467628e8..c771e6f5da4e923 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/BilevelImage.h +++ b/Userland/Libraries/LibGfx/ImageFormats/BilevelImage.h @@ -46,6 +46,25 @@ class Bileve...
2
2
2
[{"id": "G0", "claim": "The cross-byte shift in BilevelImage::get_bits may be incorrect for widths spanning two bytes and should be verified.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "A test should be added for the new BilevelImage::get_bits he...
null
SerenityOS__serenity__26263
SerenityOS/serenity
26,263
defect
0ff1f39b8bc77b2c49cda4444445919e6a2d8871
ddf1a033fce1b591e8d95d2dbfd2234867771301
LibMaps: Some panning enhancement
This makes the panning work like you would expect for a global map visualizer. The maps now wrap infinitely on the horizontal axes, and the view is limited to the actual end of the map on the vertical axes. In other words, we don't show gray background anymore when the `MapWidget` is done loading. My laptop doesn'...
diff --git a/Userland/Libraries/LibMaps/MapWidget.cpp b/Userland/Libraries/LibMaps/MapWidget.cpp index 86a150bb66e1a52..9d5df69699265dc 100644 --- a/Userland/Libraries/LibMaps/MapWidget.cpp +++ b/Userland/Libraries/LibMaps/MapWidget.cpp @@ -484,12 +484,15 @@ void MapWidget::paint_map(GUI::Painter& painter) // plus...
5
4
0
[{"id": "G0", "claim": "pow(2, m_zoom) could be replaced with exp2 (from IntegralMath.h) or a simple shift.", "category": "performance", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The inline double-fmod longitude wrapping is hard to reason about and should probably be replace...
null
SerenityOS__serenity__26329
SerenityOS/serenity
26,329
defect
17188e8bd75f382f18638f647243efb8dd76fde9
7c595af68318fbdd39d6611c8f13c00cbee471fc
LibGfx/JPEGXL: Fully decode `conformance/bicycles`
This PR implements the XYB to RGB color conversion, the last step required to decode this image. The output is unfortunately not exactly the same as the reference PNG in the conformance repo: ``` $ imgcmp out.png JPEGXL/conformance/testcases/bicycles/ref.png --write-diff-image diff.png --count different pixel at ...
diff --git a/Userland/Libraries/LibGfx/ImageFormats/JPEGXLChannel.h b/Userland/Libraries/LibGfx/ImageFormats/JPEGXLChannel.h index e5708b0f236150..4b5a26a41da9e2 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/JPEGXLChannel.h +++ b/Userland/Libraries/LibGfx/ImageFormats/JPEGXLChannel.h @@ -110,6 +110,11 @@ class Ch...
1
1
0
[{"id": "G0", "claim": "The OpsinInverseMatrix constants should carry a reference to where in the spec they come from.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
SerenityOS__serenity__26390
SerenityOS/serenity
26,390
defect
e7e20d48731bf5c196486f71312f0d4cbf79f04e
824d5bf04ce331681895caf4eedbf520a21757e2
Kernel+CrashDaemon: Use a ".partial" suffix for incomplete coredumps
The Kernel will now write to a .partial file until it is done writing, and then rename the file by removing the extension. This makes the final coredump appear atomically on the file system. So no need for special handling of partial files in CrashDaemon.
diff --git a/Kernel/Tasks/Process.cpp b/Kernel/Tasks/Process.cpp index 84119dea9edbe66..8f30aef5f5888c9 100644 --- a/Kernel/Tasks/Process.cpp +++ b/Kernel/Tasks/Process.cpp @@ -831,10 +831,21 @@ ErrorOr<void> Process::dump_core() return {}; } auto coredump_path = TRY(name().with([&](auto& process_nam...
4
2
0
[{"id": "G0", "claim": "The locking pattern used to fetch the root custody (root_custody().with([](auto& custody) { return custody; })) in dump_core is kind of suspicious, though the same pattern is used elsewhere in the kernel so it is not this PR's fault.", "category": "design", "verdict": "uncertain", "priority": "P...
null
SerenityOS__serenity__26445
SerenityOS/serenity
26,445
defect
64f08bac6ca5bd3ccdd30055cd7d4869dc615e70
fdf1831e4977ddad19a10ddda6b31ee87d535493
CI: (Partially) Fix the coverage build
This is a bag of patches that I wrote while working on the coverage build. They have been tested on this run on my fork: https://github.com/LucasChollet/serenity/actions/runs/19861183876/job/56911434565 There is still one major issue with this PR. Some tests make the resulting coverage file broken, so much that `...
diff --git a/.github/workflows/serenity-template.yml b/.github/workflows/serenity-template.yml index c54e528e4db52d4..093c1b11667999b 100644 --- a/.github/workflows/serenity-template.yml +++ b/.github/workflows/serenity-template.yml @@ -50,6 +50,10 @@ jobs: os: 'Serenity' arch: ${{ inputs.arch }} ...
2
1
0
[{"id": "G0", "claim": "Some define should let tests that corrupt coverage data be ifdef'd out of coverage builds.", "category": "testing", "verdict": "uncertain", "priority": "P1", "scope": "pre_existing"}, {"id": "G1", "claim": "The commit message should explain why the 5GiB disk size was chosen, and say how big the ...
null
SerenityOS__serenity__26454
SerenityOS/serenity
26,454
defect
f6b9fbc76e16c62efc9eb81f27ccb5318d5b0c49
4fc625c25a04d304fb2ec2ce33451e476faf3931
LibLine: Properly handle multi-code-point glyphs
This has been annoying me for a long time, no more.
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 606d7e37cb0b7b3..ac4087d53cb5056 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1,40 +1,39 @@ -add_subdirectory(AK) add_subdirectory(Kernel) add_subdirectory(LibAudio) add_subdirectory(LibC) add_subdirectory(LibCompress) add_subdirect...
1
1
1
[{"id": "G0", "claim": "Alphabetizing Tests/CMakeLists.txt accidentally dropped its add_subdirectory(AK) line.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
SerenityOS__serenity__26469
SerenityOS/serenity
26,469
defect
3841430718d916d90c6e54573a1de5e325a5de22
591e77a66532c6b18addab725f604b65c07a6511
Kernel: Move general signal dispatching out of the scheduler
Fixes #19249 (the second program in that issue essentially hits the same issue as the first one. SIGHUP is able to suspend it because the program doesn't define a signal handler for that and SIGHUP happens to have a lower numerical value than SIGINT, so that gets precendence. SIGKILL has a higher value than SIGINT, so ...
diff --git a/Kernel/Arch/aarch64/Processor.cpp b/Kernel/Arch/aarch64/Processor.cpp index 43b6e9ddadf6d7..d702f0df39e9d5 100644 --- a/Kernel/Arch/aarch64/Processor.cpp +++ b/Kernel/Arch/aarch64/Processor.cpp @@ -347,11 +347,17 @@ void ProcessorBase::exit_trap(TrapFrame& trap) // FIXME: Figure out if we need prev_ir...
6
5
1
[{"id": "G0", "claim": "Removing the special case for threads without a current trap frame made signal dispatch panic with 'ASSERTION FAILED: current_trap()' when a blocked thread context-switches into a fully initialized thread that has no trap frame, so the deferred DispatchSignalResult needs to be kept for that case...
null
SerenityOS__serenity__26478
SerenityOS/serenity
26,478
defect
fae69a892561745adc015bc51e13b46edecb20de
6a0d0a4d40679bc26d55971ddc4c7b431d09ec5f
LibGfx/ICCC: Implement converting from PCS to LutBToATagData with clut
Similar to what https://github.com/SerenityOS/serenity/pull/26452 did for Lut8TagData and https://github.com/SerenityOS/serenity/pull/26462 for Lut16TagData. With this, we can convert from PCS to all tag types :^) Which means our ICC implementation is now fairly complete! We don't support DeviceLink or Abstract ...
diff --git a/Tests/LibGfx/TestICCProfile.cpp b/Tests/LibGfx/TestICCProfile.cpp index 187e9f79d038c16..00b3c93e86f93e5 100644 --- a/Tests/LibGfx/TestICCProfile.cpp +++ b/Tests/LibGfx/TestICCProfile.cpp @@ -306,6 +306,24 @@ TEST_CASE(roundtrip_lab_mft2) test_roundtrip(*profile); } +TEST_CASE(roundtrip_lab_mABmBA_...
1
1
0
[{"id": "G0", "claim": "The commit title's 'ICCC' looks like a typo for 'ICC' — the reviewer asks what the acronym is supposed to stand for.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
SerenityOS__serenity__26563
SerenityOS/serenity
26,563
defect
3bf28c74f6d47286fc3ace333ae120019ba7c4bf
0c5b651e9484b545c9e6bfd0e8e9b02ce692bb7d
Kernel/MM: Page fault synchronization fixes
This PR fixes some page fault synchronization issues I noticed while attempting to port ladybird to SerenityOS. I included some detailed explanations in the last 3 commits before the new test that should hopefully explain everything nicely. This commit unfortunately causes us to take some locks for a longer amoun...
diff --git a/Kernel/Arch/PageFault.h b/Kernel/Arch/PageFault.h index c0e14f88eed0101..a14f05bc708b949 100644 --- a/Kernel/Arch/PageFault.h +++ b/Kernel/Arch/PageFault.h @@ -76,6 +76,9 @@ class PageFault { void set_access(Access access) { m_access = access; } Access access() const { return m_access; } + v...
3
1
0
[{"id": "G0", "claim": "The new race-condition test can lead to false-negative test results because it may not actually trigger the races it checks for (the author could never reproduce the parent/child COW fault race), so the author is unsure whether to keep it.", "category": "testing", "verdict": "supported", "priori...
null
SerenityOS__serenity__26571
SerenityOS/serenity
26,571
defect
c70201cdbee36eee62b342133d848ce2d582f7ba
ea5d3a62ec3b031c68f4f5f71996cfe49a4f91bc
Kernel: ptrace & signal dispatch tweaks
- Kernel: Don't dispatch signals to threads that are marked to die - Kernel: Don't allow PT_ATTACHing to other threads in the same process - Tests: Add a test verifying that ptrace self-attaching fails Note that Linux doesn't allow attaching to threads in the same thread group either[1][2]. We don't have a real di...
diff --git a/Kernel/Syscalls/ptrace.cpp b/Kernel/Syscalls/ptrace.cpp index 12f899d3066819..af5da8a4bd07ed 100644 --- a/Kernel/Syscalls/ptrace.cpp +++ b/Kernel/Syscalls/ptrace.cpp @@ -27,17 +27,13 @@ static ErrorOr<FlatPtr> handle_ptrace(Kernel::Syscall::SC_ptrace_params const& p return 0; } - // FIXM...
1
1
1
[{"id": "G0", "claim": "The new same-process guard should not be limited to PT_ATTACH; requests other than PT_ATTACH should fail as well instead of being explicitly allowed through.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
SerenityOS__serenity__26691
SerenityOS/serenity
26,691
defect
bed715c32316ed0a6b27a3db9d933949c63f352c
d3388b600f45040d3c6518cbdca2c2474f4ffefd
AK: Make atan() more precise and faster on non-x86
Instead of calling asin(), approximate atan() directly. Takes the biggest error of atan() over 0..2*pi (which is an arbitrary interval, given that atan()'s domain is all reals) from 7.15256e-07 to 1.19209e-07. That's enough to make TestPDF pass when run inside serenity (part of https://github.com/SerenityOS/seren...
diff --git a/AK/Math.h b/AK/Math.h index c9b19e56be4cdd..cc129ba6cb5ae0 100644 --- a/AK/Math.h +++ b/AK/Math.h @@ -899,7 +899,50 @@ constexpr T atan(T value) return ret; #else # if defined(AK_OS_SERENITY) - return asin(value / sqrt(1 + value * value)); + if (value < 0) + return -atan(-value); + +...
1
1
0
[{"id": "G0", "claim": "The new atan() implementation recurses (via -atan(-value) and atan(1/value)), and since recursion was recently removed from sin()/cos() for speed, the reviewer asks whether recursion causes issues here or whether it should be removed, possibly in a follow-up.", "category": "performance", "verdic...
null
Serial-Studio__Serial-Studio__332
Serial-Studio/Serial-Studio
332
defect
d69b067a2abd50610cbd408dc22e6b6f2c548f5a
ad5af7ef04b5bc4b93f1698d71d99248873bcb44
perf: Optimize compiler flags and hot-path string operations for modern hardware
## Summary This PR implements comprehensive performance optimizations targeting modern hardware (2012+), with an expected **25-40% reduction in frame processing latency**. ### Changes Overview 1. **Compiler Optimization Flags** (CMakeLists.txt) - Upgraded from `-O2` to `-O3` for aggressive optimization - Added...
diff --git a/CMakeLists.txt b/CMakeLists.txt index c3862ebd5c..fcc7739fec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -186,12 +186,16 @@ endif() if(PRODUCTION_OPTIMIZATION) # Print status - message("Enabling production optimization flags...") + message("Enabling production optimization flags for mode...
8
5
3
[{"id": "G0", "claim": "The new PRODUCTION_OPTIMIZATION branch for macOS unconditionally adds -march=x86-64-v2, which clang rejects on Apple Silicon (arm64/aarch64), so release builds that previously compiled will now fail; gate the x86 march flag on the host architecture or provide an arm64-safe alternative.", "catego...
null
ServeRest__ServeRest__134
ServeRest/ServeRest
134
defect
46229c6920e426a2437ee073ba63c830bd992f57
1a35058bea51618888c2dd81f6f91f3663585090
Feature/product image
<!-- Have any questions? Check out the contributing docs at https://github.com/PauloGoncalvesBH/ServeRest/blob/trunk/.github/CONTRIBUTING.md :) --> ## Description Add field to add product image on create product I can't update the documentation. Is there some workflow to do that? ### How can the user e...
diff --git a/src/models/produtos-model.js b/src/models/produtos-model.js index cf613fab..1913e280 100644 --- a/src/models/produtos-model.js +++ b/src/models/produtos-model.js @@ -8,7 +8,8 @@ exports.schemaGet = { nome: Joi.any(), preco: Joi.number().positive().integer(), descricao: Joi.any(), - quanti...
2
1
1
[{"id": "G0", "claim": "Add a test for successful product registration passing the 'imagem' field, since 'imagem' is optional and both scenarios (with and without image) should be guaranteed.", "category": "testing", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a bad-reques...
null
ServeRest__ServeRest__355
ServeRest/ServeRest
355
defect
1f432c429647c871b2075dc8a4259ab52e714e04
0caff9eb981b9d3a2839a38f83e9868db6470d14
Fix constants names
## Description Alterando as constants do projeto para um padrão em inglês como algumas já estavam. ### How can the user experience this change? N/A ### Documentation N/A ## Related Issues N/A ## Comments Alguns projetos de testes estão utilizando diretamente as constants do projeto serverest ...
diff --git a/.gitignore b/.gitignore index fd5b48276..5dee6921a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,20 @@ +# stryker temp files +.stryker-tmp +stryker.log + +# Dependency directories +node_modules/ +.idea/ .nyc_output/ coverage/ -coverage-unit/ -coverage-integration/ -node_modules/ +cover...
3
2
1
[{"id": "G0", "claim": "Six CI pipeline jobs are failing and the necessary adjustments should be made (the test-contract failure was the reviewer's own configuration error).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "A new release including the ...
null
ServiceWeaver__weaver__156
ServiceWeaver/weaver
156
defect
25145d76d43e1d34e04f383adf5b7572eb1652f7
b4be30d508dfe07ff8ef3499f8d9f91a24e927ca
Fixed UseLocalhost bug introduced in PR #115.
Before PR #115, the `WeaveletInfo` proto had a `UseLocalhost` field. When true, weavelets would listen on localhost for external listeners (the kind returned by the `Instance.Listener` method). In PR #115, I removed the `UseLocalhost` field and replaced it with a `GetAddress` API. However, I didn't actually remove t...
diff --git a/godeps.txt b/godeps.txt index f228309789..4844142177 100644 --- a/godeps.txt +++ b/godeps.txt @@ -320,7 +320,6 @@ github.com/ServiceWeaver/weaver/internal/babysitter embed errors fmt - github.com/ServiceWeaver/weaver/internal/envelope/conn github.com/ServiceWeaver/weaver/internal/log...
2
2
0
[{"id": "G0", "claim": "Since `SingleMachine` already defaults to false, the ssh deployer should not set it explicitly to false in the WeaveletInfo literal.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The deployer configuration now has overla...
null
ShadowBlip__InputPlumber__508
ShadowBlip/InputPlumber
508
defect
03f65093ad236b5c707a59a18af50d8b7cf75246
fa21ada973a02733c47dda5fdfd8b19ed67a32d7
fix(HardwareSupport): Ensure default capabilities & misc fixes
- Adds (temporary) target device translations for screenshot capability for all target gamepads. Each device uses a different combination, and some devices (steam deck, horipad) need to queue events to avoid issues with input collision. These will be fairly difficult to manage with profiles. This makes them unsuitable ...
diff --git a/src/drivers/dualsense/driver.rs b/src/drivers/dualsense/driver.rs index 0ad8ea403..06798d008 100644 --- a/src/drivers/dualsense/driver.rs +++ b/src/drivers/dualsense/driver.rs @@ -1,9 +1,5 @@ use packed_struct::prelude::*; -use std::{ - error::Error, - ffi::CString, - time::{Duration, Instant}, -...
3
1
1
[{"id": "G0", "claim": "ShadowApex objects to the DualSense target advertising RightPad touchpad capabilities so that right-pad events are hard-coded onto its center pad.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The removal of the 'xb360'/'gamepad' (...
null
Shasnow__StarRailAssistant__186
Shasnow/StarRailAssistant
186
defect
2a690d157abcd866b6a9b0d658967d3d42f00ac1
78929db48da1e7c525f0eacf56620279c70d14fa
feat(tasks): 差分宇宙/货币战争(周期 OCR、策略、测试)
## 摘要 本 PR 在任务层同时落地 **差分宇宙(乐园漫记)** 与 **货币战争** 的旷宇纷争逻辑,而不仅是其中一条线。 包括:`CosmicStrifeTask` 对 DU/CW 的分别调度、**`tasks/differential_universe/DifferentialUniverse.py`** 的局数循环与 `on_run_completed`、**`tasks/currency_wars/*`** 的局数/刷开局、以及 **`tasks/cosmic_strife/*`** 的周期 OCR 与状态存储。 ## 变更说明 - **`tasks/cosmic_strife/policy_defs....
diff --git a/SRACore/cli.py b/SRACore/cli.py index b4e8d2c6..96664fa2 100644 --- a/SRACore/cli.py +++ b/SRACore/cli.py @@ -89,6 +89,7 @@ def _stop_task_thread(self) -> None: if self.task_thread.is_alive(): logger.warning(Resource.cli_task_timeout) else: + logger...
2
2
0
[{"id": "G0", "claim": "The manual should_stop checks in tasks (e.g. ReceiveRewardsTask) are unnecessary because the operator already provides extremely fine-grained thread-stop checks before every operation, so stop_event handling should be left entirely to the operator's low-level layer.", "category": "design", "verd...
null
SherClockHolmes__webpush-go__8
SherClockHolmes/webpush-go
8
defect
739e7e5e1952b73b52f6f5ce711d800f8c133f23
aff1eee18c7f347b08fb80c8ab399c54661f6d19
Add urgency and topic optional headers
``` Topic (Optional) Topics are strings that can be used to replace a pending messages with a new message if they have matching topic names. This is useful in scenarios where multiple messages are sent while a device is offline, and you really only want a user to see the latest message when the device is turned on...
diff --git a/webpush.go b/webpush.go index 843e490..5a6853b 100644 --- a/webpush.go +++ b/webpush.go @@ -40,6 +40,8 @@ type Options struct { HTTPClient HTTPClient // Will replace with *http.Client by default if not included Subscriber string // Sub in VAPID JWT token TTL int // Se...
3
3
0
[{"id": "G0", "claim": "Put the new Urgency and Topic fields in the Options struct in alphabetical order.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Move the urgency values to a dedicated type with the options defined as constants, and use t...
null
Shopify__draggable__102
Shopify/draggable
102
defect
bcbead406c5d76cc71d5996bd14203bb922d932f
a703bc184aa44cd6ddf34fede10ebd6d5ee8d31a
Announce plugin for screen readers
### This PR implements Adds the `Announcement` plugin, which let's users define announcements via options on a per-event basis. ### Does this PR require the Docs to be updated? Yes, provided some docs for the announcement plugin.
diff --git a/src/Draggable/Draggable.js b/src/Draggable/Draggable.js index 84385bf9..cfc1b315 100644 --- a/src/Draggable/Draggable.js +++ b/src/Draggable/Draggable.js @@ -1,6 +1,6 @@ import {closest} from 'shared/utils'; -import {Accessibility, Mirror} from './Plugins'; +import {Accessibility, Mirror, Announcement} ...
5
4
1
[{"id": "G0", "claim": "It would be helpful for the default announcements to also speak the dragged item's unique name on `drag:start` and `drag:stop`, for reassurance.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Appending the live region to the DOM o...
null
Shopify__draggable__211
Shopify/draggable
211
defect
1ddbbdeaf1ea88b92a203be66e634503229e41c1
a8b3a068ec4acd83387a6f41ba4ea86458d7aa42
Does not prevent drag start outside of draggable container
### This PR fixes... This PR fixes an issue with preventing native drag events outside of draggable containers. This change will prevent nativ drag events for draggable containers only ### This PR closes the following issues... - https://github.com/Shopify/draggable/issues/210 ### Does this PR require the D...
diff --git a/src/Draggable/Sensors/MouseSensor/MouseSensor.js b/src/Draggable/Sensors/MouseSensor/MouseSensor.js index 313bb11b..1d305ffb 100644 --- a/src/Draggable/Sensors/MouseSensor/MouseSensor.js +++ b/src/Draggable/Sensors/MouseSensor/MouseSensor.js @@ -75,7 +75,6 @@ export default class MouseSensor extends Sensor...
2
2
0
[{"id": "G0", "claim": "The comment 'Find closest natively draggable in future' is oddly worded and should be fixed (\"natively\" should probably be \"native\").", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new test's title has an extra sp...
null
Shopify__draggable__341
Shopify/draggable
341
defect
2019ae1ce6c6b31bf474803237e6af8593d68a00
fbc6da037317acaacfdd593d27164681dcf9d4bd
Add distance option
### This PR implements or fixes... Implements a `distance` option, as a pixel threshold that must be passed in order for the drag to start. I also fixed an issue with MouseSensor in which the context menu was still being allowed to open during drag. The new distance option is impossible for DragSensor, as I know n...
diff --git a/src/Draggable/Draggable.js b/src/Draggable/Draggable.js index a4c7a378..097ff8f1 100644 --- a/src/Draggable/Draggable.js +++ b/src/Draggable/Draggable.js @@ -48,6 +48,7 @@ export const defaultOptions = { draggable: '.draggable-source', handle: null, delay: 100, + distance: 0, placedTimeout: 80...
1
1
0
[{"id": "G0", "claim": "Single-line if blocks, e.g. `if (this.distance < this.options.distance) return;` in MouseSensor.js, should be expanded to multi-line blocks per the team's 'no single line if blocks' preference.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
Shopify__draggable__464
Shopify/draggable
464
defect
1590e5de8bcb3b50b33fa46aef5462f9f8a896ae
cad0f4e94d44dc13faf00302e131064308c567e4
fix(sensor): return early when the target isn't in handle or draggable elements
### This PR implements or fixes #463 https://codesandbox.io/s/tiptap-prosemirror-draggable-issue-forked-ewp1x ### This PR closes the following issues #463 ### Does this PR require the Docs to be updated? Yes ### Does this PR require new tests? Yes ### This branch been tested on... _(click all that ...
diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 000000000..6fc92ba22 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "baseUrl": "./src/" + } +} diff --git a/src/Draggable/Draggable.js b/src/Draggable/Draggable.js index 2ff3c5c7e..2f471fb6c 100644 --- a/src/Dragga...
1
1
0
[{"id": "G0", "claim": "The new `originalSource` property should be added to the SensorEvent documentation.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
Shopify__flash-list__312
Shopify/flash-list
312
defect
9b4630147cc2c7fd5a17164a245fba1a73c7159a
a3f064aa103fc26a25aa75f7f100bd6a4818b108
Fix empty list behavior
## Description resolves #263 This is a relatively simple change that fixes ListEmptyComponent rendering. You will also notice that after this implementation reminders example will not longer flicker after first item is inserted. ## Known Issue There is a warning in recyclerlistview about rendering without...
diff --git a/CHANGELOG.md b/CHANGELOG.md index f726252be..4672a6649 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - Calculate average item sizes automatically - https://github.com/Shopify/flash-list/pull/296 +- Match FlashL...
5
4
2
[{"id": "G0", "claim": "The empty component renders at a different size in FlashList than in FlatList when using the same component (visible when pulling), so the PR does not yet match FlatList's empty-list behavior, and the reviewer asks how to fix it before merging.", "category": "correctness", "verdict": "supported"...
null
Shopify__ghostferry__100
Shopify/ghostferry
100
defect
847e2b2da3b329655b0062807f497f69599204b9
31418021b347f0c813177644bfabeccfe9895423
Moved TableSchemaCache loading from Ferry.Start to Ferry.Initialize
We want to do this because having the TableSchemaCache be first loaded in Ferry.Start means we have to then set the instance variables of BinlogStreamer and the verifiers after it is loaded. This effectively means the initializing of the BinlogStreamer and verifiers are split between Initialize and Start, an ugly situa...
diff --git a/ferry.go b/ferry.go index 8efbbd8e8..e598dc85d 100644 --- a/ferry.go +++ b/ferry.go @@ -121,6 +121,7 @@ func (f *Ferry) NewBinlogStreamer() *BinlogStreamer { MyServerId: f.Config.MyServerId, ErrorHandler: f.ErrorHandler, Filter: f.CopyFilter, + TableSchema: f.Tables, } } @@ -172,6 +...
3
2
1
[{"id": "G0", "claim": "The Ferry.New*() constructors should fail (e.g. return an error, perhaps via an initialized flag) if called before the Ferry is initialized, instead of silently producing unusable components.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G...
null
Shopify__ghostferry__102
Shopify/ghostferry
102
defect
847e2b2da3b329655b0062807f497f69599204b9
ae4f0735fc7c5296f8ddef11594ad7a6e86d2fcd
Retry acquisition of cutover lock on error
First step of https://github.com/Shopify/ghostferry/issues/101. With this change, the ShardingFerry will now attempt to retry acquiring the cutover lock a configurable number of times while also waiting a configurable number of seconds between each attempt. Later, we can add a "retry-after" header or similar to tel...
diff --git a/config.go b/config.go index 8d54e5148..30b830a73 100644 --- a/config.go +++ b/config.go @@ -278,6 +278,12 @@ type Config struct { // Optional: defaults to false AutomaticCutover bool + // These two values configure the amount of times Ferry should attempt to + // retry acquiring the cutover lock, and...
5
3
3
[{"id": "G0", "claim": "The new MaxCutoverRetries/CutoverRetryWaitSeconds options have no stated defaults and undefined behaviour when left unset, even though the author notes a value of 0 retries would retry indefinitely.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"...
null
Shopify__ghostferry__103
Shopify/ghostferry
103
defect
62c0b48960ff62dcba0801c042803029395736ca
93ef69eee31b7db223212f91536f0687fed8a6ea
Hook up interrupt/resume to copydb and sharding
A couple of minor things done in this PR: - Added StateDump to the Error HTTP callback so it can be posted during the ghostferry-sharding usage. - Changed the flag DumpStateToStdoutOnSignal to DumpStateOnSignal to reflect the fact that we dump the state to not just stdout but also via HTTP. - Added the ability to ...
diff --git a/config.go b/config.go index 8d54e5148..b2ee817bf 100644 --- a/config.go +++ b/config.go @@ -279,9 +279,9 @@ type Config struct { AutomaticCutover bool // This specifies whether or not Ferry.Run will handle SIGINT and SIGTERM - // by dumping the current state to stdout. - // This state can be used to ...
3
2
1
[{"id": "G0", "claim": "The callbacks test should verify the dumped state more thoroughly — asserting that keys expected to exist in the StateDump actually exist with non-empty values — instead of only checking that the StateDump field is non-empty.", "category": "testing", "verdict": "supported", "priority": "P2", "sc...
null
Shopify__ghostferry__12
Shopify/ghostferry
12
defect
902e5258a56d61017375a3c5b482482d9fae9c52
f02eb5cb4f953b8b5a77864610a859801da17194
Sharding: copy primary key tables only at the end of the ferry
This change helps keep the primary key table in the target database consistent for a longer time period. For example, for us, we have developers who `JOIN ON` a primary key table in their queries to filter out some data but see unexpected results. This change makes that sort of inconvenience less likely follow up...
diff --git a/sharding/filter.go b/sharding/filter.go index 2f45308b6..bb2f1a711 100644 --- a/sharding/filter.go +++ b/sharding/filter.go @@ -218,7 +218,7 @@ func (s *ShardedTableFilter) ApplicableTables(tables []*schema.Table) (applicabl if _, exists := s.PrimaryKeyTables[table.Name]; exists { if len(table.PKC...
3
1
1
[{"id": "G0", "claim": "The new method name should drop the redundant 'tables' suffix (s/tables// like above), i.e. rename copyPrimaryKeyTables to copyPrimaryKeysTables.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Why is it ok to reduce the p...
null
Shopify__ghostferry__122
Shopify/ghostferry
122
defect
afca2e5ab809343c49395aeabdd5e506ea2d5127
5c201865fa814d3637f843104ff967f1bdd043d5
InlineVerifier Binlog Reverifier
The InlineVerifier doesn't verify the Binlog copied. This PR adds a reverifier component to the InlineVerifier. It periodically attempts to verify the BinlogEvents copied prior to cutover (within `PeriodicallyVerifyBinlogEvents`). If a row doesn't match, it will be added back to the queue to be verified again in the fu...
diff --git a/config.go b/config.go index 0117a4ce2..53c7dfaeb 100644 --- a/config.go +++ b/config.go @@ -142,6 +142,47 @@ func (c *DatabaseConfig) assertParamSet(param, value string) error { return nil } +type InlineVerifierConfig struct { + // The maximum expected downtime during cutover, in the format of + // ti...
19
10
0
[{"id": "G0", "claim": "InlineVerifierConfig.Validate should return an error or set a default when MaxExpectedDowntime is unset, instead of silently disabling the downtime check.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "PeriodicallyVerifyBinlogEven...
null
Shopify__ghostferry__123
Shopify/ghostferry
123
defect
afca2e5ab809343c49395aeabdd5e506ea2d5127
4f17d4da8f7d83826e5f2964fb0b45aa9b4f1c67
Removed StateTracker complexity
The `StateTracker` code was complex as it was split between the `CopyStateTracker` and the `VerifierStateTracker`. Since we are moving towards the `InlineVerifier`, which requires very little state, we don't need this complexity anymore. This PR removes the extra complexity and only retains a single `StateTracker` ...
diff --git a/batch_writer.go b/batch_writer.go index 9baf3c052..73c4b37e9 100644 --- a/batch_writer.go +++ b/batch_writer.go @@ -10,7 +10,7 @@ import ( type BatchWriter struct { DB *sql.DB InlineVerifier *InlineVerifier - StateTracker *CopyStateTracker + StateTracker *StateTracker DatabaseRewri...
3
2
0
[{"id": "G0", "claim": "The inline-verifier binlog position tracking (lastVerifiedBinlogPosition, i.e. LastStoredBinlogPositionForInlineVerifier) should not be introduced in this PR; leave it out for now and send it as a follow-up to #122.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "intr...
null
Shopify__ghostferry__124
Shopify/ghostferry
124
defect
9da333700cecf36f8084d3adc544bc979115c3cc
27982c80012f0121c1d3fe4af692d3ccaa529aad
Adds InlineVerifier state into StateTracker
This adds the InlineVerifier state to the StateTracker so it can be tracked, serialized, and restored. This effectively re-adds all the code that was removed in #123 as it was cluttering that PR. The actual code that serializes/restores the state will come in the next PR, which will come out as soon as we merge this...
diff --git a/ferry.go b/ferry.go index e2c251775..d21ea618f 100644 --- a/ferry.go +++ b/ferry.go @@ -494,6 +494,7 @@ func (f *Ferry) Start() error { // is terminated with some rows copied but no binlog events are written. // This guarentees that we are able to restart from a valid location. f.StateTracker.UpdateL...
3
3
2
[{"id": "G0", "claim": "Add a test covering the new MinBinlogPosition min-of-two-positions behaviour.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Removing a batch from the reverify store by PK set can drop a re-added change: a PK changed again betwee...
null
Shopify__ghostferry__146
Shopify/ghostferry
146
defect
1b56e16bf339386f0b84e5840b7fc40b533f6ba6
fccd725b221a73521909c2afa2b2eddab522b3c6
Do not record InlineVerifier pos in state dump if not verifying
If the VerifierType is not Inline, there's no point in recording the InlineVerifier binlog position in the state dump. This is done right now because the code records the binlog position at the beginning of a run. This actually somewhat misleading as it makes people using Ghostferry without verification might think the...
diff --git a/ferry.go b/ferry.go index 5f7e21d21..879aaf83d 100644 --- a/ferry.go +++ b/ferry.go @@ -508,7 +508,9 @@ func (f *Ferry) Start() error { // is terminated with some rows copied but no binlog events are written. // This guarentees that we are able to restart from a valid location. f.StateTracker.UpdateL...
2
1
0
[{"id": "G0", "claim": "Given the PR now only sets LastStoredBinlogPositionForInlineVerifier when the InlineVerifier is being used, the new Go test case would be expected to leave LastStoredBinlogPositionForInlineVerifier empty and put mysql.Position{\"mysql-bin.00002\", 10} in LastWrittenBinlogPosition instead of the ...
null
Shopify__ghostferry__155
Shopify/ghostferry
155
defect
76555c1bba0343e1302c016f9659ab41f6db36ba
0161ca63f6eb492a2ab423b654d6b62d5f033e26
Add maintenance comment to all sql change queries
# The Problem Need to differentiate Technical Ghostferry's binlog events from Core's Business binlog events # The Solution Add `/*maintenance:ghostferry*/` comment to all change queries that are executed by Ghostferry.
diff --git a/.gitignore b/.gitignore index ce7a9b135..72f3c87f3 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ .vagrant/ build/ .bundle/ -.vscode/ \ No newline at end of file +.vscode/ +.idea diff --git a/config.go b/config.go index 91d2bf19d..7500a1c95 100644 --- a/config.go +++ b/config.go @@ -116,7 +1...
6
3
2
[{"id": "G0", "claim": "The static maintenance comment should be made configurable via the Ghostferry config struct so the caller can customize it (e.g. job id, tenant id).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The query comment should live on t...
null
Shopify__ghostferry__166
Shopify/ghostferry
166
defect
76555c1bba0343e1302c016f9659ab41f6db36ba
4b4900d698f44f287ebd51edc90e01b4ca4810b0
Allow specifying table creation order #161
This commit introduces the ability for ghostferry-copydb to create tables in a specific order. This can be useful if tables to be created contain foreign-key constraints (FKCs). NOTE: This does not mean that ghostferry supports FKCs! However, with this feature and by disabling FKCs in the target DB, it is theore...
diff --git a/copydb/config.go b/copydb/config.go index 1efe2c927..00572cf5b 100644 --- a/copydb/config.go +++ b/copydb/config.go @@ -44,6 +44,15 @@ type Config struct { // Filter configuration for tables to copy Tables FilterAndRewriteConfigs + // Hints in which order to create database tables, as <db>.<table> . ...
8
7
0
[{"id": "G0", "claim": "Rename the new config field TableCreationOrder to TablesToBeCreatedFirst.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The config comment should also state that all tables not specified in the list are created in arbitrary order...
null
Shopify__ghostferry__180
Shopify/ghostferry
180
defect
4ba7d1c5e94fb1a87da0d75c1aada7c1ff1fbd9f
9f267ad3f0d3a72fc328585b959f4835de470a08
Allow target table to already exist in CopydbFerry
This will make it configurable to allow an already existing table in target. Default will be to not allow it, just like today. There are a few use-cases where this could make sense, for example if you want to make changes to a large table before you fill it with data (eg. new defaults, new composite primary key or n...
diff --git a/copydb/config.go b/copydb/config.go index e84267c9c..5b88b377e 100644 --- a/copydb/config.go +++ b/copydb/config.go @@ -70,6 +70,10 @@ type Config struct { // The duration to wait for the replication to catchup before aborting. Only use if RunFerryFromReplica is true. WaitForReplicationTimeout string...
1
1
0
[{"id": "G0", "claim": "The comment documenting AllowExistingTargetTable should carry a harder disclaimer making clear that schemas and data compatibility won't be validated and use is at one's own risk.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
Shopify__ghostferry__192
Shopify/ghostferry
192
defect
7c32e8cbe8b2b86060a26748aba09a7032c5b668
696e308621095842e34f4276f28b4b60b5ce3597
Enhancements to tests
This PR contains several improvements to tests: * Travis have been split in two jobs, one for Go and one for Ruby making it twice as fast. * Go tests now use gotestsum which captures output only prints on failure. * Ruby tests now use minitest-reporters making output a bit nicer. * Ruby tests are also captured in t...
diff --git a/.travis.yml b/.travis.yml index 5acbbe779..86d24fa1e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,37 @@ ---- -sudo: required -language: go -go: - - "1.14.1" +if: (type = push AND branch = master) OR type = pull_request + +os: + - linux +dist: xenial +language: go go_import_path: github.com/S...
2
2
1
[{"id": "G0", "claim": "Installing a random binary into people's GOPATH/bin as a side effect of running tests is sketchy for a public project; install it to ./bin/ instead.", "category": "security", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new test-go and test-ruby ta...
null
Shopify__ghostferry__206
Shopify/ghostferry
206
defect
1e55bd7b2eac5cfd18735e5f389526903c30a756
ef8115cd45d1630e4de22d5e31e11e6b93269f08
Run DataIterator over tables in descending order of pagination key
Closes https://github.com/Shopify/ghostferry/issues/194 Estimate the size of the table to be copied by counting the number of pagination keys of that table. Start copying the largest tables first in order to avoid large table from being the bottleneck near the end of copying tables.
diff --git a/data_iterator.go b/data_iterator.go index ffead9014..5ade14bd9 100644 --- a/data_iterator.go +++ b/data_iterator.go @@ -5,6 +5,7 @@ import ( sql "github.com/Shopify/ghostferry/sqlwrapper" "math" "sync" + "sort" "github.com/sirupsen/logrus" ) @@ -52,7 +53,7 @@ func (d *DataIterator) Run(tables []...
3
2
0
[{"id": "G0", "claim": "The pull request modifies the vendored logrus go.mod (adding `go 1.14`) and the reviewer asks for the reason for this change.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Sorting tables by max pagination key is crude; o...
null
Shopify__ghostferry__230
Shopify/ghostferry
230
defect
837fe03a9e574bc42921cbb2f5e4bb034af022cd
765fd2223edf29b15a88e65736759a388757480c
Add estimated row batch size in bytes to state
Related: https://github.com/Shopify/ghostferry/issues/226 Similar PR: https://github.com/Shopify/ghostferry/pull/228 Add an estimate of number of bytes for each row batch and sending it with the `progress` callback
diff --git a/batch_writer.go b/batch_writer.go index 873f4e008..b82d8f3b4 100644 --- a/batch_writer.go +++ b/batch_writer.go @@ -123,7 +123,7 @@ func (w *BatchWriter) WriteRowBatch(batch *RowBatch) error { // Note that the state tracker expects us the track based on the original // database and table names as opp...
4
2
1
[{"id": "G0", "claim": "The json.Marshal-based EstimateByteSize overestimates byte size (e.g. an int64 serialised as a string can be far larger than its nominal 8 bytes) and how it interacts with binary data stored in blob types is unverified.", "category": "correctness", "verdict": "opposed", "priority": "P2", "scope"...
null
Shopify__ghostferry__243
Shopify/ghostferry
243
defect
c5e2c6d39eaa357f7ff1cf76050165d07474f0f4
d543134bdbb0aa874d2984a44c379614ecf028aa
Add data iteration batch size map
After analysis, we found that the ideal batch size varies for each table this PR adds the ability to have `DataIterationBatchSizePerTableOverride ` to be configurable per table. We can pass in `map[schema_name]: map[table_name]: batchSize` to the config to set the batchSize for each table. If no batchSize is specifi...
diff --git a/config.go b/config.go index b9d21a2a3..6865be72e 100644 --- a/config.go +++ b/config.go @@ -432,6 +432,7 @@ type Config struct { // Optional: defaults to 100 BinlogEventBatchSize int + // Maps the schema, table name to a batch size. // The batch size used to iterate the data during data copy. This ...
5
5
2
[{"id": "G0", "claim": "The PR should keep the DataIterationBatchSize uint64 default field instead of replacing/breaking it, with the per-table map as an override, so existing configs stay backward compatible.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim"...
null
Shopify__ghostferry__247
Shopify/ghostferry
247
defect
990ce4ac9171b7be6e41ce7eb4e25c232d96dd9d
5119881b3bcaac3cae0d6f7dad2932eab91c8649
Dynamically calculate batch size per table
This PR adds the ability to dynamically calculate the batch size using linear interpolation for all tables Added a new `DataIterationBatchSizePerTableOverride` struct to the config For example, we can pass this into the config ``` { MinAvgRowLength: 200 MaxAvgRowLength: 10000 ControlPoints: { 200: 5...
diff --git a/config.go b/config.go index 7ea00f7a2..f2721aded 100644 --- a/config.go +++ b/config.go @@ -375,6 +375,33 @@ func (c *CascadingPaginationColumnConfig) FallbackPaginationColumnName() (string return c.FallbackColumn, true } +type DataIterationBatchSizePerTableOverride struct { + // Lower limit for rowLe...
4
4
1
[{"id": "G0", "claim": "Missing space in `nil{` in GetBatchSize; run go fmt.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Express MySQLNumParamsLimit as 2^16 (e.g. `1 << 16`) and link to the MySQL documentation explaining the number.", "catego...
null
Shopify__ghostferry__253
Shopify/ghostferry
253
defect
0d520e69c70fd9c078cc17773dc5576915f14d76
fc16728fd12959683d93ac12e7b102d5a1c6be09
Enforce foreign key constraints are not present during initialization
Closes #3 Ghostferry doesn't support copying tables with Foreign Key constraints. Currently, we let the Ghostferry run begin to eventually crash midway through the run. We should enforce this decision by erroring out during initialization, instead. This PR queries the `information_schemas` to determine if any...
diff --git a/config.go b/config.go index 6668c280e..f3c34dde6 100644 --- a/config.go +++ b/config.go @@ -700,6 +700,17 @@ type Config struct { // // Required: defaults to false SkipTargetVerification bool + // + // The Ferry will enforce that the source DB has no Foreign Key constraints. + // It will error out be...
6
6
2
[{"id": "G0", "claim": "The pull request should add a test covering the SkipForeignKeyConstraintsCheck option.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer is unsure the PR should implicitly set SkipForeignKeyConstraintsCheck when TablesT...
null
Shopify__ghostferry__258
Shopify/ghostferry
258
defect
203cd1a16ef38300638770b1c9fcc7fa6e230ab0
ba4d13ce8765c0b699c013cc5e2dbf8bb3c3e0c8
Fix BinlogStreamer for TargetVerifier by correctly handling rewrites
## Overview Fixes an issue in the `TargetVerifier` if there happened to be any configured schema or table rewrites. This patch correctly handles any configured rewrites by reversing the configurations to lookup DML events using the Source `TableSchemaCache` from DML events streamed on the Target. Note that If...
diff --git a/binlog_streamer.go b/binlog_streamer.go index eece4ab18..a1a7ec762 100644 --- a/binlog_streamer.go +++ b/binlog_streamer.go @@ -29,6 +29,9 @@ type BinlogStreamer struct { binlogSyncer *replication.BinlogSyncer binlogStreamer *replication.BinlogStreamer + DatabaseRewrites map[string]string + TableRe...
4
3
0
[{"id": "G0", "claim": "A comment linking to this PR should be added above the DatabaseRewrites/TableRewrites fields to point readers at the PR description.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The rewrite maps on BinlogStreamer are conf...
null
Shopify__ghostferry__272
Shopify/ghostferry
272
defect
88a5deaedd98e1060d3f545f11f86b44ebdc28bd
80ccefba01122fe286c0e2d62bafd360d9f851e7
Enable Cutover callback in config for copydb
Refactoring the code so the shared config between copydb and sharding allow `CutoverLock` and `CutoverUnlock` callbacks.
diff --git a/config.go b/config.go index 0f3f83e49..d3e92fc54 100644 --- a/config.go +++ b/config.go @@ -618,10 +618,23 @@ type Config struct { StateCallback HTTPCallback StateReportFrequency int + // Report error via an HTTP callback. The Payload field will contain the ErrorType, // ErrorMessage and t...
2
2
0
[{"id": "G0", "claim": "The comment for MaxCutoverRetries and CutoverRetryWaitSeconds in config.go should also document their default values and what happens when the CutoverLock callback returns a non-OK status.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1...
null
Shopify__ghostferry__286
Shopify/ghostferry
286
defect
43a8894ad4c35005dde1b94108566109d3cd4173
e86a395f120cf01c1e49d9d059727766db794707
add AllowSuperUserOnReadOnly flag
Add `AllowSuperUserOnReadOnly` so that ghostferry user can write to the target DB even if it is read_only.
diff --git a/config.go b/config.go index 6d8025396..bea652867 100644 --- a/config.go +++ b/config.go @@ -753,6 +753,17 @@ type Config struct { // in the Progress. This behaviour is perfectly okay and doesn't mean there are no rows being written // to the target DB. EnableRowBatchSize bool + + // Currently if the ...
2
2
0
[{"id": "G0", "claim": "The word \"Currently\" should be dropped from the new AllowSuperUserOnReadOnly comment so it reads \"If the target DB is set to read_only ghostferry will throw an error during the initialization step.\"", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced...
null
Shopify__ghostferry__30
Shopify/ghostferry
30
defect
95ae927b942d6c9cecf749075527110acaa97eeb
1e81860dc8b4d2d672f0da24ad4199617af4dfdf
WaitUntilReplicaIsCaughtUpToMaster in Ghostferry core
**Note: the current implementation is NOT hooked up to sharding/copydb. The present work focuses on the main algorithm. Implementation inside sharding/copydb can come in follow up PRs.** ### Problem If we are copying from a slave source database, we must ensure that the slave is up to date after making the source...
diff --git a/binlog_streamer.go b/binlog_streamer.go index c832afa53..0403a508e 100644 --- a/binlog_streamer.go +++ b/binlog_streamer.go @@ -81,7 +81,7 @@ func (s *BinlogStreamer) ConnectBinlogStreamerToMysql() error { } s.logger.Info("reading current binlog position") - s.lastStreamedBinlogPosition, err = s.read...
12
6
1
[{"id": "G0", "claim": "The new wait logic has no integration test and it is unclear how to test it meaningfully in this codebase (hkdsun floated a Toxiproxy replication chain but called it out of scope for this PR).", "category": "testing", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1",...
null
Shopify__ghostferry__321
Shopify/ghostferry
321
defect
54ea8c7ac735324f7ad559b40253e177bfbf8cfd
b579f8d5f75f4b72154c82cfd17afc7a22123aa8
Add support for specifying included tables to sharding config
### What The sharding config takes in a list of ignored tables currently. This works well when the use case calls for including most of the tables. However, if the use case calls for including a small subset of the tables, then the ignored list starts becoming very long and unwieldy. In this commit, we introdu...
diff --git a/sharding/config.go b/sharding/config.go index 2e8031188..e244583bc 100644 --- a/sharding/config.go +++ b/sharding/config.go @@ -1,6 +1,8 @@ package sharding import ( + "fmt" + "github.com/Shopify/ghostferry" ) @@ -18,14 +20,22 @@ type Config struct { StatsDAddress string - JoinedTables m...
2
1
0
[{"id": "G0", "claim": "Nitpick: `isPresent` may not be the right name for the filter helper in sharding/filter.go, since what it returns means different things depending on the filter type flag.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The ...
null
Shopify__ghostferry__368
Shopify/ghostferry
368
defect
08b41723ffd669a1019448ade6e079abec56ccee
eec345e51cac9003eac36a77b9eece7dd85361e2
Patch go-mysql to keep trailing zero in floats in json
Patched json binary decoder from go-mysql library to add a custom marshal json method for the floats to keep the trailing 0. This patch only works with mysql version 8, as mysql version 5.7 gets rid of the trailing 0 on `cast...as json` <img width="704" alt="Screenshot 2024-11-21 at 12 36 53" src="https://github.c...
diff --git a/binlog_streamer.go b/binlog_streamer.go index fd4178e57..d382567ff 100644 --- a/binlog_streamer.go +++ b/binlog_streamer.go @@ -101,6 +101,7 @@ func (s *BinlogStreamer) createBinlogSyncer() error { Password: s.DBConfig.Pass, TLSConfig: tlsConfig, UseDecimal: ...
2
1
1
[{"id": "G0", "claim": "Add a test case with a non-zero fractional part after the decimal (e.g. 52.19), just for completeness.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G3", "claim": "Patching the vendored go-mysql library risks the patch being overwritten, so th...
null
Shopify__ghostferry__380
Shopify/ghostferry
380
defect
4d3db2fbf3d01d06b0ee5e86df28719b02927ec9
d913dcf934e5871682099f068fe47d1192a23dc0
Manage index hinting for sharding data iterator query
Recently we have discovered that `USE INDEX` can slow the data iterator batching queries down as MySQL can decide to do a table scan instead, where as not using it allows the optimizer to select the correct index & avoid table scan. `FORCE INDEX` prevents MySQL from doing a table scan also but it removes the flexibilit...
diff --git a/sharding/config.go b/sharding/config.go index e244583bc..21e586712 100644 --- a/sharding/config.go +++ b/sharding/config.go @@ -29,6 +29,9 @@ type Config struct { PrimaryKeyTables []string Throttle *ghostferry.LagThrottlerConfig + + // ShardedCopyFilterConfig is used to configure the sharded copy fil...
4
3
2
[{"id": "G0", "claim": "The DisableIndexHint / UseForceIndex / per-table index-hint configuration is too complicated and could be replaced with simpler settings (IndexHintEnabled defaulting to true, and IndexHintType of use/force defaulting to use).", "category": "design", "verdict": "supported", "priority": "P1", "sco...
null
Shopify__ghostferry__431
Shopify/ghostferry
431
defect
0e1e8a3d6b644da13eeb3f481258bd8c6b80e45e
8193468f6d4c864da388102c9cd3a9eddb9d77b2
fix: initialise BinlogWriter channel before Run() to prevent nil-channel hang
`Ferry.Run()` launches `BinlogWriter.Run()` and `BinlogStreamer.Run()` in concurrent goroutines (ferry.go:733-745). Previously, the event buffer channel was created inside `BinlogWriter.Run()`, so if the `BinlogStreamer` received a row event and called `BufferBinlogEvents()` before the writer goroutine was scheduled, t...
diff --git a/binlog_writer.go b/binlog_writer.go index bc4447e3..4b19b931 100644 --- a/binlog_writer.go +++ b/binlog_writer.go @@ -25,9 +25,21 @@ type BinlogWriter struct { logger Logger } -func (b *BinlogWriter) Run() { +// Initialize allocates the event buffer channel and logger so that +// Buffe...
1
1
1
[{"id": "G0", "claim": "The defensive nil-channel fallback in Run() may leave open race-y behaviour, and the reviewer questions whether it is better than a hard failure.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
Shopify__ghostferry__48
Shopify/ghostferry
48
defect
affb26a23e3ebd0ba910ba46f8c6f118f331a7c1
6d4230ef9e149a113014b0d292b42d051dc09491
Check if target database is writable before starting ferry
This allows a ferry to fail early in case the provided target database connection is not writeable. We previously had this check in our application but it makes more sense to perform this check at the Ghostferry level. @Shopify/pods @shuhaowu
diff --git a/ferry.go b/ferry.go index 8695c56b8..353df7c4d 100644 --- a/ferry.go +++ b/ferry.go @@ -132,6 +132,12 @@ func (f *Ferry) Initialize() (err error) { return err } + err = checkConnectionIsWritable(f.TargetDB) + if err != nil { + f.logger.WithError(err).Error("target connection is not writable") + re...
4
3
1
[{"id": "G0", "claim": "The ferry should also check the source database, not just the target, and should re-check before entering the cutover, not only at the beginning of the move.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "ShardingFerry.Initia...
null
Shopify__ghostferry__50
Shopify/ghostferry
50
defect
70fd36a3e21740674bb68c4d11cbb35d9adb39e6
a37ec446d7b065760d52819903c4b808c8c9e3f3
TIMESTAMP Timezone fix
https://github.com/siddontang/go-mysql/pull/295 has been merged and thus we have a way to fix the timezone issue causing binlogs to not properly sync over. However, the deeper question now is whether or not setting this to UTC will solve the issue. Should we also try to set the mysql session timezone to UTC while e...
diff --git a/Gopkg.lock b/Gopkg.lock index 974976490..9964aafd3 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -118,7 +118,7 @@ [[projects]] branch = "master" - digest = "1:8a890d0793e1199e134a0c8192c33456d1aca48bc874ca08dc8b7822d8d06b01" + digest = "1:8b826f26e0bbb00dcfd8284c4480c41dab14240be39ebcd84341213052fd71...
1
1
1
[{"id": "G0", "claim": "The pull request should add a test for the previously broken TIMESTAMP behaviour by inserting into ts_col in setupMultiTypeTable, which currently never exercises the column the removed TODO marked as broken on master.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "i...
null
Shopify__ghostferry__51
Shopify/ghostferry
51
defect
70fd36a3e21740674bb68c4d11cbb35d9adb39e6
72352c2397bd90a209285bd54451a824498c6179
Abort ferry if master db becomes read-only
Currently, we allow running our ferries from readonly replica and we require the user to provide the replica's master connection details. Before we `WaitUntilReplicaIsCaughtUpToMaster`, it makes sense to ensure the connection we have is the currently active writer and avoid data loss. In our current implementation, ...
diff --git a/ferry.go b/ferry.go index 6e21b6efa..0eb27693e 100644 --- a/ferry.go +++ b/ferry.go @@ -134,6 +134,15 @@ func (f *Ferry) Initialize() (err error) { return err } + isReplica, err := f.checkDbIsAReplica(f.TargetDB) + if err != nil { + f.logger.WithError(err).Error("cannot check if target db is writab...
3
3
0
[{"id": "G0", "claim": "The abort message's word 'lagged' should be spelled 'lagging'.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The error is logged twice because ErrorHandler.Fatal already logs it and the code additionally logs it with f.log...
null
Shopify__ghostferry__60
Shopify/ghostferry
60
defect
80144934709c74f8aea9fc7db2aad890f0c9508d
06fb3fdf52e85f68c9b0a90f0ca95eff61a873c9
Refactored DataIteratorState to StateTracker for interruptibility
*The code review might look big, but most of it is me moving the DataIteratorState into its own file called StateTracker.* Instead of having the DataIterator own the state of the Ferry run, Ferry should own the state as it involves both the DataIterator and the BinlogWriter. This means effectively, the DataIterator ...
diff --git a/Gopkg.lock b/Gopkg.lock index 37742deee..5604d7739 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -114,14 +114,14 @@ [[projects]] branch = "master" - digest = "1:22d4ade969b8af6af12062fbd4c68500553aef9366d245421da47dd7a8929a02" + digest = "1:6336d25b225c6ec8733bb33d77249c22d41e6ee3adafa89313de71ade255...
13
8
2
[{"id": "G0", "claim": "StateTracker should be optional (call sites nil-check it, e.g. `if b.StateTracker != nil`), so DataIterator/BinlogStreamer can be used independently of Ferry.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The state dump action shou...
null
Shopify__ghostferry__66
Shopify/ghostferry
66
defect
5d6b1f5941416329670e2f4ee644f3fee83ce94b
9522e68c83a04b949c72acd393a28eb56e1448e8
Pass the current BinlogPosition to DMLEvent so BinlogWriter can set lastWrittenBinlogPosition
Since the BinlogWriter is a separate goroutine to the BinlogStreamer, the position that it wrote to is important if we want to interrupt and resume Ghostferry (interrupt saves BinlogWriter position, and resume starts the BinlogStreamer from the BinlogWriter position). To allow for this, we need to pass the binlog po...
diff --git a/binlog_streamer.go b/binlog_streamer.go index c8bd64d69..fd410bf8b 100644 --- a/binlog_streamer.go +++ b/binlog_streamer.go @@ -226,12 +226,24 @@ func (s *BinlogStreamer) handleRowsEvent(ev *replication.BinlogEvent) error { eventTime := time.Unix(int64(ev.Header.Timestamp), 0) rowsEvent := ev.Event.(*r...
3
2
0
[{"id": "G0", "claim": "The commented-out lastWrittenBinlogPosition assignment added in writeEvents is temporary; once this merges, the line will be changed in #60 to send the position to the StateTracker.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "c...
null
Shopify__ghostferry__67
Shopify/ghostferry
67
defect
9185cfebebbdc8347a83ac85744fa9389acb4f36
e0bc75af099ffd0a28572b28d841953844e762e7
Interrupt Ghostferry via signals and resume from SerializedState
This PR implements the ability to interrupt Ghostferry via SIGTERM/SIGINT. These signals causes the error handler to dump the current state to stdout and panic to terminate the process. Resume is also implemented: give a SerializedState as the StateToResumeFrom on the Config object and DataIterator will resume via t...
diff --git a/Gopkg.lock b/Gopkg.lock index 37742deee..5604d7739 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -114,14 +114,14 @@ [[projects]] branch = "master" - digest = "1:22d4ade969b8af6af12062fbd4c68500553aef9366d245421da47dd7a8929a02" + digest = "1:6336d25b225c6ec8733bb33d77249c22d41e6ee3adafa89313de71ade255...
22
8
1
[{"id": "G0", "claim": "The StateTracker override HACK in RunStandaloneDataCopy should be removed by refactoring newDataIterator (and the components) so they can be initialized independently of Ferry.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The te...
null
Shopify__ghostferry__89
Shopify/ghostferry
89
defect
07831b133f540f93263934388bf14618ebd89496
874f576e02b293c95167215f8c125f5610ab6d6c
Moved the ownership of IterativeVerifier from sharding/copydb to Ferry
What is done ---------- This PR moves the initialization and management of IterativeVerifier from the application level to the core library. This is required to interrupt and resume the IterativeVerifier as otherwise the application layer will have to assume the responsibility of resuming the IterativeVerifier co...
diff --git a/compression_verifier.go b/compression_verifier.go index ec440b542..546519020 100644 --- a/compression_verifier.go +++ b/compression_verifier.go @@ -21,12 +21,10 @@ const ( ) type ( - columnCompressionConfig map[string]string - // TableColumnCompressionConfig represents compression configuration for a...
5
2
0
[{"id": "G0", "claim": "The tables/TableSchemaCache are wired into the verifier only after Initialize - via SetApplicableTableSchemaCache called in Start and a leftover Run(tables) parameter from a half-done refactor - and the reviewer asks why the verifier is not simply constructed with the right fields in Initialize....
null
Shopify__ghostferry__90
Shopify/ghostferry
90
defect
07831b133f540f93263934388bf14618ebd89496
217f478fa48f763ea0a037364cb8c7d544d99de9
Partially refactored StateTracker into two stages: copy and verify
The previous StateTracker can only handle tracking the copy, not the verify. This commit refactors the StateTracker into two distinct stages: the CopyStateTracker and the VerifierStateTracker, along with their associated SerializableStates (CopySerializableState and VerifySerializableState). The Ferry is responsibl...
diff --git a/batch_writer.go b/batch_writer.go index a7a400867..8bab6dc5f 100644 --- a/batch_writer.go +++ b/batch_writer.go @@ -11,7 +11,7 @@ import ( type BatchWriter struct { DB *sql.DB - StateTracker *StateTracker + StateTracker *CopyStateTracker DatabaseRewrites map[string]string TableRewrites...
4
3
0
[{"id": "G0", "claim": "It may be beneficial to start leaving design comments like this one for all the major components.", "category": "documentation", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The design comment should make clear that the copy and verification stages are...
null
Shopify__go-lua__100
Shopify/go-lua
100
defect
48449c60c0a91cdc83cf554aa0931380393b9b02
c8f1da6bc4507a7eb8f6258c0ef29233f12ba672
Naming things, cache invalidation and ...
So, as per @fbogsany 's [comment](https://github.com/Shopify/go-lua/pull/100#discussion_r283544031), then that's the proper fix. The issue surfaced as follow: ```lua local thing = barf() -- line 1; is the source of the error print(thing) -- line 3; this won't execute, and must NOT be the loc of the error! `...
diff --git a/debug.go b/debug.go index ea1a83c..8eba2f2 100644 --- a/debug.go +++ b/debug.go @@ -14,7 +14,7 @@ func (l *State) prototype(ci *callInfo) *prototype { return l.stack[ci.function].(*luaClosure).prototype } func (l *State) currentLine(ci *callInfo) int { - return int(l.prototype(ci).lineInfo[ci.savedPC])...
1
1
0
[{"id": "G0", "claim": "The extra parentheses around (ci.savedPC - 1) in currentLine are unnecessary and should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
Shopify__go-lua__40
Shopify/go-lua
40
defect
5993af43bf3abeed6580e06506aa1a7e0f99508f
759b8a1cda356faf8486d955f3fc7b1f63591954
Move clock function to platform-dependent files
Fixes #35
diff --git a/aux.go b/auxiliary.go similarity index 100% rename from aux.go rename to auxiliary.go diff --git a/os.go b/os.go index f287aa2..3a7de4d 100644 --- a/os.go +++ b/os.go @@ -5,7 +5,6 @@ import ( "os" "os/exec" "strings" - "syscall" "time" ) @@ -23,12 +22,7 @@ func field(l *State, key string, def in...
1
1
1
[{"id": "G0", "claim": "Use filepath instead of path for joining test file paths, since path uses URL-style '/' separators while filepath uses the native '\\' separators needed on Windows.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
Shopify__go-lua__58
Shopify/go-lua
58
defect
e070da3ec8b0d36f41063f67fec918692bebc165
f1bae156966be547f038fb17ccfed0d9d034deba
Handle runtime panic where comparison operand is nil
All table/UD comparisons were assuming the other operand wasn't nil. This doesn't mesh with Lua, since it results in a panic where the result should be false. Related to issue #45 and pull request #57, but addresses the issue for userdata as well. The issue's pretty simple: if one side of the comparison is a table or ...
diff --git a/vm.go b/vm.go index c011093..11ebdc6 100644 --- a/vm.go +++ b/vm.go @@ -102,13 +102,19 @@ func (l *State) equalObjects(t1, t2 value) bool { case *userData: if t1 == t2 { return true + } else if t2, ok := t2.(*userData); ok && t2 != nil { + tm = l.equalTagMethod(t1.metaTable, t2.metaTable, tmEq)...
2
2
1
[{"id": "G0", "claim": "The added `else if !ok || t2 == nil { return false }` branches in equalObjects are unnecessary since nil values are guaranteed to be (nil, nil), so the type checks should be simplified to a single `else if t2, ok := t2.(*userData)` / `(*table)` that falls through to the tag-method return.", "cat...
null
Shopify__go-lua__62
Shopify/go-lua
62
defect
e070da3ec8b0d36f41063f67fec918692bebc165
f3808c988b26865d9e62047a45937607fd2cb438
Fix split call info code slices on opTailCall
These changes attempt to address the `opTailCall` issue (#46) by adding enough tests to figure out which sorts of tail calls fail and, following that, fix the issue itself. The tests, as basic as they are, show that `opTailCall` only really fails if the function being called is different from the current function (i.e...
diff --git a/vm.go b/vm.go index c011093..b033698 100644 --- a/vm.go +++ b/vm.go @@ -758,6 +758,7 @@ func init() { oci.setTop(ofn + (e.l.top - nfn)) // correct top oci.frame = e.l.stack[base:oci.top] oci.savedPC = nci.savedPC + oci.code = nci.code // correct code (savedPC indexes nci->co...
4
4
0
[{"id": "G0", "claim": "The tailcall test names should follow Go CamelCase and be renamed to TestRecursiveTailCall, TestCallerTailCall, TestCalleeTailCall and TestNoTailCall.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The '// Related issue(s): #...
null
Shopify__go-lua__63
Shopify/go-lua
63
defect
506bfca29f5dd54d8bdbefc226388911ace9318a
9312265ebb3aa6bac73e949af16545b81527d880
Fix PushFString %p format token.
Fixes a nasty bug where using a %p in a format string does not advance the argument index, which causes the next format token to look at the same argument again and all subsequent tokens will be off-by-one.
diff --git a/lua.go b/lua.go index a591fc6..1d6fe78 100644 --- a/lua.go +++ b/lua.go @@ -911,6 +911,7 @@ func (l *State) PushFString(format string, args ...interface{}) string { i++ case 'p': l.push(fmt.Sprintf("%p", args[i])) + i++ case '%': l.push("%") default: diff --git a/lua_test.go b/lua_te...
1
1
1
[{"id": "G0", "claim": "The new TestPushFStringPointer cannot determine whether it passed or failed because it never checks the result; it should validate that the formatted output is what is expected.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
Shopify__go-lua__67
Shopify/go-lua
67
defect
fd4685aede765705f4df8425a661e424e4d2e5b5
4f7eb0818c480384f39dbb414f0444e1a0eee306
Return proper errors in LoadFile and LoadString
- Error messages did not properly chunkID the source filename, leading to @'s next to filenames and such. - LoadFile improperly raised a generic file read error, even if the actual error was a Lua error such as a SyntaxError.
diff --git a/auxiliary.go b/auxiliary.go index ebfc34e..d62c4d0 100644 --- a/auxiliary.go +++ b/auxiliary.go @@ -507,7 +507,11 @@ func LoadFile(l *State, fileName, mode string) error { if f != os.Stdin { _ = f.Close() } - if err != nil { + switch err { + case nil: // do nothing + case SyntaxError: // do nothing ...
1
1
0
[{"id": "G0", "claim": "The three do-nothing cases in LoadFile's switch could be merged into a single `case nil, SyntaxError, MemoryError:` line.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
Shopify__go-lua__83
Shopify/go-lua
83
defect
be2af88903644fb230c46d59eb2a1d75d7171258
08339029eabdf1178151f8dee030ae7a338a3691
implements dump which dumps a function as a binary chunk
Adds support for [`Dump`](http://www.lua.org/manual/5.3/manual.html#lua_dump) The corresponding C Lua code can be found in ldump.c. cc @camilo
diff --git a/dump.go b/dump.go new file mode 100644 index 0000000..01c8de7 --- /dev/null +++ b/dump.go @@ -0,0 +1,140 @@ +package lua + +import ( + "encoding/binary" + "fmt" + "io" +) + +type dumpState struct { + l *State + out io.Writer + order binary.ByteOrder + err error +} + +func (d *dumpState) write(data ...
9
9
7
[{"id": "G0", "claim": "The call to `endianness()` in `dumpHeader` can be replaced with `d.order`.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "There is unnecessary whitespace above `dumpFunction`; the file probably needs `gofmt`.", "category"...
null
Shopify__go-lua__85
Shopify/go-lua
85
defect
41298fdffdd31c4bf291f0a98cd45cf024200495
208c28cc224b7f8f715dede4d8138f009aea342d
Fix concurrent iteration
Fixes #81 r: @nilium
diff --git a/tables.go b/tables.go index df10cfb..e7eb826 100644 --- a/tables.go +++ b/tables.go @@ -79,6 +79,13 @@ func (t *table) maybeResizeArray(key int) bool { return false } +func (t *table) addOrInsertInMap(k, v value) { + if _, ok := t.hash[k]; !ok { + t.iterationKeys = nil // invalidate iterations when a...
2
2
1
[{"id": "G0", "claim": "Rename the new helper addOrInsertInMap to addOrInsertHash so its naming matches the surrounding language of delete(t.hash...).", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Deleting a key from t.hash does not remove it f...
null
Shopify__goluago__6
Shopify/goluago
6
defect
895707d4fa36b441bd3a8a526f79146a3ab3466d
fcfc65dcfbef4c1a3210c71ad9e284214ad659c5
Add `url.URL`, some `fmt` for debugging, `DumpStack` for debugging.
Add `url.URL`, required for gonan. Add `fmt` to help debugging from `lua` (lets use the `%v`-class of format args) and `DumpStack` to help print the lua stack, avoiding to rewrite it all the time. r: @fbogsany @snormore , @mkobetic, @benbjohnson cc: @Shopify/webscale
diff --git a/fmt/fmt.go b/fmt/fmt.go new file mode 100644 index 0000000..d4c0233 --- /dev/null +++ b/fmt/fmt.go @@ -0,0 +1,66 @@ +package fmt + +import ( + "fmt" + "github.com/Shopify/go-lua" + "github.com/Shopify/goluago/util" +) + +func Open(l *lua.State) { + fmtOpen := func(l *lua.State) int { + lua.NewLibrary(l, f...
9
6
1
[{"id": "G0", "claim": "Questions why the error-check block that pFamily performs is not necessary in the s-family wrappers, which return strings with no error.", "category": "correctness", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The pull request is missing comments around...
null
Shopify__graphql-js-client__119
Shopify/graphql-js-client
119
defect
8bf284cc08ecb61e36020bd8e6a059cc687f8a17
05143e54af15958af0bf8a565a4400dcca421fa2
Add basic handling for non JSON responses
This PR addresses https://github.com/Shopify/graphql-js-client/issues/107 (Sorry for the delay). As mentioned in the issue, the `403 Forbidden` response from the Shopify API has a `text/html` Content Type. This results in a Syntax Error. This PR adds some support for non `application/json` content types by treati...
diff --git a/src/http-fetcher.js b/src/http-fetcher.js index 7a15de0..78b6fe8 100644 --- a/src/http-fetcher.js +++ b/src/http-fetcher.js @@ -11,6 +11,21 @@ export default function httpFetcher(url, options = {}) { ...options.headers, ...headers } - }).then((response) => response.json()); + ...
4
4
1
[{"id": "G0", "claim": "Remove the extra blank line between the `_handleResponse` and `_handleTextResponse` functions in src/http-fetcher.js.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Remove the extra blank line after `return fetcher(reques...
null
Shopify__graphql-js-client__121
Shopify/graphql-js-client
121
defect
ac6da431ef189f3e04ccd72582b9e1fd0ba6e98f
f93a7d29c64260395262ab36d5b4e5b2da92030c
Updated interface support
Adds support for falling back when interface objects can't be translated. Relates to https://github.com/Shopify/js-buy-sdk/issues/614 I'm trying to fix the situation in the linked issue, which is outlined below: - The GraphQL schema has an interface type (`DiscountApplication`) - There is a new implementation typ...
diff --git a/schema.json b/schema.json index 84055ef..c127eda 100644 --- a/schema.json +++ b/schema.json @@ -25,6 +25,22 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "discountApplication", + "descri...
2
2
0
[{"id": "G0", "claim": "The context.selection.selectionSet reference in recordTypeInformation could be destructured into typeBundle and typeSchema constants so they can be used directly.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new tes...
null
Shopify__graphql-js-client__56
Shopify/graphql-js-client
56
defect
eed1af1866a288a1479b45ee1b1d2563f601b24f
6b7ecb0fa7ab4b3b5bfc36b862dfae13066769cc
[FEATURE] Add support for fragment definitions and spreads
This adds support to graphql `Document`s for containing `FragmentDefinition`s, as well as support to `SelectionSet`s for holding `FragmentSpread`s. This change also adds support for sending and decoding documents to client, as well as decoding queries that contain fragment spreads
diff --git a/src/client.js b/src/client.js index 2f61b1e..0481287 100644 --- a/src/client.js +++ b/src/client.js @@ -37,8 +37,8 @@ export default class Client { return new Query(this.typeBundle, ...args); } - send(query, variableValues = null, otherProperties = null) { - const graphQLParams = {query: quer...
3
1
0
[{"id": "G0", "claim": "Consider adding validation when creating a fragment definition so that fragments are only allowed on object types, interfaces and unions and never on input values.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Differentiate the n...
null
Shopify__graphql-js-client__57
Shopify/graphql-js-client
57
defect
1013bf90b145608ab31f74c21833e66e2800b3fe
a1c09c50dd45a90c3dc7e655cae292e4238a3a5a
[FEATURE] `fetchNextPage` from a list of models
Instead of forcing people to use `nextPageQuery` and then figuring out what the resultant object graph looked like, expose a client function called `fetchNextPage` that takes a model or list of models and does the object graph navigation for you resolving with a `response.model` that represents the next page of the set...
diff --git a/README.md b/README.md index c6634bd..01a4bde 100644 --- a/README.md +++ b/README.md @@ -43,16 +43,18 @@ client.send(client.query((root) => { product.add('title'); }); }); -}).then((shopModel) => { - console.log(shopModel); +}).then((response) => { + console.log(response.model); - if (sh...
7
6
2
[{"id": "G0", "claim": "In the README example, pushing the first-page products should happen outside the `hasNextPage` conditional, since it is still the first page results.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "In `addNextFieldTo`, the pat...
null
Shopify__graphql-js-client__68
Shopify/graphql-js-client
68
defect
d2b81745c746f585d0b7cc2a79d0d88f45e1727c
e60eacfb2ad370e450e6d68ab693d905da36ddc5
[FIX] Add null checks
We want to avoid wrapping `null` in Scalars or Enums. This PR adds null/undefined checking so that `null` values remain simply as `null`.
diff --git a/src/decode.js b/src/decode.js index 5e31f9b..bb00ccc 100644 --- a/src/decode.js +++ b/src/decode.js @@ -113,10 +113,12 @@ function transformScalars(context, value) { } function recordTypeInformation(context, value) { - if (value.__typename) { - value.type = schemaForType(context.selection.selection...
3
3
1
[{"id": "G0", "claim": "The inline null check in recordTypeInformation should be pulled out into a predicate called `isValue` that checks for null and undefined.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The null-fallback added to Enum/Scalar valueO...
null
Shopify__graphql-js-client__90
Shopify/graphql-js-client
90
defect
dd78e15e31583b53c68479e887bb6ab900bd9bbe
7beb6aebeb80213944d496ded3d041ba263cae34
set GraphModel properties to be enumerable
this fixes the ability to use stuff like `Object.assign({}, graph-model-object)` properly, as Object.assign only works on properties which are enumerable. They are not set as enumerable by default when using `Object.defineProperty`.
diff --git a/src/graph-model.js b/src/graph-model.js index 039f65e..80042c4 100644 --- a/src/graph-model.js +++ b/src/graph-model.js @@ -19,12 +19,14 @@ export default class GraphModel { if (attrs[key] === null) { descriptor = { + enumerable: true, get() { return null;...
2
2
0
[{"id": "G0", "claim": "It may be a good idea to make `attrs` non-enumerable, so there aren't two sources of data and attrs is more hidden.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G2", "claim": "Remove the blank line at the start of the 'it creates an object wit...
null
Shopify__hydrogen-v1__1049
Shopify/hydrogen-v1
1,049
defect
5268bf85f61f8abf0e97788b7ae925ad4f3183b2
b7d16e8b3f86a7a902bbf8c7b4a7d38c79130717
Support sub request cache control header `stale-while-revalidate` everywhere
Fix: https://github.com/Shopify/custom-storefronts/issues/175 ### Description This is a workaround for supporting `stale-while-revalidate` cache control ~~on Cloudflare~~ everywhere ### How to test _on Cloudflare_ You must have: * A Cloudflare domain (cannot be the `worker.dev` that Cloudflare gives you)...
diff --git a/.changeset/great-apes-fry.md b/.changeset/great-apes-fry.md new file mode 100644 index 0000000000..12ccea495b --- /dev/null +++ b/.changeset/great-apes-fry.md @@ -0,0 +1,5 @@ +--- +'@shopify/hydrogen': patch +--- + +Workaround support stale-while-revalidate for Cloudflare Cache API diff --git a/packages/hy...
4
3
2
[{"id": "G0", "claim": "The cache entry should not rely on storing max-age in a `shopify-cf-max-age` response header, since the original cacheOptions is (or can be) available where staleness is checked.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The ...
null
Shopify__hydrogen-v1__1161
Shopify/hydrogen-v1
1,161
defect
f461d277186fdb24ec46538dcdd7e8ab680e06d9
cff27b3d536eba62422cbd761500a5e953ce4723
Adds ability to add more than one cookie per response
### Description This is necessary because the only way to set multiple cookies reliably from node is by writing a header like this: ``` {'set-cookie': ['foo=bar', 'bar=baz']} ``` We need to use `headers.raw()` which is currently provided by `node-fetch`, so that we can access the unserialized array and set it ...
diff --git a/.changeset/fuzzy-jeans-tickle.md b/.changeset/fuzzy-jeans-tickle.md new file mode 100644 index 0000000000..3925411c4a --- /dev/null +++ b/.changeset/fuzzy-jeans-tickle.md @@ -0,0 +1,5 @@ +--- +'@shopify/hydrogen': patch +--- + +Adds ability to add multiple cookies in one response diff --git a/packages/hydr...
2
1
0
[{"id": "G0", "claim": "The `if (!headers)` guard in getHeaders is dead code, since `headers` is created from `new Headers()` on the line above and is always defined.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "jplhomer asks whether the multi...
null
Shopify__hydrogen-v1__1216
Shopify/hydrogen-v1
1,216
defect
3c777a509ad907be4afb1e50d80c58098302c57c
bcdd74c8e45d5a17bc3aa560f8af719cd4a9ac72
`cache-control` and `stale-while-revalidate` fixes
### Description Get cache to store full page response This PR contains a couple fixes: * Sub queries was not revalidating properly --- ### Before submitting the PR, please make sure you do the following: - [ ] Read the [Contributing Guidelines](https://github.com/shopify/hydrogen/blob/main/docs/contri...
diff --git a/.changeset/four-bags-judge.md b/.changeset/four-bags-judge.md new file mode 100644 index 0000000000..1d3778e86e --- /dev/null +++ b/.changeset/four-bags-judge.md @@ -0,0 +1,10 @@ +--- +'@shopify/hydrogen': minor +--- + +Fixes: + +- Sub queries was not revalidating properly +- Unable to change cache-control...
9
7
3
[{"id": "G0", "claim": "The documentation at docs/framework/cache.md#full-page-caching may need updates to cover this change's behaviour.", "category": "documentation", "verdict": "opposed", "priority": "P3", "scope": "pre_existing"}, {"id": "G1", "claim": "The RSC hydrate path no longer writes any value for cache-cont...
null
Shopify__hydrogen-v1__1272
Shopify/hydrogen-v1
1,272
defect
db5e634f6635ea28a86ffb9df3051b5bb53a7cbf
e1d28e2228f1de5b7e76488c9bbe378e2f34dd20
Remove flight chunk
<!-- Thank you for contributing! --> ### Description <!-- Insert your description here and provide info about what issue this PR is solving --> ### Additional context <!-- e.g. is there anything you'd like reviewers to focus on? --> --- ### Before submitting the PR, please make sure you do the followi...
diff --git a/packages/hydrogen/src/entry-server.tsx b/packages/hydrogen/src/entry-server.tsx index 75cb33e4c5..b17cb53ecb 100644 --- a/packages/hydrogen/src/entry-server.tsx +++ b/packages/hydrogen/src/entry-server.tsx @@ -873,11 +873,7 @@ function flightContainer({ } if (chunk) { - const normalizedChunk = c...
1
1
1
[{"id": "G0", "claim": "The flight chunk should be emitted with `__flight.push(${JSON.stringify(decoder.decode(chunk))})` using `TextEncoder`/`TextDecoder` rather than wrapping an `encodeURIComponent`-escaped chunk in backticks, since `encodeURIComponent` is meant for browser URIs.", "category": "correctness", "verdict...
null
Shopify__hydrogen-v1__1346
Shopify/hydrogen-v1
1,346
defect
217b5f23613da794bb6879ab0c897b66ef6204cf
a6dcbec74468e8986431ab2d640a514b43d63d35
Adds event handlers to Buttons and allows ref passing
### Description Issue: https://github.com/Shopify/hydrogen/issues/717 ### Additional context We decided to keep `onClick` handlers as primitive as possible for now. Also adding the possibility of using `buttonRef` for the use case in the issue. @jplhomer made an example of how to use refs + onClick handlers to...
diff --git a/packages/hydrogen/src/components/AddToCartButton/AddToCartButton.client.tsx b/packages/hydrogen/src/components/AddToCartButton/AddToCartButton.client.tsx index c8d47e69d0..84a767e83c 100644 --- a/packages/hydrogen/src/components/AddToCartButton/AddToCartButton.client.tsx +++ b/packages/hydrogen/src/compone...
6
6
4
[{"id": "G0", "claim": "The onClick prop should be typed with the real React synthetic event type (React.MouseEvent<HTMLButtonElement, MouseEvent>) instead of the DOM MouseEvent it was declared with.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Be...
null
Shopify__hydrogen-v1__1431
Shopify/hydrogen-v1
1,431
defect
891b947c5683b18566a561c747624edf4f4530b3
1f76e932d0d64f5cf0cae23b22fe52c2d6261869
Allow scroll restoration to be disabled
<!-- Thank you for contributing! --> ### Description Fixes #1370 RE #1139 #1152 #810 etc A common pattern Hydrogen developers face is to need to update the current page URL for e.g. a search or filter, but keep the current scroll position. Since we added scroll restoration to Hydrogen, this became very diffi...
diff --git a/.changeset/cool-spies-study.md b/.changeset/cool-spies-study.md new file mode 100644 index 0000000000..21cb0563f0 --- /dev/null +++ b/.changeset/cool-spies-study.md @@ -0,0 +1,25 @@ +--- +'@shopify/hydrogen': minor +--- + +Add `restoreScroll` prop to `Link` and `navigate` to allow the scroll restoration be...
6
4
0
[{"id": "G0", "claim": "The PR might also add a `shallow` option to `useNavigate` letting devs add things like `variantId` to the URL without fetching RSC.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The new prop should be named `scroll` (as in Next...
null
Shopify__hydrogen-v1__1471
Shopify/hydrogen-v1
1,471
defect
356e75f351c04ff393e996c34632005331ec0872
d26f0258c3672cc542334a2b2fcb983dd6c82515
Add experimental `useRequestContext`
<!-- Thank you for contributing! --> ### Description Closes #1429 This adds a small wrapper around `useServerRequest` / `useEnvContext` to provide a public (and experimental) API for 3p integrations. It also exposes `HydrogenRequest` and `HydrogenResponse` types. ### Additional context <!-- e.g. is th...
diff --git a/.changeset/warm-tips-refuse.md b/.changeset/warm-tips-refuse.md new file mode 100644 index 0000000000..f83be78083 --- /dev/null +++ b/.changeset/warm-tips-refuse.md @@ -0,0 +1,5 @@ +--- +'@shopify/hydrogen': patch +--- + +Added an experimental hook `useRequestContext` that provides server-only context for ...
5
3
0
[{"id": "G0", "claim": "The Considerations bullet should say the hook is only available when running on the server in server components or client components during server-side rendering (SSR), and that the hook is never shared in the browser.", "category": "documentation", "verdict": "supported", "priority": "P2", "sco...
null
Shopify__hydrogen-v1__1489
Shopify/hydrogen-v1
1,489
defect
5b82d235a30830df96ea524fc314397c2dadb982
6d15a41334a752ef6093887d096f63c392e3a01f
Turn preloading on by default for cached requests
Turn preloading on by default when a page has an enabled caching strategy. Turn it off by default when a page has the NoStore strategy. Resolves https://github.com/Shopify/hydrogen/issues/1477 ### Before submitting the PR, please make sure you do the following: - [X] Read the [Contributing Guidelines](https://...
diff --git a/.changeset/metal-paws-shout.md b/.changeset/metal-paws-shout.md new file mode 100644 index 0000000000..320fd338fa --- /dev/null +++ b/.changeset/metal-paws-shout.md @@ -0,0 +1,5 @@ +--- +'@shopify/hydrogen': minor +--- + +In an effort to be performant by default, the [preloaded queries](https://shopify.dev...
5
4
0
[{"id": "G0", "claim": "The reference topics for the `preload` prop (localizationprovider.md, fetchsync.md, useshopquery.md, usequery.md) should be updated because the prop now defaults to `true` instead of `false`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": ...
null
Shopify__hydrogen-v1__1551
Shopify/hydrogen-v1
1,551
defect
4d03e0bd24b8b1fc26dc7527ecc0f61b7788308f
fea85f12ca6dadb2dc9120091b24e3b8b4156f39
Enable In-Memory Caching by default in Node.js runtimes
<!-- Thank you for contributing! --> ### Description Fixes #977 Adds in-memory caching by default for Node.js runtimes. This also updates the InMemory cache to be more compliant with the spec. It also adds tests. ### Additional context The in-memory implementation we provide only supports the `cache-con...
diff --git a/.changeset/pretty-experts-complain.md b/.changeset/pretty-experts-complain.md new file mode 100644 index 0000000000..709a6d2fba --- /dev/null +++ b/.changeset/pretty-experts-complain.md @@ -0,0 +1,5 @@ +--- +'@shopify/hydrogen': patch +--- + +In-Memory caching is now enabled by default in production for No...
4
4
0
[{"id": "G0", "claim": "The default InMemoryCache should not be created when a cache was provided; it would be better as a default value of the `cache` parameter, which would also allow disabling caching with a `null` value.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id"...
null
Shopify__hydrogen-v1__1570
Shopify/hydrogen-v1
1,570
defect
0fe5793d17558f00730bb65c7e3a14b7304f8f39
bbd0cdc1f736ca8cada3cda3816e3900bbd16d73
Image width height
<!-- Thank you for contributing! --> ### Description Fixes #1351, updates docs, and adds tests. --- ### Before submitting the PR, please make sure you do the following: - [x] Read the [Contributing Guidelines](https://github.com/shopify/hydrogen/blob/main/.github/contributing.md) - [x] Provide a descri...
diff --git a/.changeset/chilled-cows-itch.md b/.changeset/chilled-cows-itch.md new file mode 100644 index 0000000000..e67879d094 --- /dev/null +++ b/.changeset/chilled-cows-itch.md @@ -0,0 +1,11 @@ +--- +'@shopify/hydrogen': minor +--- + +`<Image/>` now takes into account a specific order for determining the width and ...
6
6
1
[{"id": "G0", "claim": "A test case should be added validating the last scenario where the aspect ratio cannot be determined and the missing value remains as null.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The sentence 'Width and height are determi...
null
Shopify__hydrogen-v1__1614
Shopify/hydrogen-v1
1,614
defect
c45ebd3cf468c9f596ef399712506bd766dea54d
bffb15267c903a9d4af2889c178b0a945573e634
Making the E2E tests more resilient to changes
This should hopefully let people change the names of the store, collections, and products without our e2e tests failing suddenly.
diff --git a/packages/playground/server-components/src/routes/api-queryshop.server.js b/packages/playground/server-components/src/routes/api-queryshop.server.js index ce94f8c68b..69c78e29c8 100644 --- a/packages/playground/server-components/src/routes/api-queryshop.server.js +++ b/packages/playground/server-components/...
1
1
0
[{"id": "G0", "claim": "The equivalent data-test-id changes to ProductDetails should probably also be made in the demo-store-neue template, since it is slated to replace demo-store at GA.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}]
null
Shopify__hydrogen-v1__1680
Shopify/hydrogen-v1
1,680
defect
ecab4122de6d1dec8f53759e56c90ef85ca38f5e
b04b7e17c6b356da23099eec1ecb3fb4f0cdb979
Fix basepath to not apply to fully qualified URLs
### Description If within a `<FileRoutes basPath="/ca" />` component there is a `<Link to='http://somewebsite.com'>`, without this change, the base path would still get prepended and the link would be `/ca/http://somewebsite.com`. This fixes that and adds some tests. ### Additional context ### Before submi...
diff --git a/.changeset/stupid-jokes-taste.md b/.changeset/stupid-jokes-taste.md new file mode 100644 index 0000000000..f71d17078f --- /dev/null +++ b/.changeset/stupid-jokes-taste.md @@ -0,0 +1,5 @@ +--- +'@shopify/hydrogen': patch +--- + +Fix basepath to not apply to fully qualified URLs. diff --git a/packages/hydrog...
1
1
0
[{"id": "G0", "claim": "Maybe detect external URLs by looking for a leading '//' instead of 'http', so protocol-relative links like <a href=\"//example.com\"> are also left unmodified by buildPath.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
Shopify__hydrogen-v1__172
Shopify/hydrogen-v1
172
defect
2e1bc02e6ab92da385c02b6f0ac5252b012663ec
3fdcf6815b6f287c9f48091bb68c4507026b4e74
Implement server redirects
<!-- Thank you for contributing! --> ### Description Attempt to implement #89 (server redirects) and explore different strategies. As an initial proposal, this implements a `response.redirect` method to call from server components (and a more flexible `response.writeHead`). ### Additional context Redirects...
diff --git a/packages/hydrogen/src/entry-client.tsx b/packages/hydrogen/src/entry-client.tsx index 8e5b97b059..35ab610be3 100644 --- a/packages/hydrogen/src/entry-client.tsx +++ b/packages/hydrogen/src/entry-client.tsx @@ -1,7 +1,7 @@ import React, {Suspense, useState} from 'react'; // @ts-ignore import {createRoot}...
5
4
3
[{"id": "G0", "claim": "The SPA redirect path (custom Cache.client / RSC-hydration handling) rests on a scenario that will not happen and on bespoke server-component code that will be removed, so it should be dropped and only SSR synchronous redirects shipped for now.", "category": "design", "verdict": "supported", "pr...
null