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

Fix issue when creating GSI with global_keys_only #1162

Merged

Conversation

tremble
Copy link
Contributor

@tremble tremble commented May 25, 2022

SUMMARY

fixes: #967

Undocumented requirement on NonKeyAttributes that it should be omitted rather than an empty list.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

dynamodb_table

ADDITIONAL INFORMATION
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: Invalid length for parameter GlobalSecondaryIndexUpdates[0].Create.Projection.NonKeyAttributes, value: 0, valid min length: 1
fatal: [localhost]: FAILED! => {"boto3_version": "1.18.47", "botocore_version": "1.21.47", "changed": false, "msg": "Failed to update table: Parameter validation failed:\nInvalid length for parameter GlobalSecondaryIndexUpdates[0].Create.Projection.NonKeyAttributes, value: 0, valid min length: 1"}

@ansibullbot
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review has_issue integration tests/integration module module needs_triage plugins plugin (any type) tests tests traceback labels May 25, 2022
@softwarefactory-project-zuul

This comment was marked as outdated.

@tremble tremble added backport-2 PR should be backported to the stable-2 branch backport-3 PR should be backported to the stable-3 branch labels May 25, 2022
@softwarefactory-project-zuul

This comment was marked as outdated.

@markuman
Copy link
Member

recheck

@markuman
Copy link
Member

hm weird ci error

@softwarefactory-project-zuul

This comment was marked as resolved.

@softwarefactory-project-zuul

This comment was marked as resolved.

@softwarefactory-project-zuul

This comment was marked as resolved.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

ansible-galaxy-importer FAILURE in 3m 49s (non-voting)
✔️ build-ansible-collection SUCCESS in 4m 53s
✔️ ansible-test-sanity-docker-devel SUCCESS in 11m 44s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 9m 07s
✔️ ansible-test-sanity-docker-stable-2.9 SUCCESS in 11m 37s
✔️ ansible-test-sanity-docker-stable-2.11 SUCCESS in 10m 49s
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 33s
✔️ ansible-test-units-community-aws-python38 SUCCESS in 7m 59s
✔️ ansible-test-splitter SUCCESS in 2m 27s
✔️ integration-community.aws-1 SUCCESS in 29m 16s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED

@tremble tremble requested a review from markuman May 26, 2022 07:17
@tremble tremble added the mergeit Merge the PR (SoftwareFactory) label May 26, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

ansible-galaxy-importer FAILURE in 4m 09s (non-voting)
✔️ build-ansible-collection SUCCESS in 5m 05s
✔️ ansible-test-sanity-docker-devel SUCCESS in 9m 27s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 10m 54s
✔️ ansible-test-sanity-docker-stable-2.9 SUCCESS in 13m 13s
✔️ ansible-test-sanity-docker-stable-2.11 SUCCESS in 13m 17s
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 9m 28s
✔️ ansible-test-units-community-aws-python38 SUCCESS in 7m 22s
✔️ ansible-test-splitter SUCCESS in 2m 42s
✔️ integration-community.aws-1 SUCCESS in 27m 09s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 690e250 into ansible-collections:main May 26, 2022
@patchback
Copy link

patchback bot commented May 26, 2022

Backport to stable-2: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply 690e250 on top of patchback/backports/stable-2/690e250ac138ab80285de931b9a5acdaa1bd4c03/pr-1162

Backporting merged PR #1162 into main

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/ansible-collections/community.aws.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/stable-2/690e250ac138ab80285de931b9a5acdaa1bd4c03/pr-1162 upstream/stable-2
  4. Now, cherry-pick PR Fix issue when creating GSI with global_keys_only #1162 contents into that branch:
    $ git cherry-pick -x 690e250ac138ab80285de931b9a5acdaa1bd4c03
    If it'll yell at you with something like fatal: Commit 690e250ac138ab80285de931b9a5acdaa1bd4c03 is a merge but no -m option was given., add -m 1 as follows intead:
    $ git cherry-pick -m1 -x 690e250ac138ab80285de931b9a5acdaa1bd4c03
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR Fix issue when creating GSI with global_keys_only #1162 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/stable-2/690e250ac138ab80285de931b9a5acdaa1bd4c03/pr-1162
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback
Copy link

patchback bot commented May 26, 2022

Backport to stable-3: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-3/690e250ac138ab80285de931b9a5acdaa1bd4c03/pr-1162

Backported as #1169

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request May 26, 2022
Fix issue when creating GSI with global_keys_only

SUMMARY
fixes: #967
Undocumented requirement on NonKeyAttributes that it should be omitted rather than an empty list.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
dynamodb_table
ADDITIONAL INFORMATION
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: Invalid length for parameter GlobalSecondaryIndexUpdates[0].Create.Projection.NonKeyAttributes, value: 0, valid min length: 1
fatal: [localhost]: FAILED! => {"boto3_version": "1.18.47", "botocore_version": "1.21.47", "changed": false, "msg": "Failed to update table: Parameter validation failed:\nInvalid length for parameter GlobalSecondaryIndexUpdates[0].Create.Projection.NonKeyAttributes, value: 0, valid min length: 1"}

Reviewed-by: Markus Bergholz <[email protected]>
(cherry picked from commit 690e250)
@github-actions
Copy link

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

softwarefactory-project-zuul bot pushed a commit that referenced this pull request May 26, 2022
[PR #1162/690e250a backport][stable-3] Fix issue when creating GSI with global_keys_only

This is a backport of PR #1162 as merged into main (690e250).
SUMMARY
fixes: #967
Undocumented requirement on NonKeyAttributes that it should be omitted rather than an empty list.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
dynamodb_table
ADDITIONAL INFORMATION
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: Invalid length for parameter GlobalSecondaryIndexUpdates[0].Create.Projection.NonKeyAttributes, value: 0, valid min length: 1
fatal: [localhost]: FAILED! => {"boto3_version": "1.18.47", "botocore_version": "1.21.47", "changed": false, "msg": "Failed to update table: Parameter validation failed:\nInvalid length for parameter GlobalSecondaryIndexUpdates[0].Create.Projection.NonKeyAttributes, value: 0, valid min length: 1"}

Reviewed-by: Markus Bergholz <[email protected]>
@tremble tremble deleted the issues/967 branch July 7, 2022 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-2 PR should be backported to the stable-2 branch backport-3 PR should be backported to the stable-3 branch bug This issue/PR relates to a bug community_review has_issue integration tests/integration mergeit Merge the PR (SoftwareFactory) module module plugins plugin (any type) tests tests traceback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error creating GSI with global_keys_only
3 participants