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

Add coverage for AWS SQS #1988

Merged
merged 21 commits into from
Feb 20, 2023
Merged

Add coverage for AWS SQS #1988

merged 21 commits into from
Feb 20, 2023

Conversation

mtp1376
Copy link
Contributor

@mtp1376 mtp1376 commented Feb 14, 2023

Also:

  • Add normalizePolicy function and use it in policiesAreSame function
  • Use strongly-typed IAM policies across the codebase

@mtp1376 mtp1376 linked an issue Feb 14, 2023 that may be closed by this pull request
@mtp1376 mtp1376 marked this pull request as ready for review February 15, 2023 16:09
@mtp1376 mtp1376 requested review from yrobla, aguillenv, dfellis and depombo and removed request for yrobla February 15, 2023 16:09
@mtp1376 mtp1376 requested a review from yrobla February 15, 2023 17:13
src/modules/interfaces.ts Outdated Show resolved Hide resolved
@mtp1376 mtp1376 requested a review from dfellis February 16, 2023 13:17
@github-actions
Copy link
Contributor

⏳ All modules installed in: 40.864969336 seconds ⌛️
⏳ All modules uninstalled in: .879565110 seconds ⌛️

src/modules/aws_sqs/entity/queue.ts Outdated Show resolved Hide resolved
src/modules/aws_sqs/entity/queue.ts Outdated Show resolved Hide resolved
Comment on lines +5 to +10
IF (NEW.name NOT LIKE '%.fifo') AND (NEW.fifo_queue) THEN
RAISE EXCEPTION 'The name of a fifo queue should end with .fifo';
END IF;
IF (NEW.name LIKE '%.fifo') AND (NOT NEW.fifo_queue) THEN
RAISE EXCEPTION 'Non-fifo queue name should not end with .fifo';
END IF;
Copy link
Member

Choose a reason for hiding this comment

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

I understand why this is here, but wtf AWS. I am tempted to say "just auto add the .fifo prefix when needed and only ban having it explicitly in here" but that could cause confusion for other modules needing to reference this name so...

Copy link
Contributor Author

@mtp1376 mtp1376 Feb 16, 2023

Choose a reason for hiding this comment

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

AWS stuff give me 2 wtfs/hour in average. The listQueues API has a 40 seconds cache and doesn't get invalidated even in case a new queue is created. 🤦🏻

Also, about FifoQueue field the documentation says it's "true" | "false", but if you send false string it will complain and the field should be omitted.
image

And the issue is there since 2020.

@mtp1376 mtp1376 linked an issue Feb 16, 2023 that may be closed by this pull request
@mtp1376 mtp1376 requested a review from dfellis February 16, 2023 17:26
@mtp1376
Copy link
Contributor Author

mtp1376 commented Feb 17, 2023

CodeBuild project tests are failing with this error:

[Container] 2023/02/17 13:08:53 Running command docker pull ubuntu:latest
39 | Error response from daemon: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
40

@alantech alantech deleted a comment from github-actions bot Feb 17, 2023
@alantech alantech deleted a comment from github-actions bot Feb 17, 2023
@alantech alantech deleted a comment from github-actions bot Feb 17, 2023
@alantech alantech deleted a comment from github-actions bot Feb 17, 2023
@alantech alantech deleted a comment from github-actions bot Feb 17, 2023
@alantech alantech deleted a comment from github-actions bot Feb 17, 2023
@alantech alantech deleted a comment from github-actions bot Feb 17, 2023
@alantech alantech deleted a comment from github-actions bot Feb 17, 2023
@github-actions
Copy link
Contributor

⏳ All modules installed in: 46.337581369 seconds ⌛️
⏳ All modules uninstalled in: .882825423 seconds ⌛️

@github-actions
Copy link
Contributor

⏳ All modules installed in: 41.274496447 seconds ⌛️
⏳ All modules uninstalled in: .834737517 seconds ⌛️

@dfellis
Copy link
Member

dfellis commented Feb 17, 2023

mtp1376 and others added 19 commits February 20, 2023 15:59
Signed-off-by: Mohammad Teimori Pabandi <[email protected]>
Signed-off-by: Mohammad Teimori Pabandi <[email protected]>
Signed-off-by: Mohammad Teimori Pabandi <[email protected]>
Signed-off-by: Mohammad Teimori Pabandi <[email protected]>
Signed-off-by: Mohammad Teimori Pabandi <[email protected]>
Signed-off-by: Mohammad Teimori Pabandi <[email protected]>
* Add `normalizePolicy` method and use it in `policiesAreSame`

Signed-off-by: Mohammad Teimori Pabandi <[email protected]>

* Fix styling

---------

Signed-off-by: Mohammad Teimori Pabandi <[email protected]>
Signed-off-by: Mohammad Teimori Pabandi <[email protected]>
Signed-off-by: Mohammad Teimori Pabandi <[email protected]>
Signed-off-by: Mohammad Teimori Pabandi <[email protected]>
Signed-off-by: Mohammad Teimori Pabandi <[email protected]>
Signed-off-by: Mohammad Teimori Pabandi <[email protected]>
Signed-off-by: Mohammad Teimori Pabandi <[email protected]>
@mtp1376 mtp1376 force-pushed the 1969-aws_sqs-support branch from 7641659 to 9639449 Compare February 20, 2023 13:01
@github-actions
Copy link
Contributor

⏳ All modules installed in: 39.955264374 seconds ⌛️
⏳ All modules uninstalled in: .887604424 seconds ⌛️

Signed-off-by: Mohammad Teimori Pabandi <[email protected]>
@github-actions
Copy link
Contributor

⏳ All modules installed in: 44.357704971 seconds ⌛️
⏳ All modules uninstalled in: .973470664 seconds ⌛️

@mtp1376 mtp1376 merged commit ca23604 into main Feb 20, 2023
@mtp1376 mtp1376 deleted the 1969-aws_sqs-support branch February 20, 2023 15:03
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.

Normalize IAM JSON policies to facilitate comparison aws_sqs support
4 participants