Skip to content

Commit

Permalink
Merge branch 'master' of github.com:quiltdata/quilt into package-handle
Browse files Browse the repository at this point in the history
  • Loading branch information
fiskus committed Aug 24, 2021
2 parents c40bdab + 58bec27 commit 4f49f7c
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Expand Up @@ -63,7 +63,7 @@ jobs:
- run:
name: Install dependencies
command: |
pip install 'pylint' 'pycodestyle>=2.6.0a1'
pip install 'pylint==2.9' 'pycodestyle>=2.6.0a1'
- run:
name: Run pylint
command: |
Expand Down
2 changes: 1 addition & 1 deletion api/python/tests/requirements.txt
@@ -1,3 +1,3 @@
pytest==5.0.1
responses
pylint
pylint==2.9
2 changes: 2 additions & 0 deletions catalog/app/utils/GraphQL.tsx
Expand Up @@ -51,6 +51,7 @@ export function GraphQLProvider({ children }: React.PropsWithChildren<{}>) {
Mutation: {
bucketAdd: (result, _vars, cache) => {
if ((result.bucketAdd as any)?.__typename !== 'BucketAddSuccess') return
cache.invalidate({ __typename: 'Query' }, 'roles')
cache.updateQuery(
{ query: BUCKET_CONFIGS_QUERY },
// XXX: sort?
Expand All @@ -62,6 +63,7 @@ export function GraphQLProvider({ children }: React.PropsWithChildren<{}>) {
bucketRemove: (result, vars, cache) => {
if ((result.bucketRemove as any)?.__typename !== 'BucketRemoveSuccess')
return
cache.invalidate({ __typename: 'Query' }, 'roles')
cache.updateQuery(
{ query: BUCKET_CONFIGS_QUERY },
R.evolve({ bucketConfigs: R.reject(R.propEq('name', vars.name)) }),
Expand Down
Expand Up @@ -3,7 +3,19 @@ import { useDebounce } from 'use-debounce'

import usePrevious from 'utils/usePrevious'

export default function useDebouncedInput(init, timeout = 500) {
export interface DebouncedInput<V> {
input: {
value: V
onChange: (e: { target: { value: V } }) => void
}
value: V
set: (v: V) => void
}

export function useDebouncedInput<V = unknown>(
init: V,
timeout: number = 500,
): DebouncedInput<V> {
const [value, setValue] = React.useState(init)
const [debouncedValue] = useDebounce(value, timeout)

Expand All @@ -12,7 +24,7 @@ export default function useDebouncedInput(init, timeout = 500) {
})

const onChange = React.useCallback(
(e) => {
(e: { target: { value: V } }) => {
setValue(e.target.value)
},
[setValue],
Expand All @@ -24,3 +36,5 @@ export default function useDebouncedInput(init, timeout = 500) {
set: setValue,
}
}

export default useDebouncedInput
@@ -1,7 +1,10 @@
import * as React from 'react'

export default function usePrevious(value, onChange) {
const ref = React.useRef()
export default function usePrevious<V = unknown>(
value: V,
onChange?: (prev: V | undefined) => void,
): V | undefined {
const ref = React.useRef<V>()
const prev = ref.current
ref.current = value
React.useEffect(() => {
Expand Down
6 changes: 3 additions & 3 deletions docs/API Reference/limitations.md
@@ -1,7 +1,7 @@
## Size

By design, Quilt is backed by Amazon S3 and scales to billions of objects and
petabytes of data. The underlying limitations of S3 apply.
petabytes of data. The underlying limitations of S3 apply.

The Quilt catalog can browse packages and S3 buckets of any size.

Expand All @@ -16,14 +16,14 @@ API.
------------------------------------------------------------|--------
Package manifest size (metadata) | 100 MB
Package size (data; via promotion or from an S3 directory) | 10 GB
Maximum mumber of files per push | 5,000
Maximum number of files per push | 5,000


### API

As of this writing, with sufficient client-side memory, you can comfortable scale
Quilt packages to at least one million objects per package, with no practical limit
on object size (save S3's 5 TB per object limit). A fast network, or better yet an AWS
on object size (save S3's 5 TB per object limit). A fast network, or better yet an AWS
compute instance in the same region as your Quilt S3 buckets, is recommended.

### Metadata
Expand Down

0 comments on commit 4f49f7c

Please sign in to comment.