Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Syntax error near name and duplicate key violates constraints #343

Closed
yevgenypats opened this issue Dec 9, 2021 · 2 comments
Closed

Syntax error near name and duplicate key violates constraints #343

yevgenypats opened this issue Dec 9, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@yevgenypats
Copy link
Member

Describe the Bug

Running with assume role on multiple accounts (same creds as in tests)

5:28PM ERR failed to insert resource into db error="ERROR: syntax error at or near \"name\" (SQLSTATE 42601)" @module=aws resource_keys=["ruby2.5"] table=aws_lambda_runtimes timestamp=2021-12-09T17:28:21.380+0200
5:28PM WRN failed copy-from to db error="ERROR: duplicate key value violates unique constraint \"aws_lambda_runtimes_pk\" (SQLSTATE 23505)" @module=aws table=aws_lambda_runtimes timestamp=2021-12-09T17:28:21.386+0200
5:28PM DBG insert integrity violation error @module=aws constraint=aws_lambda_runtimes_pk errMsg="duplicate key value violates unique constraint \"aws_lambda_runtimes_pk\"" timestamp=2021-12-09T17:28:21.387+0200

Expected Behavior

CloudQuery Version

Debug Output

Steps to Reproduce

Additional Context

References

@yevgenypats yevgenypats added the bug Something isn't working label Dec 9, 2021
@bbernays
Copy link
Contributor

bbernays commented Dec 9, 2021

This isn't that bad of an error... As far as I am aware there is no difference between accounts and regions with regards to which runtimes they support... but I might be wrong... or AWS might not continue to support all runtimes in all regions.

For something like this could be add a paramter to the table to use the postgres syntax ON CONFLICT DO <NOTHING | Perform Update>

@roneli
Copy link
Contributor

roneli commented Dec 9, 2021

Fixed in #344

@roneli roneli closed this as completed Dec 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants