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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Shopify__hydrogen-v1__1723 | Shopify/hydrogen-v1 | 1,723 | defect | 4e6356e67bf92ff621573eac36fe34f37a1c326c | 1bc6f03b278e84f7c09cbf4d827056d485be5f48 | Image component updates | <!-- Thank you for contributing! -->
### Description
Turns out there was a miscommunication with the Media team on how they handle `scale`, so we need to revert some of the work we did to apply it.
In the process, we also wanted to improve how we create `srcset` and also how we handle width as a string. The t... | diff --git a/packages/hydrogen/src/components/Image/Image.tsx b/packages/hydrogen/src/components/Image/Image.tsx
index 38f191414e..0a73aa42f3 100644
--- a/packages/hydrogen/src/components/Image/Image.tsx
+++ b/packages/hydrogen/src/components/Image/Image.tsx
@@ -107,16 +107,17 @@ function ShopifyImage({
);
}
... | 3 | 2 | 2 | [{"id": "G0", "claim": "The srcset height should be computed from the explicitly set width and height props first (falling back to data.width / data.height, and returning null when height or crop data is absent), and the resulting height should be multiplied by the scale.", "category": "correctness", "verdict": "suppor... | null |
Shopify__hydrogen-v1__1760 | Shopify/hydrogen-v1 | 1,760 | defect | dea5f30ce3b169812838e7db862f70688b957594 | 7df2be529356039699648b54a42759fa4cb44a27 | Fix `fetchSync` payload and cache | <!-- Thank you for contributing! -->
### Description
Closes #1743
The payload returned by `fetchSync` was incorrectly moving the Response data to a property. After this PR, things like `status` or `headers` will be available at the top level. The property `response` is still available but marked as deprecated ... | diff --git a/.changeset/hot-drinks-juggle.md b/.changeset/hot-drinks-juggle.md
new file mode 100644
index 0000000000..5f4c07a6e7
--- /dev/null
+++ b/.changeset/hot-drinks-juggle.md
@@ -0,0 +1,14 @@
+---
+'@shopify/hydrogen': patch
+---
+
+The payload returned by `fetchSync` was supposed to mimic `react-fetch` but it wr... | 2 | 1 | 0 | [{"id": "G0", "claim": "json() parses this.#text without a try/catch, and the reviewer asks whether invalid JSON throwing an error on parse there is a concern that needs handling.", "category": "correctness", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add the text from the de... | null |
Shopify__hydrogen-v1__1836 | Shopify/hydrogen-v1 | 1,836 | defect | 410accd826bb8f9f3665e7b96a19f0710bdaa570 | dc6a725637e885321adcbbcb69f42c54a426e02b | New locale logic | https://github.com/Shopify/hydrogen/issues/1835
### Description
Locale will now work with languages with regions
`PT_PT`, `PT_BR`, etc.
### Additional context
Consulted with `i18n` team about this. Only concern could be that this might be confusing how locale gets calculated.
My conclusion is that locale's a... | diff --git a/.changeset/funny-items-travel.md b/.changeset/funny-items-travel.md
new file mode 100644
index 0000000000..9e2f105838
--- /dev/null
+++ b/.changeset/funny-items-travel.md
@@ -0,0 +1,9 @@
+---
+'@shopify/hydrogen': patch
+---
+
+`locale` calculation logic and docs have been updated to support Shopify langua... | 13 | 12 | 1 | [{"id": "G0", "claim": "The `Locale` type should use TypeScript intrinsic string manipulation so that a language like `PT_BR` becomes `PT-BR` when merged with the country code, since `${language}-${countryCode}` does not work for such languages.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope":... | null |
Shopify__hydrogen-v1__1847 | Shopify/hydrogen-v1 | 1,847 | defect | 137142b56aaf5535f0c8b6fc81feacbb734e0017 | b738aa21963f57bcb968f90cca2e10e2cf563419 | Add Vitest and a gradual migration path |
### Description
Begins work on #670 , and with the context of [my comment here](https://github.com/Shopify/hydrogen/issues/670#issuecomment-1172452090) provides us a way to gradually migrate our tests from Jest to Vitest without having to do it in one massive PR.
The way we'll do it is by writing Vitest test... | diff --git a/.changeset/wise-masks-shop.md b/.changeset/wise-masks-shop.md
new file mode 100644
index 0000000000..d0799e8308
--- /dev/null
+++ b/.changeset/wise-masks-shop.md
@@ -0,0 +1,5 @@
+---
+'@shopify/hydrogen': patch
+---
+
+Allow `sourceProps` to be passed to `<Video/>`'s underlying `<source>` elements.
diff --... | 5 | 1 | 0 | [{"id": "G0", "claim": "The testid design should be settled: pass `data-testid` as a prop in tests only instead of always having the attribute on the component's DOM element, as previously done in hydrogen-ui.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim"... | null |
Shopify__hydrogen-v1__1867 | Shopify/hydrogen-v1 | 1,867 | defect | f0a7e71a111270425b7da7d8e6434a34e2b4a2b2 | 450b22e8aa96bfa1351fc3db8438b6a5702b769d | Add custom 500 error pages | <!-- Thank you for contributing! -->
### Description
Add support for custom 500 error pages. If an unexpected error occurs while rendering a route, Hydrogen will respond with a 500 HTTP error and render a default error page. Define a custom error page with the `serverErrorPage` configuration property:
```tsx
... | diff --git a/.changeset/thin-pigs-mate.md b/.changeset/thin-pigs-mate.md
new file mode 100644
index 0000000000..5bf5d92fb5
--- /dev/null
+++ b/.changeset/thin-pigs-mate.md
@@ -0,0 +1,17 @@
+---
+'@shopify/hydrogen': minor
+---
+
+Add support for custom 500 error pages. If an unexpected error occurs while rendering a ro... | 3 | 2 | 1 | [{"id": "G0", "claim": "The error page file should drop the `.client.` suffix since it is not a client boundary.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The path to the error page file should be configurable in `hydrogen.config.js`, like `routes` ... | null |
Shopify__hydrogen-v1__1870 | Shopify/hydrogen-v1 | 1,870 | defect | 776ce755a511bc9951a6932f714b9e7db07d93d9 | b1ba7180777314331cebafdc0dcc571be9c14042 | Adds ability to load 3rd party scripts in the <head /> or the <body /> | <!-- Thank you for contributing! -->
### Description
Add an additional `in?` prop to both `loadScript` and `useLoadScript` to allow for scripts to be injected in the `<head />` or the `<body />` (which is still the default option).
### Additional context
While helping a merchant to integrate [Judge.me](https:... | diff --git a/.changeset/small-vans-switch.md b/.changeset/small-vans-switch.md
new file mode 100644
index 0000000000..40f58d25d4
--- /dev/null
+++ b/.changeset/small-vans-switch.md
@@ -0,0 +1,5 @@
+---
+'@shopify/hydrogen': minor
+---
+
+`loadScript` and `useLoadScript` can now inject in the <head />
diff --git a/docs/... | 1 | 1 | 1 | [{"id": "G0", "claim": "An e2e test should be added to verify these third-party scripts are loaded properly.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
Shopify__hydrogen-v1__1878 | Shopify/hydrogen-v1 | 1,878 | defect | 481f6f2fe67452463088a062b55546dc5ebbfa32 | 58d1cdd55fe0ea2adb0d586b8640ae20cc2c5d79 | Add flash session data | <!-- Thank you for contributing! -->
### Description
Add the experimental `useFlashSession` hook. This hook reads and clears a session value. It is useful for request validation within the experimental `<Form>` component:
```ts
import {Form, useFlashSession} from '@shopify/hydrogen/experimental';
export de... | diff --git a/.changeset/sweet-pugs-enjoy.md b/.changeset/sweet-pugs-enjoy.md
new file mode 100644
index 0000000000..c0aa669e7d
--- /dev/null
+++ b/.changeset/sweet-pugs-enjoy.md
@@ -0,0 +1,40 @@
+---
+'@shopify/hydrogen': minor
+---
+
+Add the experimental `useFlashSession` hook. This hook reads and clears a session va... | 4 | 3 | 1 | [{"id": "G4", "claim": "The changeset example defines `export async function api(request)` without the `{session}` argument but the example body calls `session.set`, so the example as shown would not work.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G5", "claim... | null |
Shopify__hydrogen-v1__1899 | Shopify/hydrogen-v1 | 1,899 | defect | 35d087aeb69287535e36d0b80e96de56db2ce849 | ef867217fc8537c01b87e140309fdf2eee2cd22e | Migrate tests for AddToCart button to Vite |
<!-- Thank you for contributing! -->
### Description
In replacing the old providers, this is one way of doing it now with RTL. Not sure if this is better or not, but it does seem more clear to me?
Part of #670
### Additional context
<!-- e.g. is there anything you'd like reviewers to focus on? -->
... | diff --git a/packages/hydrogen/package.json b/packages/hydrogen/package.json
index ac87dc8822..50020001c1 100644
--- a/packages/hydrogen/package.json
+++ b/packages/hydrogen/package.json
@@ -91,6 +91,7 @@
"@rollup/plugin-graphql": "^1.0.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react"... | 1 | 1 | 0 | [{"id": "G0", "claim": "The disabled-button tests could use the `toBeDisabled` assertion instead of asserting `toHaveAttribute('disabled', '')`.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Shopify__hydrogen-v1__1905 | Shopify/hydrogen-v1 | 1,905 | defect | 15e01b6eb1e63190bb13256e5965cee10ae6083c | f615ec8c2bf9915b2c35327896c87b8d2b0b2655 | BaseButton migration to Vitest | <!-- Thank you for contributing! -->
### Description
<!-- Insert your description here and provide info about what issue this PR is solving -->
Part of #670
Following the config setup I did in #1899, if you have questions about that.
### Additional context
<!-- e.g. is there anything you'd like revi... | diff --git a/packages/hydrogen/src/components/BaseButton/tests/BaseButton.test.tsx b/packages/hydrogen/src/components/BaseButton/tests/BaseButton.test.tsx
deleted file mode 100644
index 58bb8f8317..0000000000
--- a/packages/hydrogen/src/components/BaseButton/tests/BaseButton.test.tsx
+++ /dev/null
@@ -1,97 +0,0 @@
-imp... | 2 | 2 | 0 | [{"id": "G0", "claim": "The 'renders a button' test could use the `toHaveTextContent` matcher instead of asserting on `.textContent` with `toBe`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The 'allows passthrough props' test could use the mo... | null |
Shopify__hydrogen-v1__1915 | Shopify/hydrogen-v1 | 1,915 | defect | dc0fd51b902c3509fd6a6e1b05692a349a9329dd | 3b53e582e9879d41c34038cab01b31af32de7272 | Migrate BuyNow and CartCheckout buttons to Vitest | <!-- Thank you for contributing! -->
### Description
<!-- Insert your description here and provide info about what issue this PR is solving -->
Part of #670
### Additional context
<!-- e.g. is there anything you'd like reviewers to focus on? -->
---
### Before submitting the PR, please make sure y... | diff --git a/packages/hydrogen/src/components/BuyNowButton/tests/BuyNowButton.test.tsx b/packages/hydrogen/src/components/BuyNowButton/tests/BuyNowButton.test.tsx
deleted file mode 100644
index bb81fd1197..0000000000
--- a/packages/hydrogen/src/components/BuyNowButton/tests/BuyNowButton.test.tsx
+++ /dev/null
@@ -1,173... | 1 | 1 | 0 | [{"id": "G0", "claim": "The afterEach hook calling vi.clearAllMocks() in BuyNowButton.vitest.tsx may be unnecessary because Vitest now resets mocks automatically after each test.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Shopify__hydrogen-v1__1992 | Shopify/hydrogen-v1 | 1,992 | defect | c12ce26d882c45d0a7d96f5793fe9854c0fbc382 | 532faebeeff4addf4db959f8ffba0ba0124413e8 | Vite 3 compatibility | <!-- Thank you for contributing! -->
### Description
This PR adds support for Vite 3, but keeps the default version as Vite 2 to avoid breaking changes.
We keep our test suites using only with Vite 2, so support for Vite 3 could potentially break.
### Additional context
Some Vite internals have changed, an... | diff --git a/.changeset/few-bats-teach.md b/.changeset/few-bats-teach.md
new file mode 100644
index 0000000000..83e996b42b
--- /dev/null
+++ b/.changeset/few-bats-teach.md
@@ -0,0 +1,5 @@
+---
+'@shopify/hydrogen': patch
+---
+
+Added experimental support for Vite 3. By default, Hydrogen will still use Vite 2. However,... | 1 | 1 | 0 | [{"id": "G0", "claim": "The vendor react-server-dom-vite package's peerDependencies still including React 17 (`^17.0.0`) alongside the newly added `^18.0.0` may no longer make sense, and the React 17 range should probably be removed.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "pre_existi... | null |
Shopify__hydrogen-v1__2018 | Shopify/hydrogen-v1 | 2,018 | defect | 4babc16db4d456ecb2834c87357060f15d62eafa | cd1d3136be0bfd5d242456830d30cc645d4ca485 | Migrate ShopProvider to hydrogen-ui | This PR has it all!
- The first true migration of a component to hydrogen-ui
- Tests
- Vastly improved TS documentation for each property in the shopify config
- Merge of LocalizationProvider and ShopifyProvider
- A ladle story with controls
<img width="423" alt="Screen Shot 2022-08-19 at 4 09 32 PM" src="htt... | diff --git a/packages/hydrogen-ui/src/ExternalVideo.stories.tsx b/packages/hydrogen-ui/src/ExternalVideo.stories.tsx
index 7cc9f69a13..ccc8c98bb8 100644
--- a/packages/hydrogen-ui/src/ExternalVideo.stories.tsx
+++ b/packages/hydrogen-ui/src/ExternalVideo.stories.tsx
@@ -1,6 +1,6 @@
+import * as React from 'react';
imp... | 17 | 2 | 0 | [{"id": "G0", "claim": "The test asserting the prefixed domain is absent should use `not.toBeInTheDocument` instead of the `toBeNull` assertion, as testing-library recommends, to be more explicit.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The expli... | null |
Shopify__hydrogen-v1__208 | Shopify/hydrogen-v1 | 208 | defect | 69576610c4ee344870d85bed970840b75c4b5e2b | baafa3d87b2e6605dfc11de0c35b30f73842cd80 | Add support for file reference metafield | <!-- Thank you for contributing! -->
### Description
This PR adds support for the [file reference type metafield ](https://shopify.dev/apps/metafields/definitions/types).
Note that this PR specifically only adds support for the _MediaImage_ file reference type. When adding a `file_reference` type metafield, yo... | diff --git a/packages/dev/shopify.config.js b/packages/dev/shopify.config.js
index 3e7b1afc51..bca2a44340 100644
--- a/packages/dev/shopify.config.js
+++ b/packages/dev/shopify.config.js
@@ -1,6 +1,6 @@
export default {
locale: 'en-us',
- storeDomain: 'hydrogen-preview.myshopify.com',
- storefrontToken: '3b580e70... | 3 | 2 | 1 | [{"id": "G0", "claim": "The demo-only Product.Metafield block added to the dev app's ProductDetails component should be removed before shipping.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "MetafieldFragment.graphql should end with a newline (... | null |
Shopify__hydrogen-v1__2138 | Shopify/hydrogen-v1 | 2,138 | defect | cd8f8e88f776f2cd5d617803f118e7b00d80561a | d9c0003f11e1c8c643701e86d12f248a1b273735 | [CartProviderV2] Handle `countryCode` and `customerAccessTokens` props | Part of: https://github.com/Shopify/hydrogen/issues/1947
Solves the looping that happens in: https://github.com/Shopify/hydrogen/issues/1677
### Description
This PR copies over the handling of country changes plus fixed the issue when country cannot be changed because of a customer account.
Vitest were added.
... | diff --git a/packages/hydrogen/src/components/CartProvider/CartActions.client.tsx b/packages/hydrogen/src/components/CartProvider/CartActions.client.tsx
index a1af323b12..5fe08b840d 100644
--- a/packages/hydrogen/src/components/CartProvider/CartActions.client.tsx
+++ b/packages/hydrogen/src/components/CartProvider/Cart... | 3 | 2 | 1 | [{"id": "G0", "claim": "The `countryCode` hardcoded into the CART test fixture seems to break the tests and needs updating.", "category": "testing", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The `customerOverridesCountryCode` reset should not live in a `useEffect`; drop th... | null |
Shopify__hydrogen-v1__2234 | Shopify/hydrogen-v1 | 2,234 | defect | 4838a953c30e2925ef830074e943126a7c7728a5 | ff5cb5062c2f645768313234fca5ffe7758fd39b | fix(2233): added faker dep | <!-- Thank you for contributing! -->
### Description
[Original Issue](https://github.com/Shopify/hydrogen/issues/2233)
As of Hydrogen 1.5.0 a bug has been introduced to the new ShopifyTestProviders HOC including this in a project via the import
import {ShopifyTestProviders} from '@shopify/hydrogen/testing';
Wi... | diff --git a/.changeset/moody-dots-march.md b/.changeset/moody-dots-march.md
new file mode 100644
index 0000000000..356ea5106e
--- /dev/null
+++ b/.changeset/moody-dots-march.md
@@ -0,0 +1,5 @@
+---
+'@shopify/hydrogen': minor
+---
+
+Removed undeclared dependancy on faker from ShopifyTestProviders
diff --git a/package... | 4 | 4 | 2 | [{"id": "G0", "claim": "The PR should add faker to the hydrogen package's dependencies instead of removing faker usage from test files, since faker is currently in neither deps nor dev-deps (technically not correct) and the removal route would turn each test file's faker cleanup into a new patch release.", "category": ... | null |
Shopify__hydrogen-v1__2530 | Shopify/hydrogen-v1 | 2,530 | defect | ca65e24443933ed0411beffbfeb2cdf9e8eeffca | 6a23140184494c5d8ed7e4bd908fc44a7bad1cf7 | Fix an issue where cache fails to match on Oxygen/Cloudflare | The URL requires to be URI encoded to properly match
<!-- 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? -->
---
### Befor... | diff --git a/.changeset/smooth-dryers-march.md b/.changeset/smooth-dryers-march.md
new file mode 100644
index 0000000000..6713d1a28c
--- /dev/null
+++ b/.changeset/smooth-dryers-march.md
@@ -0,0 +1,5 @@
+---
+'@shopify/hydrogen': patch
+---
+
+Fix an issue where cache failed to match requests
diff --git a/packages/hydr... | 3 | 2 | 0 | [{"id": "G0", "claim": "Check whether the cache removal also needs to use the URL directly, as the H2 fix does, since the question is whether that is necessary here.", "category": "correctness", "verdict": "opposed", "priority": "P3", "scope": "pre_existing"}, {"id": "G1", "claim": "setItemInCache also needs updating: ... | null |
Shopify__hydrogen-v1__611 | Shopify/hydrogen-v1 | 611 | defect | 58d290744ac2a9e23b4c05cbcec2ee2698778b14 | b5616bf3ffd41bb7d85c6d4ac7ea7d9a61b055c3 | feat: remove react router on the client | Remove React Router entirely on the client. The main portion of RR that we use is the history library. This change removes RR while keeping history. `<ServerStateRouter>` is removed in favor of a unified `<Router>` for the client.
Todo:
- [x] Add tests
- [x] Add documentation
- [x] Add release notes | diff --git a/examples/template-hydrogen-default/package.json b/examples/template-hydrogen-default/package.json
index 8154b6ef05..9f55767fad 100644
--- a/examples/template-hydrogen-default/package.json
+++ b/examples/template-hydrogen-default/package.json
@@ -42,7 +42,6 @@
"path-to-regexp": "^6.2.0",
"react": ... | 6 | 5 | 3 | [{"id": "G0", "claim": "The Link's click handling should behave like a normal anchor tag, as React Router does: ignore everything but left clicks, let the browser handle target=\"_blank\", and ignore modifier-key clicks.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id... | null |
Shopify__hydrogen-v1__675 | Shopify/hydrogen-v1 | 675 | defect | 6b65f411b89728de7aac1e21c2ce208ed8d91098 | ec827f6d73cc19fe682007065a30e53737f4c0e9 | refactor: renamed image prop for <Image/> to data | <!-- Thank you for contributing! -->
### Description
Part of https://github.com/Shopify/hydrogen/issues/627
- [x] renamed image prop for <Image/> to data
- [x] renamed media prop on <MediaFile/> to data
### Additional context
<!-- e.g. is there anything you'd like reviewers to focus on? -->
---
#... | diff --git a/examples/template-hydrogen-default/src/components/FeaturedCollection.jsx b/examples/template-hydrogen-default/src/components/FeaturedCollection.jsx
index 95b642f677..6d6dffa48c 100644
--- a/examples/template-hydrogen-default/src/components/FeaturedCollection.jsx
+++ b/examples/template-hydrogen-default/src... | 1 | 1 | 0 | [{"id": "G0", "claim": "The Image README's props table appears to have been accidentally wiped, and it should be restored with the `image` prop renamed to `data`.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}] | null |
Shopify__hydrogen-v1__737 | Shopify/hydrogen-v1 | 737 | defect | bc5d3a5149e34ed1807e27a600ba6717de342c96 | 3ee1a14da025f8d2945ec450ceea0118965b4df1 | docs: add headers to CHANGELOG | <!-- Thank you for contributing! -->
### Description
Our CHANGELOG is getting really difficult to read, this PR added a few headers to group the changes so it will be easier for consumer to figure out what might affect them.
Also apply some stylistic things:
- always add link to issue/PR number
- remove comm... | diff --git a/packages/hydrogen/CHANGELOG.md b/packages/hydrogen/CHANGELOG.md
index 81a2a23371..bce88e33ab 100644
--- a/packages/hydrogen/CHANGELOG.md
+++ b/packages/hydrogen/CHANGELOG.md
@@ -5,8 +5,47 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http... | 2 | 2 | 2 | [{"id": "G0", "claim": "The pull request adds a second `## Unreleased` heading that duplicates the one above it, with a bunch of other items below it.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The rest of the unreleased items are left uncateg... | null |
Shopify__hydrogen-v1__855 | Shopify/hydrogen-v1 | 855 | defect | 00238bdf63009287f6e6ab65ecd018c180effaa2 | 7ad1f6be3386032b98dc05aed562716f2064779e | Deploy to Cloudflare Workers on push to `main` | <!-- Thank you for contributing! -->
### Description
Fixes #836
This PR adds a new `deployments.yaml` GH Action which will house a suite of deployments to various hosting platforms.
We're starting with Cloudflare Workers, because it's closest to Oxygen.
Eventually, we should add Fly.io for Docker/Node, ... | diff --git a/.github/deployments/cloudflare/worker.js b/.github/deployments/cloudflare/worker.js
new file mode 100644
index 0000000000..b76a992959
--- /dev/null
+++ b/.github/deployments/cloudflare/worker.js
@@ -0,0 +1,50 @@
+// If the request path matches any of your assets, then use the `getAssetFromKV`
+// function ... | 2 | 1 | 1 | [{"id": "G0", "claim": "The `if:` condition on the deploy job is missing its opening `${{` and has a stray `}}`, so the workflow file is malformed.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The 'Build for workers' step could reuse the existing ... | null |
Shopify__react-native-skia__1205 | Shopify/react-native-skia | 1,205 | defect | 1ca9f665080b878464640790b8b896f8f333d7fa | 3d65f55810c61a63bdb5025b050da24d5031a499 | #1200: Fix issue with aggregated errors in shader display when using local matrices | The Image Shader node was previously set up so that the local matrix was updated multiple times, aggregating errors when the transform prop was not changed.
This mutation is not something we wan't so this PR changes the getDerivedValue() on props to return a readonly value - which can NOT be mutatet. Any mutations m... | diff --git a/example/src/Examples/Filters/Filters.tsx b/example/src/Examples/Filters/Filters.tsx
index 9fa1297ca1..a813fcb4a6 100644
--- a/example/src/Examples/Filters/Filters.tsx
+++ b/example/src/Examples/Filters/Filters.tsx
@@ -24,6 +24,7 @@ half4 main(float2 xy) {
export const Filters = () => {
const { width, h... | 2 | 1 | 0 | [{"id": "G0", "claim": "The shared member attributes of JsiBaseGradientNode (_colors, _mode, _positions, _matrix, etc.) should perhaps be local variables in decorate() instead.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The nine _matrix.set(...) calls ... | null |
Shopify__react-native-skia__1211 | Shopify/react-native-skia | 1,211 | defect | fa5a18da40f0da1838cf3f02fa10df232101affd | 50b426e3351887b3c5d893a95899fe18bb147679 | #1194: Fixed type for inflate method to allow neg values | The inflate method in the box node used size_t for the tx/ty parameter, loosing both precision and sign. This caused the issue with negative shadows not working. Now updated to use SkScalar.
Fixes #1194. | diff --git a/package/cpp/rnskia/dom/nodes/JsiBoxNode.h b/package/cpp/rnskia/dom/nodes/JsiBoxNode.h
index 48199a575e..0d4aba6da8 100644
--- a/package/cpp/rnskia/dom/nodes/JsiBoxNode.h
+++ b/package/cpp/rnskia/dom/nodes/JsiBoxNode.h
@@ -81,8 +81,8 @@ class JsiBoxNode : public JsiDomRenderNode, public JsiDomNodeCtor<JsiBo... | 1 | 1 | 1 | [{"id": "G0", "claim": "Add a test for the inflate fix, perhaps one reusing the PR #1159 test that would also fix issue #1188, or otherwise a separate test for fixing issue #1194.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
Shopify__react-native-skia__1621 | Shopify/react-native-skia | 1,621 | defect | 890622a8437fc3dd0f8cbd2a2982455994d3846e | 5338a622f604e05a1cb6d37fe073977c6ce627fb | Fix crash with paint prop on C++ SkiaDOM | In case of the paint prop, the drawing context was invalid (no canvas set).
Extended the testing tool to support SkPaint (just color for now).
fixes #1618 | diff --git a/example/src/Tests/deserialize.ts b/example/src/Tests/deserialize.ts
index 620432ffb2..62ccacf9ca 100644
--- a/example/src/Tests/deserialize.ts
+++ b/example/src/Tests/deserialize.ts
@@ -37,6 +37,11 @@ export const parseProps = (props: SerializedProps, assets: Assets) => {
const parseProp = (value: any, ... | 2 | 2 | 0 | [{"id": "G0", "claim": "The reviewer questions whether the added intermediate variable `auto paint = ptr->getObject();` in PaintDrawingContextProp is necessary, implying the original one-line `setDerivedValue(std::make_shared<DrawingContext>(ptr->getObject()));` call should be restored if not.", "category": "maintainab... | null |
Shopify__react-native-skia__1838 | Shopify/react-native-skia | 1,838 | defect | b277fd7e4327215bc938279c6ef19175ef602d4f | 267d66e7bd668da4d525d2850d84ad7f4ec3b7c4 | Bug fixes in the FontMgr | * Fix documentation typos
* Fix bug in TypefaceFontProvider which overrides matchFamilyStyle as nullptr (which is sensible due to the typeface font provider name alising).
* FontStyle object constructor | diff --git a/docs/docs/text/fonts.md b/docs/docs/text/fonts.md
index f0153cecb1..836d74085e 100644
--- a/docs/docs/text/fonts.md
+++ b/docs/docs/text/fonts.md
@@ -121,11 +121,15 @@ The `fontStyle` object can have the following list of optional attributes:
By default, `matchFont` uses the system font manager to match... | 3 | 2 | 1 | [{"id": "G0", "claim": "The commented-out matchFamily code the PR adds to package/cpp/api/JsiSkFontMgr.h is duplicated in package/cpp/api/JsiSkTypeFaceFontProvider.h and is dead code that should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "... | null |
Shopify__react-native-skia__1865 | Shopify/react-native-skia | 1,865 | defect | 9fc42ddd79916563612b16aa7927ce11f9592049 | 63f0d2bb5da49e7a98df1ae9b2f98c85437cb19d | Fix trim() and interpolate() crashes | fixes #1653
`trim()` and `interpolate()` had a ergonomic issues that were hard to debug.
* trim() didn't accept range `[0, 1]`
These would cause crashes that would be hard to debug, especially with Reanimated. | diff --git a/package/cpp/api/JsiSkPath.h b/package/cpp/api/JsiSkPath.h
index e179ec006f..129dc4ac9b 100644
--- a/package/cpp/api/JsiSkPath.h
+++ b/package/cpp/api/JsiSkPath.h
@@ -1,5 +1,6 @@
#pragma once
+#include <algorithm>
#include <memory>
#include <utility>
#include <vector>
@@ -34,6 +35,11 @@ namespace RNSk... | 2 | 2 | 1 | [{"id": "G0", "claim": "The private helper on JsiSkPath.h added by this pull request is misspelled as `pintT` and should be named `pinT`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The test named \"should accept [0, 1.2] as trim value\" call... | null |
Shopify__react-native-skia__2419 | Shopify/react-native-skia | 2,419 | defect | 9436209c3ae5be90152189f0fb16e66cc8c69d9a | 88f8fa3517cf2ab378320d30383e0d0f9b055f2d | Add a magnifying glass example | ERROR: type should be string, got "\r\nhttps://github.com/Shopify/react-native-skia/assets/1683922/70b0a4fe-9e04-48a1-b5ce-7225330b5eb9\r\n\r\n" | diff --git a/example/src/App.tsx b/example/src/App.tsx
index 4fd9c447a9..32c7319c2c 100644
--- a/example/src/App.tsx
+++ b/example/src/App.tsx
@@ -14,6 +14,7 @@ import {
Aurora,
Breathe,
Filters,
+ MagnifyingGlass,
Gooey,
GraphsScreen,
Hue,
@@ -44,6 +45,7 @@ const linking: LinkingOptions<StackParamLi... | 1 | 1 | 1 | [{"id": "G0", "claim": "The pull request's linting/tsc errors must be fixed (e.g. with yarn lint --fix) so that CI passes.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}] | null |
Shopify__react-native-skia__2568 | Shopify/react-native-skia | 2,568 | defect | aadd424a5a9be215fee5f400ae0029a0180ad367 | 6cde4f6d024a3f43ecaa3f556dc576cfac727d1c | feat: getFrameCount | This PR implements a new method on AnimatedImage - `getFrameCount`. It's useful when you want to check how many frames in a gif. Sometimes gifs have only a single frame and you'd want to skip the animation and display just it.
Also, this PR fixes a typo - `animatedImage.__typename__` was returning `"\"AnimatedImage\... | diff --git a/docs/docs/animated-images.md b/docs/docs/animated-images.md
index f2fe67a2f8..c2c54561ef 100644
--- a/docs/docs/animated-images.md
+++ b/docs/docs/animated-images.md
@@ -102,11 +102,13 @@ import {useAnimatedImage} from "@shopify/react-native-skia";
const bird = useAnimatedImage(
require("../../assets/b... | 2 | 1 | 1 | [{"id": "G0", "claim": "The quoted string literal passed to EXPORT_JSI_API_TYPENAME is a typo: with the argument quoted, the macro's #A stringification makes the __typename__ getter return the double-quoted string \"\\\"AnimatedImage\\\"\" instead of the bare identifier AnimatedImage.", "category": "correctness", "verd... | null |
Shopify__react-native-skia__3071 | Shopify/react-native-skia | 3,071 | defect | 6bdfa7401ee7695a4c67a3e1890dd30e323c303e | bb8428fdc0edbb6d5262ee67c4c0625a9127e831 | fix(🪢): Fix color type in headless mode | fixes #3060 | diff --git a/apps/headless/package.json b/apps/headless/package.json
index c240dac7c4..4100df969e 100644
--- a/apps/headless/package.json
+++ b/apps/headless/package.json
@@ -2,7 +2,7 @@
"name": "headless-skia",
"version": "1.0.0",
"scripts": {
- "test": "ts-node ./src/helloWorld.tsx",
+ "test": "jest",
"tsc... | 3 | 1 | 1 | [{"id": "G0", "claim": "The headless entry point requires consumers to manually import ColorType from the .web module, and that enum's type is incompatible with the library's own ColorType (so it cannot be passed to APIs like MakeImage), meaning rendering code cannot stay agnostic between headless and mobile; the revie... | null |
Shopify__react-native-skia__3093 | Shopify/react-native-skia | 3,093 | defect | a5effc6a21de59fd8794fcc5b5c2cc00974dfbd8 | 12593ae738fd0447f7f5ae6d0566b7d04ee4a3f0 | fix: BoxShadow color with opacity no longer get ignored | When using color with transparency in boxshadow, they would be opaque. This changes fixes that.
I'm assuming the first opacity that was used is the one from some context above (from Group for example), so I decided to multiply with the one from the current color | diff --git a/packages/skia/cpp/api/recorder/Drawings.h b/packages/skia/cpp/api/recorder/Drawings.h
index 77c483a393..84f3fd0291 100644
--- a/packages/skia/cpp/api/recorder/Drawings.h
+++ b/packages/skia/cpp/api/recorder/Drawings.h
@@ -418,7 +418,7 @@ class BoxCmd : public Command {
SkPaint shadowPaint;
... | 2 | 1 | 1 | [{"id": "G0", "claim": "The new shadow-with-opacity test does not render the expected all-purple result when run on the ts side of the branch.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The Web version does not work because of a bug in SkPaint o... | null |
Shopify__react-native-skia__3380 | Shopify/react-native-skia | 3,380 | defect | 1e2a09214a801db971ae9f3720d7f489b1231f2d | 7e294d26cd9baa4839b8e22ed982332928f13056 | CommonJS Jest Setup Fix, Add Missing Mocks | This PR addresses issue https://github.com/Shopify/react-native-skia/issues/3377 by moving the canvaskit init method out of a top level await call and into the setup method of the jest environment class.
I also wanted to setup the example app to utilize the jest setup from the [docs](https://shopify.github.io/react-... | diff --git a/apps/example/jest.cjs.config.js b/apps/example/jest.cjs.config.js
new file mode 100644
index 0000000000..a168d1e0ae
--- /dev/null
+++ b/apps/example/jest.cjs.config.js
@@ -0,0 +1,13 @@
+const coreConfig = require("./jest.config");
+module.exports = {
+ ...coreConfig,
+ testMatch: [
+ "**/__tests__/**/... | 3 | 3 | 1 | [{"id": "G0", "claim": "Now that the module-level top-level await was removed from the jest environment, the file should be renamed from jestEnv.mjs to jestEnv.js.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The rename to jestEnv.js should ac... | null |
Shopify__react-native-skia__3553 | Shopify/react-native-skia | 3,553 | defect | 11815afe6663de6fd279329a4057c0b234348de6 | 7efd7c8231994d5cee94f79037c1475639ab9b07 | Fix: Make JsiSkPictureFactory::MakePicture handle ArrayBuffer correctly | ### Summary
Fixes `JsiSkPictureFactory::MakePicture` to properly handle `ArrayBuffer` inputs, making it consistent with the TypeScript interface and other factory methods.
### Problem
The current implementation only handles `Uint8Array` by accessing the `buffer` property, but fails when an `ArrayBuffer` is pas... | diff --git a/packages/skia/cpp/api/JsiSkPictureFactory.h b/packages/skia/cpp/api/JsiSkPictureFactory.h
index f56d066b06..f76c43fdc2 100644
--- a/packages/skia/cpp/api/JsiSkPictureFactory.h
+++ b/packages/skia/cpp/api/JsiSkPictureFactory.h
@@ -23,7 +23,7 @@ class JsiSkPictureFactory : public JsiSkHostObject {
public:
... | 3 | 2 | 2 | [{"id": "G0", "claim": "The PR should add the proposed e2e tests in e2e/Picture.spec.tsx covering serialize/deserialize through MakePicture (both the serialized value and its .buffer as ArrayBuffer), because the changed MakePicture behavior is untested.", "category": "testing", "verdict": "supported", "priority": "P1",... | null |
Shopify__react-native-skia__3725 | Shopify/react-native-skia | 3,725 | defect | 2552fc7edcb0a37b4ad1b9734a2c82bf97f06352 | 9067b6e9a93593c6643cccac55a8a27ba73c0eb1 | fix(🍏): complete Display P3 color space support for on-screen and offscreen surfaces | Fixes #3350
## Problem
Three separate bugs prevented `colorSpace="p3"` from working end-to-end on iOS:
**1. `SkiaPictureView.mm` — prop silently ignored**
The `updateProps` handler was missing the `else if (colorSpace == "p3")` branch, so the Canvas prop was always a no-op.
**2. `MetalWindowContext::getSurface()` —... | diff --git a/packages/skia/apple/MetalContext.h b/packages/skia/apple/MetalContext.h
index 070f14d8a3..ee4c3c7d97 100644
--- a/packages/skia/apple/MetalContext.h
+++ b/packages/skia/apple/MetalContext.h
@@ -13,6 +13,7 @@
#import <include/gpu/ganesh/mtl/GrMtlBackendSurface.h>
#import <include/gpu/ganesh/mtl/GrMtlDirec... | 4 | 3 | 3 | [{"id": "G0", "claim": "MakeOffscreen should take an `opts: SurfaceOptions` object (`colorSpace: \"display-p3\" | \"srgb\"`) instead of the `useP3ColorSpace?: boolean` parameter, so the API stays backward compatible when more options are added.", "category": "design", "verdict": "supported", "priority": "P1", "scope": ... | null |
Shopify__react-native-skia__3726 | Shopify/react-native-skia | 3,726 | defect | e296f9969eec9410f350220d35a2f92394c4f5cb | e5be67c4d08565f58c592bc0761b2ebdedc37332 | fix(🎯): decouple color blending from layer blending in Atlas | ## Problem
The declarative `<Atlas>` component's `blendMode` prop is consumed by both the paint system (layer compositing) and `drawAtlas` (color-sprite blending). Setting any `blendMode` applies it to both, which makes it impossible to control them independently.
The imperative API (`canvas.drawAtlas(...)`) does... | diff --git a/apps/example/src/Examples/API/AtlasExample.tsx b/apps/example/src/Examples/API/AtlasExample.tsx
new file mode 100644
index 0000000000..a694350aea
--- /dev/null
+++ b/apps/example/src/Examples/API/AtlasExample.tsx
@@ -0,0 +1,122 @@
+import React, { useMemo } from "react";
+import { ScrollView, useWindowDime... | 2 | 1 | 1 | [{"id": "G0", "claim": "Decoupling color blending from layer blending changes how `blendMode` behaves on `<Atlas>` (it now only affects layer compositing, so existing users relying on it for color-sprite blending must switch to `colorBlendMode`), and the author offers to add a fallback that reads `blendMode` for color ... | null |
Shopify__restyle__188 | Shopify/restyle | 188 | defect | 6cca8d484b852df9db972213c1f2c481dc2d9072 | fdf04f7302d7faed1f6b7915166a04721929b17c | feat: #187 add gap property | Resolves #187
I have upgraded the lib to support new gap property of RN 0.71
I had to make some adjustments on types to fix typescript issues | diff --git a/src/restyleFunctions.ts b/src/restyleFunctions.ts
index 02305f6f..b6b49ff9 100644
--- a/src/restyleFunctions.ts
+++ b/src/restyleFunctions.ts
@@ -23,6 +23,9 @@ const spacingProperties = {
paddingVertical: true,
paddingStart: true,
paddingEnd: true,
+ columnGap: true,
+ rowGap: true,
+ gap: true... | 5 | 5 | 3 | [{"id": "G0", "claim": "Add basic test coverage for the new gap props in createRestyleComponent.test.tsx — at least one test that fails before the rest of the PR is implemented.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Update the README to documen... | null |
Shopify__restyle__220 | Shopify/restyle | 220 | defect | 978eb81101706d7a38a5636fcd304393c0cc238e | 3702a9528b64ad2ede55becb5bb04d2f8421e681 | Performance improvements | ## Description
`restyle` is in its essence a runtime library to achieve better DX. Ideally, `restyle` should have _no_ overhead and _no_ performance implications. Since, as things stand, we _need_ to run code in the runtime to convert theme values to RN style, there will be some overhead.
However, we should ensur... | diff --git a/src/composeRestyleFunctions.ts b/src/composeRestyleFunctions.ts
index 281a3639..f0bac9b8 100644
--- a/src/composeRestyleFunctions.ts
+++ b/src/composeRestyleFunctions.ts
@@ -1,4 +1,4 @@
-import {StyleSheet} from 'react-native';
+import {StyleSheet, ViewStyle} from 'react-native';
import {
RestyleFunc... | 7 | 5 | 1 | [{"id": "G0", "claim": "isResponsiveObjectValue should use `every` instead of `reduce` for readability.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Memoization should not use the cache when themeKey, property or value are undefined, because k... | null |
Shopify__restyle__241 | Shopify/restyle | 241 | defect | e95eb7308f07f3af72789c7708bbc9d5b2f58ed6 | ab5753bf52c7438dea45cbb943d4d2bc14399b71 | Fix custom themed nested components props overwrite | ## Description
Note: This was a team effort with @ElviraBurchik!
**The issue**
When using nested components with different variant values and breakpoints, the child was receiving the parent's value.
For example with the following variant, if the child had `mediumPadding` and the parent had `noPadding`, the chil... | diff --git a/src/createRestyleFunction.ts b/src/createRestyleFunction.ts
index 980a0282..0c8124fd 100644
--- a/src/createRestyleFunction.ts
+++ b/src/createRestyleFunction.ts
@@ -55,11 +55,37 @@ const createRestyleFunction = <
typeof themeKey === 'string' &&
typeof property === 'string'
) {
+ ... | 1 | 1 | 0 | [{"id": "G0", "claim": "Use JSON.stringify on variant objects for the memoized hash key, which the reviewer worried is slow and asked to replace by manually building the string from breakpoints.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Shopify__restyle__249 | Shopify/restyle | 249 | defect | e95eb7308f07f3af72789c7708bbc9d5b2f58ed6 | 7400665e9ebdeab9fe2e432c602c7a82cfba9110 | Add missing typography properties | ## Description
There are a few of [React Native's Text Style Props](https://reactnative.dev/docs/text-style-props) missing from our typography restyle functions. As a result, some text styles are inaccessible from the Restyle component built from `createText`. This PR adds the following typography properties:
- inclu... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3adee628..fb58a56b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,8 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## Next
+- Added missing typography properties from React Native's Text Style Props [#249](https://github.com/Shop... | 2 | 2 | 2 | [{"id": "G0", "claim": "The pull request's changed text/typography behaviour should get basic test coverage in a new file `createText.test.tsx`, similar to the existing `gap` props tests.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The documentation ... | null |
Shopify__restyle__51 | Shopify/restyle | 51 | defect | 51156537fa1212027ebbe4b6f3b5850d89b00b3e | 5ad91798e0dfe863777dd552d1007add1f10bee7 | feat(variants): add defaults to theme | **Goal**
The idea of this PR is to add support for defaults in the theme object for the specific variant.
**Problem**
Currently specifying defaults can only be done when creating a variant, which is both limiting (i.e. no defaults for the `createText` export) and not in the same location as all the other styles (i... | diff --git a/README.md b/README.md
index f721fea1..0a6b56dd 100644
--- a/README.md
+++ b/README.md
@@ -415,6 +415,11 @@ const theme = createTheme({
tablet: 768,
},
cardVariants: {
+ defaults: {
+ // We can define defaults for the variant here.
+ // This will be applied after the defaults passed... | 2 | 2 | 2 | [{"id": "G0", "claim": "The reviewer questions why theme-level defaults do not support responsive props, pointing at the README note the PR adds stating that defaults do *not* support responsive props.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim":... | null |
Shopify__toxiproxy__125 | Shopify/toxiproxy | 125 | defect | 2f36101d0ccf9ed678b31e0117e2e848d4da84e2 | 97c559181831253e13ff6a2ed512b1ff9caa8185 | Add toxic limiting size of transmitted data | As mentioned in #122 here is PR ... sort of first experience with golang.
| diff --git a/README.md b/README.md
index dd4c8e1c..03425247 100644
--- a/README.md
+++ b/README.md
@@ -378,6 +378,12 @@ Attributes:
- `size_variation`: variation in bytes of an average packet (should be smaller than average_size)
- `delay`: time in microseconds to delay each packet by
+#### limit_data
+
+Closes c... | 7 | 7 | 2 | [{"id": "G0", "claim": "The transmitted-bytes counter is a local variable in Pipe(), so it resets whenever the toxic is interrupted and Pipe() restarts; the reviewer asks to track bytes transmitted in a private struct field instead.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introd... | null |
Shopify__toxiproxy__127 | Shopify/toxiproxy | 127 | defect | d71d7f0207d5f0a5e422cf4209a3ad4802f6311d | ee8478ae932ecdbca544681031c154bedea6171f | Add limit data toxic | Adds https://github.com/Shopify/toxiproxy/pull/125 with some fixes
I made some simplifications to `toxic_collection.go` that don't change anything other than make the code look nicer (no more duplicated `c.chain` and `c.toxics`)
Stateful toxics are added to allow for per-connection toxic state to be stored.
This fixes... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8ba227a8..05f418fe 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+# 2.1.0 (Unreleased)
+
+* Add support for stateful toxics
+* Add limit_data toxic
+
# 2.0.0
* Add CLI (`toxiproxy-cli`) and rename server binary to `toxiproxy-server` #93
diff --git a/CREA... | 3 | 1 | 0 | [{"id": "G0", "claim": "Questioning the design: why not make `StatefulToxic` the default instead of an optional interface?", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Remove the redundant `// Add stubs` comment in TestStateCreated.", "category": "mainta... | null |
Shopify__toxiproxy__308 | Shopify/toxiproxy | 308 | defect | 0d6d327d209b59100998afc054ab8894df51dabe | b982a66d4c4f00cd5adb8d958b15a94187f49b99 | Flags write before arguments in toxiproxy-cli | In #294 introduced a breaking change in client argument parsing.
It requires to write [flags before arguments](https://github.com/urfave/cli/blob/master/docs/migrate-v1-to-v2.md#flags-before-args).
Update help texts and documentation to have POSIX way to use
flags and arguments.
Example:
Before
```shell
$ to... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2d07fa02..410d9dae 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,9 @@
# [Unreleased]
* Use CHANGELOG.md for release description (#306, @miry)
+* In #294 introduced a breaking change in client argument parsing. It requires
+ to write [flags before arguments](... | 1 | 1 | 0 | [{"id": "G0", "claim": "Reword the new CHANGELOG entry for #294 to say the dependency updates introduced the breaking CLI parsing change, that flags must now come before arguments, and that arguments could previously precede flags.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "intro... | null |
Shopify__toxiproxy__316 | Shopify/toxiproxy | 316 | defect | c2460d607f9d334e35d3e014602191576e458ecd | 257384f73003c29dad5b688b9eeb58432de46846 | Set max line 100 characters | Add linter to check the max line length.
Use https://github.com/segmentio/golines to format most of files. | diff --git a/.golangci.yml b/.golangci.yml
index bc6272c2..3d8fc08d 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -6,4 +6,5 @@ linters:
linters-settings:
lll:
- line-length: 200
+ line-length: 100
+ tab-width: 1
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4b23e881..2d5c2cdf 100644
--- a/CHANGELOG.... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add a `statements: 75` limit to the linter settings alongside the new line-length setting.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
Shopify__toxiproxy__354 | Shopify/toxiproxy | 354 | defect | c2863c11b2b98330cd4833f0b05d7447040526b4 | 471c6bc9995f49d69a603efb9dad8e63c82ec7c2 | Rename bin/ and testing/ folders | As a part of #352 discussion this is non-breaking change to the folders structure regarding testing | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 39e7a0d5c..b1c41725e 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -2,9 +2,9 @@ name: Test
on:
push:
- branches: [ master ]
+ branches: [master]
pull_request:
- branches: [ master ]
+ branches: ... | 2 | 2 | 0 | [{"id": "G0", "claim": "The CHANGELOG entry for #351 is missing the comma before @strech and should read \"(#351, @strech)\" like the new entry.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "scripts/test-e2e should keep the 2-space indentation in... | null |
Shopify__toxiproxy__441 | Shopify/toxiproxy | 441 | defect | b36799eeb54a72cf773ccd6cc0ad736be9a98ae5 | 1b593846a2d1a0f5d0a28309c8ad99a9fc6765f3 | Use single http client for cli | Introduce single Client httpClient for all cli requests.
It allows to add request headers in single place.
For example adds `User-Agent` HTTP header for all requests as `"toxiproxy-cli/<version> <os>/<runtime>"`.
Parse response on success or errors.
Set content type as json always.
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 881d48392..dc836266b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,11 @@
* Support PATCH HTTP method for Proxy update(`PATCH /proxies/{proxy}`) and
Toxic update(`PATCH /proxies/{proxy}/toxics/{toxic}`) endpoints.
Deprecat POST HTTP method for those endpoin... | 4 | 4 | 0 | [{"id": "G0", "claim": "In Proxy.Delete, checking `if err == nil` and returning nil inside the success branch is inconsistent; the error should be wrapped and returned as `if err != nil { return fmt.Errorf(\"Delete: %w\", err) }` with a plain `return nil` after it.", "category": "maintainability", "verdict": "supported... | null |
Shopify__toxiproxy__76 | Shopify/toxiproxy | 76 | defect | a9d49eee246cd4495d77e6d2a32f2cd720e9c6fc | b83d281a9ebf77e038806cec7c7de6e1afd0b47b | 2.0 Client Refactor | As I was documenting the go api, I had a look at a few projects that were using the go api, and almost all of them were wrapping the go client to make it easier to use. I took this as a sign that it needed a refactor.
Most operations are now a single line, rather than 2-3.
@Sirupsen @eapache
| diff --git a/api_test.go b/api_test.go
index cecd332d..fb59b46f 100644
--- a/api_test.go
+++ b/api_test.go
@@ -13,12 +13,6 @@ import (
var testServer *toxiproxy.ApiServer
var client = tclient.NewClient("http://127.0.0.1:8475")
-var testProxy = client.NewProxy(&tclient.Proxy{
- Name: "mysql_master",
- Listen: ... | 3 | 2 | 2 | [{"id": "G0", "claim": "The toxiproxy-go client also needs a `Populate()` function like the ruby library has.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "There may be no need to expose `NewProxy` (or even `Save`) since all the other methods seem to en... | null |
Shopify__toxiproxy__80 | Shopify/toxiproxy | 80 | defect | 0cba08c735569e72818eff8462d9f1780ffc1f01 | e27640194b8fd769c6f9b1d5dcce762640bca424 | Fix toxic marhsaling and toxicity updating | This code is kind of a mess, but it turns out there's no way to marshal a `ToxicWrapper` into a flat object without doing this hacky reflection.
The json package will marshal it as `{"toxic":{"latency": 1000}, "name": "latency")`, which isn't what we want.
Somehow this escaped the tests before, so I've added a bunch o... | diff --git a/api.go b/api.go
index cc953f15..af757e9c 100644
--- a/api.go
+++ b/api.go
@@ -7,7 +7,6 @@ import (
"net"
"net/http"
- "github.com/Shopify/toxiproxy/toxics"
"github.com/Sirupsen/logrus"
"github.com/gorilla/mux"
)
@@ -231,7 +230,7 @@ func (server *ApiServer) ToxicCreate(response http.ResponseWrite... | 3 | 2 | 1 | [{"id": "G0", "claim": "Using reflect in ToxicWrapper.GetMap is questionable; a dedicated JSONToxic-style type with assigned fields would be preferable.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "GetMap uses the raw json tag as the map key, so a fiel... | null |
Shopify__toxiproxy__85 | Shopify/toxiproxy | 85 | defect | a78f8638980fd0e3c848aa7091ec2df74afe7ce4 | d680af6ba2a1e35155ca1dfdffa7c133c7fd6c57 | api: improve stream error message | Per discussion in https://github.com/Shopify/toxiproxy/pull/83
@xthexder
| diff --git a/api.go b/api.go
index cc953f159..89835782f 100644
--- a/api.go
+++ b/api.go
@@ -347,7 +347,7 @@ var (
ErrMissingField = newError("missing required field", http.StatusBadRequest)
ErrProxyNotFound = newError("proxy not found", http.StatusNotFound)
ErrProxyAlreadyExists = newError("proxy alre... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new ErrInvalidStream error should return http.StatusBadRequest instead of http.StatusNotFound.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Shopify__toxiproxy__98 | Shopify/toxiproxy | 98 | defect | c60339d162c2ec1ca40c571a4968f8490e1430a8 | d21a2744e6275eb5312b11ab978656fd7cad50bc | Embed toxic attribute | This patch embeds toxic specific attributes into their own nested `attributes` field, allowing for the following api changes:
``` go
type Attributes map[string]interface{}
type Toxic struct {
Name string `json:"name"`
Type string `json:"type"`
Stream string `json:"stream"`
... | diff --git a/api_test.go b/api_test.go
index 6f06fafa..e923c16d 100644
--- a/api_test.go
+++ b/api_test.go
@@ -309,7 +309,7 @@ func TestResetState(t *testing.T) {
t.Fatal("Unable to create proxy:", err)
}
- latency, err := testProxy.AddToxic("", "latency", "downstream", tclient.Toxic{
+ latency, err := testP... | 6 | 6 | 1 | [{"id": "G0", "claim": "Remove the custom MarshalJSON() entirely by embedding Toxic as `json:\"attributes\"` (using a temporary NoopToxic so the attributes map has a target to unmarshal into) instead of keeping the hand-rolled marshaler around.", "category": "design", "verdict": "supported", "priority": "P2", "scope": ... | null |
Shopify__vscode-shopify-ruby__35 | Shopify/vscode-shopify-ruby | 35 | defect | a8ec8b097bb245485ab1d48a1e88028f9c9d853f | 7a40ac5cb9cde3f80d5a9f17102210775ff2e9dc | Add command to force override configuration | We want to allow users to have their own configuration, instead of always overriding everything. This PR makes it so that we only override if no settings are present.
Additionally, we add a command to force apply all overrides, for folks who want to get our recommend configs. | diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 00000000..30bf8c2d
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,11 @@
+// Place your settings in this file to overwrite default and user settings.
+{
+ "files.exclude": {
+ "out": false // set this to true to hide th... | 2 | 2 | 1 | [{"id": "G0", "claim": "The new .vscode/settings.json file is missing a trailing newline at the end of the file.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The configuration override handling should work like the clangd extension, which prom... | null |
Shopify__vscode-shopify-ruby__41 | Shopify/vscode-shopify-ruby | 41 | defect | 53f8e76b731ca5e56450b716869bb977156885ec | 9a91d9aa933c81cfc600c568ffe19517ea7d7165 | Add the ability to accept all overrides | In #35, we started asking users if they want us to override each specific setting. For a large number of settings, this is a terrible experience as you get 5+ prompts one on top of the other.
This PR prompts the user if they want to accept all overrides, select for each config or cancel, so that we give folks the ab... | diff --git a/src/configuration.ts b/src/configuration.ts
index 4ad3ae3..70dbf74 100644
--- a/src/configuration.ts
+++ b/src/configuration.ts
@@ -53,10 +53,18 @@ export interface ConfigurationStore {
}
const CANCELLED_OVERRIDES_KEY = "shopify.ruby.cancelled_overrides";
+const APPROVED_ALL_OVERRIDES_KEY = "shopify.ru... | 3 | 3 | 1 | [{"id": "G0", "claim": "The prompt text has a typo: \"suggest configuration defaults\" should read \"suggested configuration defaults\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Asks whether there is a way for the team to tophat (manually tr... | null |
Shopify__web-configs__210 | Shopify/web-configs | 210 | defect | 2a89666370580806037ce7ebaef160e28ca7f835 | 62d4f3a6cd21eca5d81979b6f459ceec2dd20e68 | Update eslint-plugins and drop eslint@6 support | ## Description
This PR updates the `eslint-plugins` and drops support for `eslint@6`.
| Package | Old version | New version |
| ----------------------------------------- | ----------- | ----------- |
| `eslint-config-prettier` | `6.14.0` | `7.2.0` |
| `es... | diff --git a/package.json b/package.json
index b3d806d8..a3c36320 100644
--- a/package.json
+++ b/package.json
@@ -19,7 +19,7 @@
},
"devDependencies": {
"@shopify/tophat": "^0.0.4",
- "eslint": "^6.8.0",
+ "eslint": "^7.19.0",
"fs-extra": "^9.0.0",
"glob": "^7.1.6",
"jest": "^25.2.0",
di... | 5 | 3 | 1 | [{"id": "G0", "claim": "Enable the newly available typescript-eslint rules (and the new naming-convention options) that the eslint@6-to-7/plugin-4.15 upgrade makes possible in lib/config/rules/typescript.js.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": ... | null |
Shopify__web-configs__251 | Shopify/web-configs | 251 | defect | aae13e121d4cbcf323f40b3d57ec69bcd796e8ad | 9852a937a6b51edc60215dcc34c1b943cb648fab | Add require-autocomplete lint rule | ## Description
<!--
Please include a summary of what you want to achieve in this pull request.
If this fixes an existing issue, please include the issue number.
-->
Adds an eslint rule that tries to ensure we include an `autoComplete` attribute on input. Part of the [Autocomplete project](https://vault.shop... | diff --git a/packages/eslint-plugin/docs/rules/react-require-autocomplete.md b/packages/eslint-plugin/docs/rules/react-require-autocomplete.md
new file mode 100644
index 00000000..77535376
--- /dev/null
+++ b/packages/eslint-plugin/docs/rules/react-require-autocomplete.md
@@ -0,0 +1,31 @@
+# Require inputs have have au... | 8 | 6 | 1 | [{"id": "G0", "claim": "The rule should be configurable via a setting listing extra components, so it can be applied to components beyond 'input' and 'TextField' such as web's SimpleDateField and the Select component that already gets autocomplete-valid.", "category": "design", "verdict": "supported", "priority": "P1",... | null |
Shopify__web-configs__298 | Shopify/web-configs | 298 | defect | 84c180fb08968276198faade21fa6918b104804c | ba0a8c6c0a08be5e37cfca7de90e7845805f2664 | Add Node.js 16 support and update stylelint-plugin deps | ## Description
- Bump the Node.js for local development to 16.3.0.
- Add an `engines` prop to package.json
- Update stylelint-plugin deps:
### Pertinent/breaking parts of changelogs for deps
#### [stylelint-config-prettier 8.0.1 -> 9.0.3](https://github.com/prettier/stylelint-config-prettier/releases)
v9.... | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 5ba47067..f7ca9eb4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -17,7 +17,7 @@ jobs:
- uses: actions/setup-node@v2
with:
- node-version: '12.14.0'
+ node-version: '16.13.0'
ca... | 2 | 2 | 1 | [{"id": "G0", "claim": "The yarn.lock added by this PR contains two postcss entries that both resolve to postcss@7.0.35, and they need to be deduped/collapsed into one.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "To avoid causing breaking cha... | null |
Shopify__web-configs__307 | Shopify/web-configs | 307 | defect | 46cc2759c4985c5a43b387d4e7edd4557e069b5d | 14dbdffb16643dbfb8a597316a206907cd759fc4 | Support stylelint v14 | ## Description
Updates @shopify/styelint-plugin to support stylelint v8.
- Increase peer dependency on stylelint from `>=13.12.0` to `>=14.1.0`
- Add overrides for scss files to configure the custom syntax
- Add e2e test for scss files that demonstrate syntax that would error if
scss parsers / scss rules w... | diff --git a/packages/stylelint-plugin/index.js b/packages/stylelint-plugin/index.js
index 8566fa21..91568972 100644
--- a/packages/stylelint-plugin/index.js
+++ b/packages/stylelint-plugin/index.js
@@ -21,7 +21,6 @@ module.exports = {
require('./config/order'),
require('./config/property'),
require('./c... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add comments to each case in scss.invalid.scss explaining what is invalid about it.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Shopify__web-configs__364 | Shopify/web-configs | 364 | defect | 0d6b694a14009ba6a911f4a2a12fe0fae42ba815 | 66e6e1aa0d62f97f52907b56d4ed0014afbc5e3b | Update stylelint-config to support stylelint^15 | ## Description
- Update stylelint to version `^15`.
- Remove the [76 rules](https://stylelint.io/user-guide/rules/#deprecated) deprecated rules in the [new `^15` version.](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-15.md)
- Enabling the new [`declaration-property-value-no-unknown`](http... | diff --git a/.changeset/clever-tables-know.md b/.changeset/clever-tables-know.md
new file mode 100644
index 00000000..c084c571
--- /dev/null
+++ b/.changeset/clever-tables-know.md
@@ -0,0 +1,9 @@
+---
+'@shopify/stylelint-plugin': major
+---
+
+Updating our stylelint rules to support stylelint@^15
+
+- Removing [76 rul... | 4 | 3 | 3 | [{"id": "G0", "claim": "The pull request should drop stylelint-config-prettier entirely (without adding stylelint-config-standard as a replacement), so prettier.js just has extends: ['./index'].", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Since t... | null |
Shopify__web-configs__379 | Shopify/web-configs | 379 | defect | 7a0dcd1d211f3985ae771174268c016ebbb240d9 | d6d64a6e8b3fe189cab65696f58a692e3202669f | [eslint plugin] Add back support for `Card` and `Stack` to polaris rules | ## Description
Part of [Polaris#8185](https://github.com/Shopify/polaris/issues/8185).
A previous [PR](https://github.com/Shopify/web-configs/pull/371) updated the `polaris-no-bare-stack-item` to only support `LegacyStack`. Similarly, the `polaris-prefer-sectioned-prop` to only support `LegacyCard`, all in a patc... | diff --git a/.changeset/spicy-cycles-ring.md b/.changeset/spicy-cycles-ring.md
new file mode 100644
index 00000000..6f792e85
--- /dev/null
+++ b/.changeset/spicy-cycles-ring.md
@@ -0,0 +1,5 @@
+---
+'@shopify/eslint-plugin': minor
+---
+
+Refactored `polaris-no-bare-stack-item` to support both `Stack` and `LegacyStack`... | 2 | 2 | 0 | [{"id": "G0", "claim": "The rule description in packages/eslint-plugin/lib/rules/polaris-no-bare-stack-item.js misspells 'and' as 'abd' and should read 'Disallow the use of Polaris's `Stack.Item` and `LegacyStack.Item` without any custom props.'.", "category": "documentation", "verdict": "supported", "priority": "P2", ... | null |
ShotHeadman__mdcz__39 | ShotHeadman/mdcz | 39 | defect | 3a6dc4fe62f1ab8f53d25f98e5a17a7f9e5b62ce | fc49cc3a141ba27620e093fdb0fb5754bd2fd057 | 保持 DMM 系列元数据一致性,新增{originaltitle}和修复{title}的共享目录限制 | - 保持 DMM 系列数据的一致性,避免 dmm 与 dmm_tv 之间的核心字段相互混淆
- 优化 DMM 搜索的回退机制,提高详情页解析的稳定性
- 在类型(genre)提取中加入 DMM TV 相关标签
- 为 DMM 爬虫及聚合逻辑增加回归测试覆盖
- 新增{originaltitle}和修复{title}的共享目录限制 | diff --git a/packages/shared/assetNaming.ts b/packages/shared/assetNaming.ts
index c7dd7df7..af605d31 100644
--- a/packages/shared/assetNaming.ts
+++ b/packages/shared/assetNaming.ts
@@ -1,5 +1,6 @@
export const ASSET_NAMING_MODES = ["fixed", "followVideo"] as const;
export const MOVIE_NFO_BASE_NAME = "movie";
+const... | 7 | 6 | 4 | [{"id": "G0", "claim": "Genres should not be mirrored into the NFO tag nodes (tags are for content the software adds itself, such as Chinese subtitles), and the compensating genre-filtering logic in src/main/utils/nfo.ts is redundant and should be removed.", "category": "design", "verdict": "supported", "priority": "P1... | null |
Shpota__goxygen__32 | Shpota/goxygen | 32 | defect | 5bea4029a5a1da8d771dc1339e1c7c25bb7b9fcb | 639836aa2907ca1737d83f8c7ec36ddb72cc7e9b | Different webapp structure depending on template prefixes | - `codegen.Generate()` now consumes `framework` as a parameter and checks if a particular path starts with a framework name before creating a file.
- a file is considered a framework-specific file" if its relative path from `/templates` folder starts with the framework name followed by dot.
EG:
```
angular.webapp/s... | diff --git a/.github/README.md b/.github/README.md
index 1508cb9..76e6272 100644
--- a/.github/README.md
+++ b/.github/README.md
@@ -24,7 +24,7 @@
</a>
</h1>
-<img src="../templates/webapp/src/logo.svg" align="right" width="230px" alt="goxygen logo">
+<img src="../templates/react.webapp/src/logo.svg" align="rig... | 1 | 1 | 0 | [{"id": "G0", "claim": "Move the framework-prefix stripping line (`path = strings.Replace(path, framework+\".\", \"\", 1)`) into `generateFile`, since it is needed for images as well as text files and is currently duplicated in `processImages` and `processTextFiles`.", "category": "maintainability", "verdict": "support... | null |
SiaFoundation__renterd__1106 | SiaFoundation/renterd | 1,106 | defect | 19a25f901225b508a3c68c293f8a068a7d7c03b8 | f03530f96fdf414c2a95a607018018cfa3009f16 | Properly handle contract renewals in the sectors cache | This PR is a result of investigating a lost sector alert on my node. I realised that we sometimes mistakenly prune sectors from recently renewed contracts, which then leads to those sectors being reported lost on downloads. This happens because the sectors cache in the bus doesn't properly take into account renewals, t... | diff --git a/bus/bus.go b/bus/bus.go
index d68e46309..8e67e7ce2 100644
--- a/bus/bus.go
+++ b/bus/bus.go
@@ -1141,6 +1141,7 @@ func (b *bus) contractIDRenewedHandlerPOST(jc jape.Context) {
if jc.Check("couldn't store contract", err) == nil {
jc.Encode(r)
}
+ b.uploadingSectors.addRenewal(req.Contract.ID(), req.R... | 2 | 2 | 1 | [{"id": "G0", "claim": "The two-map renewal design should be replaced by a simpler approach without the second map: addRenewal loops over the uploads and migrates each upload's contractSectors from the old fcid to the new one, fcids becomes a single-fcid latestFCID, and renewedTo pruning is done in finishUpload like fo... | null |
SiaFoundation__renterd__1158 | SiaFoundation/renterd | 1,158 | defect | 5bfdfec3f223a2bc1d53d56fc4b6c6a6a14d635c | 59727fbde7f3cbb04accc97eafb710297f847ba2 | Move S3 code to worker package and use worker instead of worker client | The S3 and worker API are already quite coupled and this PR refactors the code a bit to make sure the S3 API uses the worker directly instead of going through a http client. That way we don't push all traffic through the TCP/IP stack and therefore avoid any overhead the S3 API currently has over the native API and remo... | diff --git a/api/multipart.go b/api/multipart.go
index ee26567b1..ecd19789f 100644
--- a/api/multipart.go
+++ b/api/multipart.go
@@ -7,6 +7,11 @@ import (
)
var (
+ // ErrInvalidMultipartEncryptionSettings is returned if the multipart upload
+ // has an invalid combination of encryption params. e.g. when encryption... | 5 | 5 | 0 | [{"id": "G0", "claim": "Fix the typo in the ErrMultiRangeNotSupported comment: \"when a requesta\" should read \"when a request\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Reformat the ParseDownloadRange comment block, which reads awkwardly ... | null |
SiaFoundation__renterd__1193 | SiaFoundation/renterd | 1,193 | defect | 712c1d8535d41e91aec7ee336d1246196d35918e | c78947c8ecad344eed3c127c29cf07263b9e15f6 | Improve sector upload estimate tracking | It turns out that Chris 's hunch was right and that we are not tracking sector upload estimates at times we should be, even worse we currently don't track anything at times we should be penalising the host for being slow. I added explicit logging for when we penalise a host for being (super) slow, so going to follow th... | diff --git a/worker/host_test.go b/worker/host_test.go
index cb88f1748..88a3bb058 100644
--- a/worker/host_test.go
+++ b/worker/host_test.go
@@ -23,6 +23,7 @@ type (
*contractMock
hptFn func() api.HostPriceTable
uploadDelay time.Duration
+ uploadErr error
}
testHostManager struct {
@@ -93,7 +94,... | 1 | 1 | 1 | [{"id": "G0", "claim": "The isClosedStream / canceled-overdrive guard means a slow non-overdrive host that loses a race to a faster overdrive is never punished, so uploads may slow down overall; the reviewer asks to also penalise the original host in that case, e.g. by cancelling with a specific error like ErrUploadCom... | null |
SiaFoundation__renterd__1236 | SiaFoundation/renterd | 1,236 | defect | 4266cf6263a2f0b385970d17f404a71d0b49afa1 | aee2c43be34bfba5091907e9b9d32f034cca1db8 | Migrate RenameObject to raw SQL | This is the first method migrated to the new raw sql database type. Starting with a smaller one to keep things easy.
NOTE: `DeleteObject` is different for SQLite and MySQL on purpose. SQLite is less granular when it comes to locking so in my experience performing the writing operation sooner rather than later in the... | diff --git a/internal/sql/migrations.go b/internal/sql/migrations.go
index 9d8295bcc..6e7edc2f1 100644
--- a/internal/sql/migrations.go
+++ b/internal/sql/migrations.go
@@ -111,10 +111,14 @@ var (
for rows.Next() {
var o obj
if err := rows.Scan(&o.ID, &o.ObjectID); err != nil {
+ _ = rows.... | 2 | 1 | 0 | [{"id": "G0", "claim": "The reviewer asks whether `DirectoriesRootID` should be defined in the stores package rather than the internal package, so `stores` would not need the `isql` import for it.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "In the new S... | null |
SiaFoundation__renterd__1245 | SiaFoundation/renterd | 1,245 | defect | 66d667d2c2a4f3f4280a68b5c56c0dfefefc2424 | 35fb60d7c2d25c3420f9204761de99de8f439c04 | Avoid panic when evaluating config if autopilot is not configured | Run into a panic setting up a `testnet` node. Turns out the new UI sends configs for evaluation even though the autopilot hasn't been configured yet. We should probably create a `UI` issue for this as well but we need to harden against this on both sides.
```
http: panic serving 127.0.0.1:60434: runtime error: inte... | diff --git a/autopilot/contractor/evaluate.go b/autopilot/contractor/evaluate.go
index b3a5cc0a5..8722202f4 100644
--- a/autopilot/contractor/evaluate.go
+++ b/autopilot/contractor/evaluate.go
@@ -21,6 +21,11 @@ func countUsableHosts(cfg api.AutopilotConfig, cs api.ConsensusState, fee types.
// are too strict for the ... | 3 | 3 | 3 | [{"id": "G0", "claim": "EvaluateConfig should return an error (surfaced as a BadRequest in the API) instead of silently returning an empty response when the allowance or contract amount is missing.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "priceAdju... | null |
SiaFoundation__renterd__1294 | SiaFoundation/renterd | 1,294 | defect | c7b80d419db742c82a80fba7f50beec3a896eb0a | c258e0874d5c2c09dff690de00c11d4b5453df9a | Allow pinning price settings to an underlying currency | This PR adds a `pin` manager to the bus that undertakes action depending on the user's `pricepinning` settings. Those include pins for gouging settings as well as autopilot settings. When a setting is pinned, it's pinned to a fixed value in a certain underlying currency defined in the settings. `renterd` will periodic... | diff --git a/api/setting.go b/api/setting.go
index 923863e58..1da942d29 100644
--- a/api/setting.go
+++ b/api/setting.go
@@ -12,6 +12,7 @@ import (
const (
SettingContractSet = "contractset"
SettingGouging = "gouging"
+ SettingPricePinning = "pricepinning"
SettingRedundancy = "redundancy"... | 7 | 5 | 1 | [{"id": "G0", "claim": "The reviewer questions whether the gonum/stats package dependency is really needed just for the Mean/Median rate calculations in the pin manager.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The negative `Disabled` flag... | null |
SiaFoundation__renterd__1403 | SiaFoundation/renterd | 1,403 | defect | fbf16eb6df338a0a13b98ea7c2e82f8f79435fc1 | 5360f3aec909506b8de88cea1b5208860f328aa3 | Improve ephemeral account drift | This PR proposes a series of small changes in an attempt to fix (or improve) the drift we see in production. I have not been able to reproduce (meaningful) negative drift in a test locally and found debugging it on production quite challenging because you want to caveman debug both sides ideally. The following changes ... | diff --git a/bus/accounts.go b/bus/accounts.go
index d072de1c75..5e6230faa5 100644
--- a/bus/accounts.go
+++ b/bus/accounts.go
@@ -147,35 +147,43 @@ func (a *accounts) AddAmount(id rhpv3.Account, hk types.PublicKey, amt *big.Int)
}
// SetBalance sets the balance of a given account to the provided amount. If the
-//... | 6 | 6 | 3 | [{"id": "G0", "claim": "The rewritten e2e test should assert an exact expected account balance (1SC minus the cost of the sync) rather than only checking that the balance is non-zero.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The clean-shutdown/Req... | null |
SiaFoundation__renterd__1412 | SiaFoundation/renterd | 1,412 | defect | 8838ea620f78eac87292dce1e2c6241b0009c76a | 0396e892315a51828c370a91a2e5c0a584c3ba2d | Improve node setup pt. 2 | This PR gets rid of the `bus`'s `Setup` method and changes our internal implementations of the subscriber and pin manager to return running instances. It also removes the internal `chain` package which always felt a bit off to me. I started re-exporting things from `coreutils`'s chain package there to avoid aliasing th... | diff --git a/bus/bus.go b/bus/bus.go
index 80b838ca8..d5f0ad383 100644
--- a/bus/bus.go
+++ b/bus/bus.go
@@ -12,6 +12,7 @@ import (
"go.sia.tech/core/gateway"
rhpv2 "go.sia.tech/core/rhp/v2"
"go.sia.tech/core/types"
+ "go.sia.tech/coreutils/chain"
"go.sia.tech/coreutils/syncer"
"go.sia.tech/coreutils/wallet"
... | 2 | 1 | 0 | [{"id": "G0", "claim": "To make the node easier to set up, `bus.New` should take a single merged `Store` interface (embedding the individual store interfaces) instead of seven separate `sqlStore` parameters.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": ... | null |
SiaFoundation__renterd__1444 | SiaFoundation/renterd | 1,444 | defect | bc4abd8bdc92fac66a710876a473a1cc88ba235c | c9f70ad1fb0f34bca27ac0f66f25478984825c47 | Move sector cache to `internal` package | I went back and fourth on naming, both for the sector cache as well as the contract locks. We can rename it later or we can do it now I don't mind. Couldn't think of better alternatives that fit well on the `bus` struct. | diff --git a/bus/bus.go b/bus/bus.go
index cee165160..b4ccd53f9 100644
--- a/bus/bus.go
+++ b/bus/bus.go
@@ -88,6 +88,15 @@ type (
UnconfirmedParents(txn types.Transaction) ([]types.Transaction, error)
}
+ UploadingSectorsCache interface {
+ AddSector(uID api.UploadID, fcid types.FileContractID, root types.Hash... | 1 | 1 | 1 | [{"id": "G0", "claim": "NewSectorsCache should return the exported type *SectorsCache instead of the unexported sectorsCache, to avoid exporting a constructor that creates an unexported type, which is awkward to use.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
SiaFoundation__renterd__1449 | SiaFoundation/renterd | 1,449 | defect | bc4abd8bdc92fac66a710876a473a1cc88ba235c | 14fdf9053b46b5f6522dc2c007ce6ac2a3c69e5c | Fix dirs that were created explicitly being listed twice | Fixes https://github.com/SiaFoundation/renterd/issues/1447 | diff --git a/stores/metadata_test.go b/stores/metadata_test.go
index bfe70ffa1..af24f05c1 100644
--- a/stores/metadata_test.go
+++ b/stores/metadata_test.go
@@ -1579,6 +1579,67 @@ func TestObjectEntries(t *testing.T) {
}
}
+func TestObjectEntriesExplicitDir(t *testing.T) {
+ ss := newTestSQLStore(t, defaultTestSQL... | 1 | 1 | 0 | [{"id": "G0", "claim": "The awkward double-negated comparison condition in the test loop should be simplified (e.g. moved to an `else if len(got) == 0 && len(want) == 0 { continue }` right after fetching the object entries).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced... | null |
SiaFoundation__renterd__1463 | SiaFoundation/renterd | 1,463 | defect | cd526d459245ea5dd412810bccf78993676dc510 | 149f5288d0ba86d7956fc43de47a248c72225c61 | Add contract formation endpoint to bus | This PR moves contract formation to the bus and gets rid of routes that became redundant because of the move. I want to draw attention to the route I added which is `POST /contracts`, I originally had `POST /rhp/form` but I think now is a good time to reconsider having `rhp` in the route. There's really no need to expo... | diff --git a/bus/bus.go b/bus/bus.go
index ec68077059..3a2ad570a8 100644
--- a/bus/bus.go
+++ b/bus/bus.go
@@ -9,6 +9,7 @@ import (
"errors"
"fmt"
"math/big"
+ "net"
"net/http"
"time"
@@ -25,10 +26,13 @@ import (
"go.sia.tech/renterd/api"
"go.sia.tech/renterd/bus/client"
ibus "go.sia.tech/renterd/inte... | 3 | 3 | 0 | [{"id": "G0", "claim": "The V2 contract-formation path should be replaced with a panic, since rhp2.FormV2Contract will never exist — it will be a method on the rhp4 client.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The pull request should target the... | null |
SiaFoundation__renterd__1467 | SiaFoundation/renterd | 1,467 | defect | cd526d459245ea5dd412810bccf78993676dc510 | 8cc1e0fe7c8e10b2a2929f3d7c93c1273ca8a6f2 | Add contract additions to worker cache | It seems like right now the cached contracts are not updated when a new contract is added. This fixes that.
I noticed because the worker failed to refill ephemeral accounts in my open PR since the cached contracts were always 0 because the cache was initialized before the contracts had been formed. | diff --git a/api/events.go b/api/events.go
index 611cf48fa..e9600e53b 100644
--- a/api/events.go
+++ b/api/events.go
@@ -17,6 +17,7 @@ const (
ModuleHost = "host"
ModuleSetting = "setting"
+ EventAdd = "add"
EventUpdate = "update"
EventDelete = "delete"
EventArchive = "archive"
@@ -34,6 +35... | 2 | 2 | 1 | [{"id": "G0", "claim": "In contractIDHandlerPOST, flip the `jc.Check(\"couldn't store contract\", err) == nil` into `!= nil` with an early return, and move `jc.Encode(a)` to after the broadcast, since encoding the contract should not be the final step.", "category": "correctness", "verdict": "supported", "priority": "P... | null |
SiaFoundation__renterd__1472 | SiaFoundation/renterd | 1,472 | defect | e0d618f1f053b3eb07632d8e247776cb10694593 | beeebc37c982bbec2ef0c35ea8f0f488ffc93a0f | Add contract pruning to the bus | This PR moves contract pruning over to the bus. I kept the `/rhp/contract/:id/roots` endpoint on the worker. This PR also uses a temporary table to store the roots we fetch from the host, this allows us to calculate which indices are prunable without fetching the contract roots from the database. This saves on network ... | diff --git a/api/contract.go b/api/contract.go
index b012582e2..51c515fb5 100644
--- a/api/contract.go
+++ b/api/contract.go
@@ -161,6 +161,20 @@ type (
LockID uint64 `json:"lockID"`
}
+ // ContractPruneRequest is the request type for the /contract/:id/prune
+ // endpoint.
+ ContractPruneRequest struct {
+... | 7 | 7 | 4 | [{"id": "G0", "claim": "Move the fetch of the contract down until after the contract lock is acquired, since the contract might still be revised a few times before the lock is held.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Drop the offset para... | null |
SiaFoundation__renterd__1478 | SiaFoundation/renterd | 1,478 | defect | ad55e35a2636f4948a10614147e75cb72ae3fc50 | 5d35cb056c9ad1c0ed0ad3f8f6a910af251ef48c | Remove some deprecated code and address some v2 API changes | This PR removes configuration and endpoints that we have considered deprecated for V2.
It also updates the `/wallet` endpoints to mostly match `hostd`s. The endpoints are the same but sometimes we return more info.
This will need to remain a Draft until we get some other endpoints migrated to the bus. | diff --git a/api/multipart.go b/api/multipart.go
index ecd19789f..04417963f 100644
--- a/api/multipart.go
+++ b/api/multipart.go
@@ -51,10 +51,9 @@ type (
}
CreateMultipartOptions struct {
- GenerateKey bool
- Key *object.EncryptionKey
- MimeType string
- Metadata ObjectUserMetadata
+ DisableCl... | 1 | 1 | 0 | [{"id": "G0", "claim": "The deprecated fields this PR removes are still documented in README.md, so the README should be updated (e.g. by merging in #1504 or dev).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
SiaFoundation__renterd__1491 | SiaFoundation/renterd | 1,491 | defect | b9ec53024af396d0d265566da336be8ba4a3680b | 22dbe2f200a4d52b72e5297ed6db3ad8981b154d | Convert NS timestamps to MS | - Converts our NS timestamps to MS
- Converts our NS durations to MS
- Drops the unused performance metrics table
Closes https://github.com/SiaFoundation/renterd/issues/1365 | diff --git a/api/metrics.go b/api/metrics.go
index 98c6f06b0..763b8c473 100644
--- a/api/metrics.go
+++ b/api/metrics.go
@@ -50,14 +50,6 @@ type (
Reason string
}
- PerformanceMetric struct {
- Action string `json:"action"`
- HostKey types.PublicKey `json:"hostKey"`
- Origin string ... | 1 | 1 | 1 | [{"id": "G0", "claim": "The new 00017_unix_ms migration calls performMigration with identifier \"00016_unix_ms\", which does not match the migration ID \"00017_unix_ms\".", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}] | null |
SiaFoundation__renterd__1502 | SiaFoundation/renterd | 1,502 | defect | 128fe18a168dc184c5ce2b2e436f6e028104a7f4 | 7fd0986df007c715876cad7848f93a475da59422 | Add explorer section to config | This PR adds an `Explorer` section to the `renterd` config.
Fixes https://github.com/SiaFoundation/renterd/issues/1426 | diff --git a/README.md b/README.md
index c20749935..d5b2ae3ad 100644
--- a/README.md
+++ b/README.md
@@ -103,6 +103,8 @@ overview of all settings configurable through the CLI.
| `S3.HostBucketBases` | Enables bucket rewriting in the router for the provided bases | - | `--s3.hostB... | 7 | 7 | 1 | [{"id": "G0", "claim": "The `Enabled` field on the price pin settings is redundant now that pinning is driven by the explorer and by whether any value is pinned, and should be dropped or replaced by a method that checks whether any value is pinned at all.", "category": "design", "verdict": "supported", "priority": "P1"... | null |
SiaFoundation__renterd__1503 | SiaFoundation/renterd | 1,503 | defect | 4fa4e10dec058ab6049f9af105f25eab5f543518 | 8240c47f5ecdacb5d169b4c197a67c6962fe103c | Update SetContractSet to UpdateContractSet | Closes https://github.com/SiaFoundation/renterd/issues/1497 | diff --git a/api/bus.go b/api/bus.go
index 93c359ce5..3b73469e3 100644
--- a/api/bus.go
+++ b/api/bus.go
@@ -66,4 +66,9 @@ type (
Network string `json:"network"`
BuildState
}
+
+ ContractSetUpdateRequest struct {
+ ToAdd []types.FileContractID `json:"toAdd"`
+ ToRemove []types.FileContractID `json:"... | 4 | 3 | 0 | [{"id": "G0", "claim": "The contractor should compute toAdd as the contracts in the new set that are not in the old set (and toRemove as the old contracts absent from the new set) rather than passing the whole new set as the contracts to add, which the reviewer considered more correct.", "category": "correctness", "ver... | null |
SiaFoundation__renterd__1508 | SiaFoundation/renterd | 1,508 | defect | 1233d54aed59083834332b3831fbc47960fd5fcd | 197e691f5a33e930af76735b30a29e1222a08db2 | Remove host endpoints from autopilot | This PR removes `/host` and `/hosts` from the autopilot route | diff --git a/api/host.go b/api/host.go
index a8d7a40e4..0422c2bee 100644
--- a/api/host.go
+++ b/api/host.go
@@ -22,10 +22,82 @@ const (
UsabilityFilterModeUnusable = "unusable"
)
+var validHostSortBy = map[string]any{
+ // price table
+ "price_table.uid": nil,
+ "price_table.validity": ... | 5 | 4 | 2 | [{"id": "G0", "claim": "The route should also add an ErrInvalidHostSortDir error for consistency between error messages in the same route.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Exposing this many host sort options seems excessive and sh... | null |
SiaFoundation__renterd__1513 | SiaFoundation/renterd | 1,513 | defect | 128fe18a168dc184c5ce2b2e436f6e028104a7f4 | 71d9bbbd06057ac0821b9d0a35748308099b7bca | Add util to send http request | Small util to unify response handling. I was on the fence on whether to keep behaviour consistent (in some places, like webhooks and events), but ultimately decided to handle all requests the same. | diff --git a/bus/client/client.go b/bus/client/client.go
index b082e5d9e..dd04f6664 100644
--- a/bus/client/client.go
+++ b/bus/client/client.go
@@ -1,13 +1,11 @@
package client
import (
- "encoding/json"
- "errors"
- "io"
"net/http"
"go.sia.tech/jape"
"go.sia.tech/renterd/api"
+ "go.sia.tech/renterd/intern... | 2 | 1 | 0 | [{"id": "G0", "claim": "The helper should be named `DoRequest` (or otherwise relate it to the `Do` method on the client) instead of `SendRequest`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "SendRequest's statusCode return value appears unuse... | null |
SiaFoundation__renterd__1521 | SiaFoundation/renterd | 1,521 | defect | c5554a5c0e8a3d1b1a836e9b6f9c6c65beb34abf | 7b1756056da39366c6a907410fa57926f3d2b195 | Replace s3 clients in testing with s3TestClient | Closes https://github.com/SiaFoundation/renterd/issues/1501
This actually highlighted some bugs in our S3 backend. GetObject wasn't returning the metadata of an object and authentication failed with the official client even if the bucket policy allowed public access.
It also made me realize that there is a `x-amz... | diff --git a/go.mod b/go.mod
index 908c20ad3..4fd1cf1bd 100644
--- a/go.mod
+++ b/go.mod
@@ -10,7 +10,6 @@ require (
github.com/gotd/contrib v0.20.0
github.com/klauspost/reedsolomon v1.12.3
github.com/mattn/go-sqlite3 v1.14.23
- github.com/minio/minio-go/v7 v7.0.76
github.com/montanaflynn/stats v0.7.1
github.... | 2 | 1 | 0 | [{"id": "G0", "claim": "Prepend the `http://` scheme where `s3Addr` is defined instead of formatting it into the endpoint at the s3aws client call site.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "CompleteMultipartUpload may panic dereferenci... | null |
SiaFoundation__renterd__1525 | SiaFoundation/renterd | 1,525 | defect | e7ad132b9077a9e049338aa42a0691cfb9a8c06a | 8d88ab8d03ee54bd7ef5ffeb04d057b0a28f1203 | Prometheus encoding | Continuation of https://github.com/SiaFoundation/renterd/pull/1068
Addressed some of the concerns in the reviews:
- Move `PrometheusMetric` method to original type where possible
- Move `writeResponse` logic to api package
- Improve handling slices of Prometheus marshallable types
- Disable type checking in `jap... | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 6aee772274..482e3e7798 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -25,6 +25,8 @@ jobs:
autopilot
bus bus/client
worker worker/client
+ flags: |
+ -japech... | 20 | 17 | 5 | [{"id": "G0", "claim": "There should be a blank line between the function declarations in api/prometheus.go, since consecutive functions currently run together.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The inline boolean-to-float function ... | null |
SiaFoundation__renterd__1541 | SiaFoundation/renterd | 1,541 | defect | ee2b63e3aff299838f8e0fc9db300b618c6dacfa | b465efff028989afd19bafe097763c3f38c13fd5 | Remove default bucket | Closes https://github.com/SiaFoundation/renterd/issues/1540 | diff --git a/api/bucket.go b/api/bucket.go
index 5942723bb..7329b87ad 100644
--- a/api/bucket.go
+++ b/api/bucket.go
@@ -4,10 +4,6 @@ import (
"errors"
)
-const (
- DefaultBucketName = "default"
-)
-
var (
// ErrBucketExists is returned when trying to create a bucket that already
// exists.
diff --git a/api/w... | 1 | 1 | 0 | [{"id": "G0", "claim": "Error declarations should be more consistent, e.g. ErrBucketRequired = errors.New(\"'bucket' parameter is required\"), using an 'x is required' wording with the parameter name in quotes instead of the three variations in use.", "category": "maintainability", "verdict": "supported", "priority": "... | null |
SiaFoundation__renterd__1580 | SiaFoundation/renterd | 1,580 | defect | ccf2c9e5723326037531233b238aaa55b337dc83 | dd500bf39a642ed07ea8abfc4f4b60d468d6ce88 | Add backup endpoint for SQLite renters | Closes https://github.com/SiaFoundation/renterd/issues/1550
Adds:
- endpoint to back up sqlite database to a file
- cli cmd to back up a sqlite database | diff --git a/api/bus.go b/api/bus.go
index 3b73469e3..cf2552b03 100644
--- a/api/bus.go
+++ b/api/bus.go
@@ -10,6 +10,8 @@ import (
var (
ErrMarkerNotFound = errors.New("marker not found")
ErrMaxFundAmountExceeded = errors.New("renewal exceeds max fund amount")
+ ErrInvalidDatabase = errors.New("inval... | 5 | 2 | 0 | [{"id": "G0", "claim": "The new backup endpoint's naming is inconsistent: the route `POST /system/database/backup` matches neither hostd's `/system/sqlite3/backup` convention nor the handler name `postSystemSQLite3BackupHandler`, and should be renamed to be explicit about the database it backs up.", "category": "design... | null |
SiaFoundation__renterd__1585 | SiaFoundation/renterd | 1,585 | defect | 9e0643cf7afbe87bd798c6ce90261a5390520182 | 5d3390af90c08f2b56a337ac3a212f431f33315b | Fix scan error when fetching archived contracts | This PR fixes a scan error when fetching contracts using the new filter mode `api.ContractFilterModeArchived`.
Related https://github.com/SiaFoundation/renterd/issues/1545 | diff --git a/stores/metadata_test.go b/stores/metadata_test.go
index 29c655de0..901d80619 100644
--- a/stores/metadata_test.go
+++ b/stores/metadata_test.go
@@ -3867,6 +3867,20 @@ func TestRenewedContract(t *testing.T) {
} else if cs[0].ID != fcidR {
t.Fatal("unexpected contract", cs[0])
}
+
+ // archive the ren... | 1 | 1 | 0 | [{"id": "G0", "claim": "Suggests that a plain *int64 would also work for ContractRow.HostID instead of introducing a new NullableInt64 type.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
SiaFoundation__renterd__1586 | SiaFoundation/renterd | 1,586 | defect | 1744b9d6d84c8ca27ae9052b1e20263b8c82878d | f22c55c840e94a09b61d319755e4748e6b5ae09c | Archive v1 contracts if blockheight is passed V2 require height | NOTE: can't write an integration test for it because the host doesn't allow renewing contracts after the V2 require height, this means that the contractor will always archive contracts because they are expired and we can't mine passed the V2 require height
Fixes https://github.com/SiaFoundation/renterd/issues/1545 | diff --git a/api/bus.go b/api/bus.go
index cb2104a85..0ee439688 100644
--- a/api/bus.go
+++ b/api/bus.go
@@ -23,11 +23,6 @@ type (
LastBlockTime TimeRFC3339 `json:"lastBlockTime"`
Synced bool `json:"synced"`
}
-
- // ConsensusNetwork holds the name of the network.
- ConsensusNetwork struct {
- Na... | 2 | 2 | 0 | [{"id": "G0", "claim": "Nothing queries contracts by the version, so the added `idx_contracts_v2` index should be avoided (dropped).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "NullableInt64 was just removed in a different PR in favour of plain *int64... | null |
SiaFoundation__renterd__1597 | SiaFoundation/renterd | 1,597 | defect | ea7682e6e3e6f1fe13f3b9786db786e23b34fea8 | d6e610274f7e68d02eee69ec74f72af89fd6009a | Remove `latest_host` column | This PR removes the `latest_host` column on the `sectors` table. It also changes how we update a slab in the bus. Instead of passing an incomplete slab (not all contract<-> sector links are defined) and adding the missing links in the database, we now pass what links to add. It makes things slightly more correct and cl... | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index e40df6930..b7b93efe2 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -25,13 +25,17 @@ jobs:
packages: write
steps:
- uses: actions/checkout@v4
- - uses: docker/setup-qemu-action@v3
... | 4 | 4 | 2 | [{"id": "G0", "claim": "The UpdateSlab endpoint's handling of contract links is questionable: merging the existing and uploaded contracts may not be more correct than the current behaviour, and it would be simpler to change the endpoint to just add the given contracts to the slab.", "category": "design", "verdict": "su... | null |
SiaFoundation__renterd__1606 | SiaFoundation/renterd | 1,606 | defect | 7e603553eb9f5d064dfb0242749c8128522c1055 | de2f0189d5ecc16a59c86b6309f518d138c25b9f | Ensure the download algorithm exhausts all hosts that have the sector | This PR alters the download algorithm in a way we try and download the sector from all hosts it's on, not just the latest host, which is a field we'll be removing in https://github.com/SiaFoundation/renterd/pull/1597 | diff --git a/internal/test/e2e/cluster.go b/internal/test/e2e/cluster.go
index a5d17d97b..4860cd305 100644
--- a/internal/test/e2e/cluster.go
+++ b/internal/test/e2e/cluster.go
@@ -245,7 +245,7 @@ func newTestCluster(t *testing.T, opts testClusterOptions) *TestCluster {
tt := test.NewTT(t)
// Ensure we don't hang... | 6 | 4 | 2 | [{"id": "G0", "claim": "A one-minute timeout for setting up the test cluster is too short — if a test cluster hangs for a minute something is very wrong, so the timeout this PR raised to five minutes should stay raised.", "category": "testing", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G... | null |
SiaFoundation__renterd__1619 | SiaFoundation/renterd | 1,619 | defect | 609d9c36d2906d64eed0be418bc53e7853788dd0 | 81936c75da1a644809684e3a9330089cf670d269 | Remove allowance from configuration | Closes https://github.com/SiaFoundation/renterd/issues/1623
This PR gets rid of the `Allowance` and instead allows users to set the amount of funds to put into new contracts. One side effect of this is the change to price scoring that now uses the gouging settings to determine the score of a host.
The closer the... | diff --git a/api/autopilot.go b/api/autopilot.go
index 1dca769a1..402f2e584 100644
--- a/api/autopilot.go
+++ b/api/autopilot.go
@@ -43,15 +43,15 @@ type (
// ContractsConfig contains all contract settings used in the autopilot.
ContractsConfig struct {
- Set string `json:"set"`
- Amount ui... | 3 | 3 | 3 | [{"id": "G0", "claim": "The initialFunding SQL migrations added by this PR still need to be hooked up, and that should happen once the earlier PRs that also add migrations are merged.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The low-balance al... | null |
SiaFoundation__renterd__1620 | SiaFoundation/renterd | 1,620 | defect | 4292d08973bb79eddc638b97bf48aeaf64fe869a | 91a63b622f05ea470a53fed0d3a912279e5171a2 | Hotfix rename objects | This PR fixes a bug we have in renaming objects by scoping directories to a bucket. This obviously has numerous side-effects that we have to deal with but the upside is that it sets us up for directory metadata along the line. It's lengthy for a hotfix for sure. Definitely don't like that. | diff --git a/internal/gouging/gouging.go b/internal/gouging/gouging.go
index 28387de18..d51c9f460 100644
--- a/internal/gouging/gouging.go
+++ b/internal/gouging/gouging.go
@@ -158,7 +158,7 @@ func checkPriceGougingHS(gs api.GougingSettings, hs *rhpv2.HostSettings) error {
// TODO: if we ever stop assuming that certai... | 11 | 8 | 4 | [{"id": "G0", "claim": "Either remove the now-unused txnFee parameter from checkPriceGougingPT entirely, or leave the signature untouched and remove the argument in a follow-up PR, rather than blanking it to _ in this hotfix.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id... | null |
SiaFoundation__renterd__1641 | SiaFoundation/renterd | 1,641 | defect | a935178e3f366d6f43e61aa6dd215bb0eff0d5ff | 9a162893cca95cc4bf7b36b0b5c585549cd20c19 | Remove /contracts endpoint on worker and replace it with a /latestrevision endpoint on the bus | Closes https://github.com/SiaFoundation/renterd/issues/1634 | diff --git a/api/autopilot.go b/api/autopilot.go
index f96e79fbb..26dc74a82 100644
--- a/api/autopilot.go
+++ b/api/autopilot.go
@@ -3,7 +3,6 @@ package api
import (
"errors"
"fmt"
- "sort"
"go.sia.tech/core/types"
"go.sia.tech/renterd/internal/utils"
@@ -137,14 +136,3 @@ func (c AutopilotConfig) Validate() ... | 2 | 2 | 0 | [{"id": "G0", "claim": "The bus route '/contract/:id/latestrevision' should be renamed because 'latest' is implied, e.g. to 'contract/:id/:revision'.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The Bus interface method LatestRevision would be better n... | null |
SiaFoundation__renterd__1643 | SiaFoundation/renterd | 1,643 | defect | 45abf519bf2475f6987b513ea5a2e37e81f6a1e5 | 7c678279bc3bdabf480932d6a51b1e72900fa318 | Add usable hosts endpoint | Partially implements https://github.com/SiaFoundation/renterd/issues/1642, I'm doing the second part in another PR because it touches on quite a lot of parts. | diff --git a/api/host.go b/api/host.go
index 66e974a8b..f5056d89c 100644
--- a/api/host.go
+++ b/api/host.go
@@ -102,6 +102,11 @@ type (
MaxLastScan TimeRFC3339
Offset int
}
+
+ UsableHostOptions struct {
+ Limit int
+ Offset int
+ }
)
type (
@@ -121,6 +126,11 @@ type (
Subnets ... | 3 | 3 | 1 | [{"id": "G0", "claim": "Call the new usable-hosts endpoint in an integration test to make sure one usable host is returned for every contract, and in a gouging integration test to make sure gouging hosts are not returned.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": ... | null |
SiaFoundation__renterd__1660 | SiaFoundation/renterd | 1,660 | defect | c3c5654d97cf349647251f2503133d78f9d7b0b4 | a0812029614ca4160d870a387a1593180e42cbac | Add `usability` column to `contracts` table | This PR adds a `usability` column to the `contracts` table. This is the first in a series of PRs that removes the notion of a contract set and replaces it with an indication the contract is good for renewal and thus can be used for uploading and downloading. It's an enum to ensure we can extend it without requiring a m... | diff --git a/api/contract.go b/api/contract.go
index 9d0dde1dd..66281fe5d 100644
--- a/api/contract.go
+++ b/api/contract.go
@@ -16,6 +16,12 @@ const (
ContractStateFailed = "failed"
)
+const (
+ ContractUsabilityInvalid = "invalid"
+ ContractUsabilityBad = "bad"
+ ContractUsabilityGoodForRenew = "... | 2 | 2 | 0 | [{"id": "G0", "claim": "The constant should be named `ContractUsabilityGood` instead of `ContractUsabilityGoodForRenew`, since 'GoodFor' suggests a restriction and more values can be added later if needed.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "T... | null |
SiaFoundation__renterd__1661 | SiaFoundation/renterd | 1,661 | defect | 4b0f42a3d24f8ff20d6e9b517c5f63db84558e21 | 419c34bfb4b508e2739a8d0febd6ee27288dcb04 | Simplify sectors cache by removing FileContract association | Another PR that will eventually help with moving the uploader into its own package by moving the `ObjectStore` further up the stack, out of the `uploader`.
This should also make pruning a bit more robust when it comes to renewals. | diff --git a/api/contract.go b/api/contract.go
index 9d0dde1dd..fd7451802 100644
--- a/api/contract.go
+++ b/api/contract.go
@@ -171,8 +171,7 @@ type (
// ContractRootsResponse is the response type for the /contract/:id/roots
// endpoint.
ContractRootsResponse struct {
- Roots []types.Hash256 `json:"roots"`
... | 2 | 2 | 0 | [{"id": "G0", "claim": "The /contract/:id/roots endpoint should return the roots slice directly instead of wrapping it in the ContractRootsResponse struct.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The /upload/:id/sectors endpoint should not use the... | null |
SiaFoundation__renterd__1670 | SiaFoundation/renterd | 1,670 | defect | e98388df44b0396e363aca4ea5eac8f940ea2915 | 637eac8cbfa1b0c370de9395b37adad31d07f250 | Add support for recording V2 scans and use V2 settings for gouging | This PR gets `renterd` to a point where it scans announced v2 hosts, checks their usability/gouging and finally tries to form contracts which fails since we don't have support for that yet.
Depends on https://github.com/SiaFoundation/renterd/pull/1669
Closes https://github.com/SiaFoundation/renterd/issues/1674
C... | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index ec01b88688..13ea0cd22c 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -61,8 +61,54 @@ jobs:
with:
go-test-args: "-race;-timeout=20m;-tags=netgo"
+ test-sqlite-v2: # Run all tests against SQLite... | 5 | 4 | 0 | [{"id": "G0", "claim": "The per-byte price variables dppb, uppb and sppb in hostScore have names that don't say what they stand for.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The V2HostSettings.Scan error message says 'V2Settings' and shoul... | null |
SiaFoundation__renterd__1680 | SiaFoundation/renterd | 1,680 | defect | 7f65605a0298dbcddfd05fe3e1eb39d911a803fb | 55e5ce0f4256d5f5ce65b3288d70c0e4153eb28f | Implement rhp4 contract formation |
Depends on https://github.com/SiaFoundation/renterd/pull/1670
Closes https://github.com/SiaFoundation/renterd/issues/1544 | diff --git a/api/contract.go b/api/contract.go
index 3ffd80f5b..6f9e86264 100644
--- a/api/contract.go
+++ b/api/contract.go
@@ -132,7 +132,6 @@ type (
EndHeight uint64 `json:"endHeight"`
HostCollateral types.Currency `json:"hostCollateral"`
HostKey types.PublicKey `json:"hostKey"`
- Hos... | 2 | 1 | 1 | [{"id": "G0", "claim": "The pull request still lacks the tests needed to close issue #1546 (tests for performV2ContractMigration), which the author says will be added in a separate PR once v2 migrations are working.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", ... | null |
SiaFoundation__renterd__1692 | SiaFoundation/renterd | 1,692 | defect | 4d43e62a3dafa7dee5eddf2e2681cee933b16495 | 5645408892e8cac09bd8f3b85ff2af5e170b443a | Remove unnecessary autopilot config | This PR removes the current period and the allow redundant IP config.
@ChrisSchinnerl this is where I would draw the line as far as removing contract sets goes, there are outstanding tasks in the issue referenced below but I feel tackling all of those would bloat the feature branch too much
Relates to https://gi... | diff --git a/.changeset/remove_current_period.md b/.changeset/remove_current_period.md
new file mode 100644
index 000000000..d567c9a8e
--- /dev/null
+++ b/.changeset/remove_current_period.md
@@ -0,0 +1,5 @@
+---
+default: minor
+---
+
+# Remove current period
diff --git a/.changeset/remove_hosts_allowredundantips_confi... | 4 | 4 | 1 | [{"id": "G0", "claim": "EndHeight's math is incorrect now because it always returns the same end height for a given config.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The allowRedundantIps setting should live in the config.Autopilot struct rathe... | null |
SiaFoundation__renterd__1693 | SiaFoundation/renterd | 1,693 | defect | 51e2bbfee54c159ac1e2bc562cb2f9dc9ef37f99 | 4a1b40dd25026ed9b35d8c3704af7bc093cfc2d3 | Implement RHP4 contract renewal and account funding | Closes https://github.com/SiaFoundation/renterd/issues/1547 | diff --git a/api/host.go b/api/host.go
index 436870133..ff09443ac 100644
--- a/api/host.go
+++ b/api/host.go
@@ -206,6 +206,14 @@ func (hc HostCheck) MarshalJSON() ([]byte, error) {
})
}
+func (h Host) Info() HostInfo {
+ return HostInfo{
+ PublicKey: h.PublicKey,
+ SiamuxAddr: h.Settings.SiamuxAd... | 3 | 1 | 0 | [{"id": "G0", "claim": "Pass the host into the storage-estimation helpers instead of keeping a separate V2 counterpart for everything, since the parameters are virtually identical if the host is passed.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Flip t... | null |
SiaFoundation__renterd__1698 | SiaFoundation/renterd | 1,698 | defect | ce4b79d93653a658ad1129469fc63dd32e97b039 | e383eb72499d49e5b99305880c97ca67b19fadeb | Add support for broadcasting v2 contract revisions | Closes https://github.com/SiaFoundation/renterd/issues/1543
Getting this working also required a change to our contract element tracking. Broadcasting the revision the first time worked, but the second time failed since we didn't update the contract element using the one encountered on-chain.
The relevant v2 test... | diff --git a/autopilot/contractor/contractor.go b/autopilot/contractor/contractor.go
index 060aa5c97..879a408e6 100644
--- a/autopilot/contractor/contractor.go
+++ b/autopilot/contractor/contractor.go
@@ -783,7 +783,7 @@ func renterFundsToExpectedStorage(renterFunds types.Currency, duration uint64, p
// renterFundsToE... | 4 | 2 | 0 | [{"id": "G0", "claim": "Tracking and updating reverted v2 file contract elements on revert may be redundant, since a block should be applied whenever one is reverted so the element would be overridden anyway.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "... | null |
SiaFoundation__renterd__1701 | SiaFoundation/renterd | 1,701 | defect | 51e2bbfee54c159ac1e2bc562cb2f9dc9ef37f99 | b23add6f10ff7d3bfbaa082dafa327c7fb63a285 | Add worker prices cache for v2 prices | This adds a `pricesCache` which is the same as the `priceTables` but a bit simpler due to RHP4.
This PR also removes the `hm` and `hs` fields from the old type to remove a circular dependency between the host using the price tables and the price table fetching themselves.
This PR is a requirement for being able to... | diff --git a/api/host.go b/api/host.go
index 4368701335..ff09443ac4 100644
--- a/api/host.go
+++ b/api/host.go
@@ -206,6 +206,14 @@ func (hc HostCheck) MarshalJSON() ([]byte, error) {
})
}
+func (h Host) Info() HostInfo {
+ return HostInfo{
+ PublicKey: h.PublicKey,
+ SiamuxAddr: h.Settings.Siamux... | 5 | 4 | 2 | [{"id": "G0", "claim": "The price-table implementations the PR adds under worker/ should be moved to the internal package.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The thread that updates the price table never sets the cost it returns, so callers w... | null |
SiaFoundation__renterd__1711 | SiaFoundation/renterd | 1,711 | defect | c2fc5f2c6a6ddae36d34e5be38411caf44892257 | 641e63ebffc6d3586c85a3b381d06d38a1507717 | Implement support for pruning using RHP4 | Closes https://github.com/SiaFoundation/renterd/issues/1676 | diff --git a/.changeset/implement_support_for_pruning_using_rhp4.md b/.changeset/implement_support_for_pruning_using_rhp4.md
new file mode 100644
index 000000000..2adfb8043
--- /dev/null
+++ b/.changeset/implement_support_for_pruning_using_rhp4.md
@@ -0,0 +1,9 @@
+---
+default: minor
+---
+
+# Implement support for pru... | 2 | 1 | 0 | [{"id": "G0", "claim": "Follow up with a PR that makes the rhp import aliases consistent across the whole codebase and then stick to those aliases.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "Free the prunable sectors in a loop in pruneCont... | null |
SiaFoundation__renterd__1712 | SiaFoundation/renterd | 1,712 | defect | a81b79c9d798bf153eaf111e90f238e16ac9090d | 21479c1cdbdc130c9750967d7a1918368362c38d | Remove HostIP and SiamuxAddr from ContractMetadata | Implement https://github.com/SiaFoundation/renterd/issues/1691 | diff --git a/api/contract.go b/api/contract.go
index efa21ffaf2..02fd1bbd6f 100644
--- a/api/contract.go
+++ b/api/contract.go
@@ -65,10 +65,6 @@ type (
InitialRenterFunds types.Currency `json:"initialRenterFunds"`
Spending ContractSpending `json:"spending"`
- // following fields are decorated
- H... | 6 | 3 | 0 | [{"id": "G0", "claim": "The handler that calls renewContractV1 already has the host and can pass it in (renewContractV2 also requires the host), instead of renewContractV1 fetching the host from the store itself.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cla... | null |
SiaFoundation__renterd__1714 | SiaFoundation/renterd | 1,714 | defect | 50c650a896c2ecef43f9d4dbaad84cedd3282c7f | fda947ce8e23206afe518d7656169f1ff7a32d67 | Treat max drift as a rate rather than an absolute limit | This changes the max drift to be allowed to reset at a certain spending rate. Fixing issues with inaccurate accounting due to v3 pricing while still protecting renters from malicious hosts. | diff --git a/internal/worker/accounts.go b/internal/worker/accounts.go
index 8a0b27d9f..9a207ab6e 100644
--- a/internal/worker/accounts.go
+++ b/internal/worker/accounts.go
@@ -15,6 +15,7 @@ import (
rhp3 "go.sia.tech/renterd/internal/rhp/v3"
"go.sia.tech/renterd/internal/utils"
"go.uber.org/zap"
+ "golang.org/x/... | 1 | 1 | 0 | [{"id": "G0", "claim": "The maxNegDrift limit of 10 SC might be able to be lower, around 4 SC - 5 SC.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.