Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dy admin update table --mode provisioned fails if a table has an index #228

Open
StoneDot opened this issue May 14, 2024 · 0 comments
Open
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@StoneDot
Copy link
Contributor

Currently, dy admin update table --mode provisioned fails if a table has an index. The request parameter of UpdateTable API does not seem to provide a provisioned capacity for indices.

❯ dy admin admin create table test --keys pk,S sk,S --region ap-northeast-1
name: test
region: ap-northeast-1
status: CREATING
schema:
  pk: pk (S)
  sk: sk (S)
mode: OnDemand
capacity: null
gsi: null
lsi: null
stream: null
count: 0
size_bytes: 0
created_at: 2024-05-14T13:29:11+00:00

❯ dy admin use test --region ap-northeast-1
Now you're using the table 'test' (ap-northeast-1).

❯ dy admin create index idx --keys gsipk,S gsisk,S
name: test
region: ap-northeast-1
status: UPDATING
schema:
  pk: pk (S)
  sk: sk (S)
mode: OnDemand
capacity: null
gsi:
- name: idx
  schema:
    pk: gsipk (S)
    sk: gsisk (S)
  capacity: null
lsi: null
stream: null
count: 0
size_bytes: 0
created_at: 2024-05-14T13:29:11+00:00

❯ dy admin update table test --mode provisioned --rcu 5 --wcu 10
**snip**
[2024-05-14T13:36:37Z DEBUG dy::control] UpdateTable API call got an error -- Validation(
        "One or more parameter values were invalid: ProvisionedThroughput must be specified for index: idx",
    )
[2024-05-14T13:36:37Z ERROR dy::control] One or more parameter values were invalid: ProvisionedThroughput must be specified for index: idx
@StoneDot StoneDot added bug Something isn't working good first issue Good for newcomers labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant