Skip to content

Fixup error handling during saved object imports #738

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

Merged
merged 3 commits into from
Sep 3, 2024

Conversation

tobio
Copy link
Member

@tobio tobio commented Sep 1, 2024

Fixes #702

This PR:

  • Updates the error model to fix the provider panic in the linked issue
  • Updates the error handling to log a warning if the import was partially successful, and an error if no objects were imported
  • Improves the error messaging to provide details on what failed to import

@tobio tobio requested a review from dimuon September 1, 2024 09:38
@tobio tobio self-assigned this Sep 1, 2024
@tobio tobio force-pushed the better-import-error-handling branch from a34de1b to 2a85621 Compare September 1, 2024 23:37
@dimuon
Copy link
Contributor

dimuon commented Sep 2, 2024

How much effort does it take to add/modify acc test for the root cause?

@tobio tobio merged commit b58a599 into main Sep 3, 2024
41 checks passed
@tobio tobio deleted the better-import-error-handling branch September 3, 2024 20:49
tobio added a commit to jdesnoes/terraform-provider-elasticstack that referenced this pull request Sep 11, 2024
…-data-source

* origin/main: (23 commits)
  Migrate index resource to plugin framework (elastic#698)
  Remove duplicate code (elastic#761)
  fix(deps): update module github.com/hashicorp/terraform-plugin-framework-jsontypes to v0.2.0 (elastic#760)
  fix(deps): update module github.com/golangci/golangci-lint to v1.61.0 (elastic#759)
  Add support for the`frequency` field in the Create Rule API (elastic#753)
  Prevent a provider panic when the referenced snapshot repo does not exist (elastic#758)
  remove space_id paramter from private locations (elastic#733)
  chore(deps): update dependency go to v1.23.1 (elastic#755)
  chore(deps): update docker.elastic.co/elasticsearch/elasticsearch docker tag to v8.15.1 (elastic#756)
  chore(deps): update golang:latest docker digest to 4a3c2bc (elastic#754)
  chore(deps): update docker.elastic.co/kibana/kibana docker tag to v8.15.1 (elastic#757)
  Fixup error handling during saved object imports (elastic#738)
  fix(deps): update module github.com/goreleaser/goreleaser to v2 (elastic#748)
  chore(deps): update golangci/golangci-lint-action action to v6 (elastic#746)
  chore(deps): update codecov/codecov-action action to v4 (elastic#745)
  fix(deps): update module github.com/go-resty/resty/v2 to v2.14.0 (elastic#741)
  chore(deps): update actions/setup-go action to v5 (elastic#744)
  chore(deps): update actions/checkout action to v4 (elastic#743)
  fix(deps): update module github.com/deepmap/oapi-codegen/v2 to v2.3.0 (elastic#740)
  chore(deps): update dependency go to v1.23.0 (elastic#739)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Error: failed to import saved objects - 400 Bad Request
2 participants