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

r/aws_glue_trigger: handle concurrent modification exceptions #34530

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Nov 22, 2023

Description

This change will retry trigger creation when a ConcurrentModificationException is received. This can occur when multiple triggers reference a single workflow within the same configuration.

Successfully tested against the example configuration provided in the linked issue.

Relations

Closes #21759

References

Output from Acceptance Testing

% make testacc PKG=glue TESTS=TestAccGlueTrigger_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/glue/... -v -count 1 -parallel 20 -run='TestAccGlueTrigger_'  -timeout 360m

=== NAME  TestAccGlueTrigger_crawler
    trigger_test.go:71: Step 1/3 error: Error running apply: exit status 1

        Error: creating Glue Crawler (tf-acc-test-7273293400628501361): InvalidInputException: S3 bucket test_bucket does not exist.
        {
          RespMetadata: {
            StatusCode: 400,
            RequestID: "39b3cb75-eccb-4553-bd75-bb8efd7e0610"
          },
          Message_: "S3 bucket test_bucket does not exist."
        }

          with aws_glue_crawler.test,
          on terraform_plugin_test.tf line 53, in resource "aws_glue_crawler" "test":
          53: resource "aws_glue_crawler" "test" {


        Error: creating Glue Crawler (tf-acc-test-7273293400628501361crawl2): InvalidInputException: S3 bucket test_bucket does not exist.
        {
          RespMetadata: {
            StatusCode: 400,
            RequestID: "8d5bd273-f219-4021-b91b-6c5f2ccc7a5b"
          },
          Message_: "S3 bucket test_bucket does not exist."
        }

          with aws_glue_crawler.test2,
          on terraform_plugin_test.tf line 65, in resource "aws_glue_crawler" "test2":
          65: resource "aws_glue_crawler" "test2" {

--- FAIL: TestAccGlueTrigger_crawler (393.46s)
--- PASS: TestAccGlueTrigger_disappears (469.59s)
--- PASS: TestAccGlueTrigger_basic (484.02s)
--- PASS: TestAccGlueTrigger_Actions_security (521.28s)
--- PASS: TestAccGlueTrigger_startOnCreate (523.61s)
--- PASS: TestAccGlueTrigger_workflowName (527.73s)
--- PASS: TestAccGlueTrigger_description (685.51s)
--- PASS: TestAccGlueTrigger_schedule (705.29s)
--- PASS: TestAccGlueTrigger_eventBatchingCondition (725.09s)
--- PASS: TestAccGlueTrigger_predicate (766.45s)
--- PASS: TestAccGlueTrigger_Actions_notify (808.51s)
--- PASS: TestAccGlueTrigger_tags (808.53s)
--- PASS: TestAccGlueTrigger_onDemandDisable (810.73s)
--- PASS: TestAccGlueTrigger_enabled (844.14s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/glue       847.445s

Failure is unrelated to this change (cause is a broader issue affecting all crawler acceptance tests which use S3 targets, including this one which references a crawler test config).

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. service/glue Issues and PRs that pertain to the glue service. labels Nov 22, 2023
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Nov 22, 2023
This change will retry trigger creation when a ConcurrentModificationException is received. This
can occur when multiple triggers reference a single workflow within the same configuration.
@jar-b jar-b force-pushed the b-glue-trigger-concurrent-modification branch from be1219d to e812f36 Compare November 22, 2023 20:36
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

@jar-b jar-b merged commit 5144ae4 into main Nov 22, 2023
34 checks passed
@jar-b jar-b deleted the b-glue-trigger-concurrent-modification branch November 22, 2023 23:41
@github-actions github-actions bot added this to the v5.27.0 milestone Nov 22, 2023
github-actions bot pushed a commit that referenced this pull request Nov 22, 2023
Copy link

This functionality has been released in v5.27.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 28, 2023
@justinretzolk justinretzolk added the bug Addresses a defect in current functionality. label Feb 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/glue Issues and PRs that pertain to the glue service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ConcurrentModificationException when creating multiple glue triggers against a workflow at once
3 participants