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

cloudfront_distribution: Add support for cache_policy_id and origin_request_policy_id for behaviors #1589

Conversation

Zozman
Copy link
Contributor

@Zozman Zozman commented Nov 7, 2022

SUMMARY

As described by issue #290, the current cloudfront_distribution module does not support cache_policy_id and origin_request_policy_id in a behavior. In particular, attempting to use cache_policy_id will add default values that are incompatible with it (mainly default_ttl, max_ttl, min_ttl, and compress). So this change allows you to use the policies instead of using a forwarded_values for a given behavior.

Fixed #290

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

cloudfront_distribution

@Zozman Zozman changed the title cloudfront_distribution: Add support for cache_policy_id and origin_request_policy_id cloudfront_distribution: Add support for cache_policy_id and origin_request_policy_id for behaviors Nov 7, 2022
@ansibullbot
Copy link

@ansibullbot ansibullbot added community_review feature This issue/PR relates to a feature request integration tests/integration module module needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) tests tests labels Nov 7, 2022
@github-actions
Copy link

github-actions bot commented Nov 7, 2022

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
Copy link
Contributor

Build failed.

✔️ ansible-galaxy-importer SUCCESS in 4m 01s
✔️ build-ansible-collection SUCCESS in 5m 10s
ansible-test-sanity-docker-devel FAILURE in 10m 54s (non-voting)
ansible-test-sanity-docker-milestone FAILURE in 11m 16s
ansible-test-sanity-docker-stable-2.12 FAILURE in 11m 11s
ansible-test-sanity-docker-stable-2.13 FAILURE in 8m 54s
ansible-test-sanity-docker-stable-2.14 FAILURE in 11m 39s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 7m 28s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 5m 54s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 7m 35s
✔️ ansible-test-splitter SUCCESS in 2m 30s
integration-community.aws-1 FAILURE in 5m 06s
integration-community.aws-2 FAILURE in 5m 35s
integration-community.aws-3 FAILURE in 4m 55s
integration-community.aws-4 FAILURE in 9m 06s
integration-community.aws-5 FAILURE in 5m 36s
integration-community.aws-6 FAILURE in 5m 13s
integration-community.aws-7 FAILURE in 7m 38s
integration-community.aws-8 FAILURE in 4m 54s
integration-community.aws-9 FAILURE in 5m 12s
integration-community.aws-10 FAILURE in 8m 32s
integration-community.aws-11 FAILURE in 8m 00s
integration-community.aws-12 FAILURE in 5m 12s
integration-community.aws-13 FAILURE in 10m 31s
integration-community.aws-14 FAILURE in 6m 24s
integration-community.aws-15 FAILURE in 5m 13s
integration-community.aws-16 FAILURE in 5m 12s
integration-community.aws-17 FAILURE in 11m 45s
integration-community.aws-18 FAILURE in 5m 36s
integration-community.aws-19 FAILURE in 6m 28s
integration-community.aws-20 FAILURE in 5m 24s
integration-community.aws-21 FAILURE in 6m 01s
integration-community.aws-22 FAILURE in 5m 41s
✔️ ansible-test-changelog SUCCESS in 2m 32s
✔️ noop SUCCESS in 0s

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

✔️ ansible-galaxy-importer SUCCESS in 4m 01s
✔️ build-ansible-collection SUCCESS in 7m 56s
✔️ ansible-test-sanity-docker-devel SUCCESS in 14m 57s (non-voting)
ansible-test-sanity-docker-milestone FAILURE in 19m 48s
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 13m 43s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 9m 50s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 10m 32s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 10m 47s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 56s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 7m 06s
✔️ ansible-test-splitter SUCCESS in 6m 00s
integration-community.aws-1 FAILURE in 8m 29s
integration-community.aws-2 FAILURE in 8m 09s
integration-community.aws-3 FAILURE in 12m 54s
integration-community.aws-4 FAILURE in 6m 12s
integration-community.aws-5 FAILURE in 7m 36s
integration-community.aws-6 FAILURE in 11m 23s
integration-community.aws-7 FAILURE in 9m 30s
integration-community.aws-8 FAILURE in 12m 12s
integration-community.aws-9 FAILURE in 12m 22s
integration-community.aws-10 FAILURE in 9m 41s
integration-community.aws-11 FAILURE in 9m 52s
integration-community.aws-12 FAILURE in 6m 00s
integration-community.aws-13 FAILURE in 8m 22s
integration-community.aws-14 FAILURE in 8m 41s
integration-community.aws-15 FAILURE in 8m 09s
integration-community.aws-16 FAILURE in 4m 45s
integration-community.aws-17 FAILURE in 7m 18s
integration-community.aws-18 FAILURE in 4m 57s
integration-community.aws-19 FAILURE in 6m 10s
integration-community.aws-20 FAILURE in 5m 03s
integration-community.aws-21 FAILURE in 4m 43s
integration-community.aws-22 FAILURE in 4m 42s
✔️ ansible-test-changelog SUCCESS in 5m 44s
✔️ noop SUCCESS in 0s

@Zozman
Copy link
Contributor Author

Zozman commented Apr 10, 2023

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/a2747a5a6c484a40b1dab68291cfda71

ansible-galaxy-importer FAILURE in 3m 49s
✔️ build-ansible-collection SUCCESS in 12m 36s
✔️ ansible-test-sanity-docker-devel SUCCESS in 12m 31s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 10m 18s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 25s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 11m 23s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 12m 19s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 12s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 7m 17s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 26s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 08s
✔️ ansible-test-changelog SUCCESS in 4m 25s
✔️ ansible-test-splitter SUCCESS in 4m 54s
integration-community.aws-1 FAILURE in 6m 24s
Skipped 21 jobs

@Zozman
Copy link
Contributor Author

Zozman commented Apr 10, 2023

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/c428461f4bad49c5afb55048d95ab0be

ansible-galaxy-importer FAILURE in 5m 09s
✔️ build-ansible-collection SUCCESS in 12m 29s
✔️ ansible-test-sanity-docker-devel SUCCESS in 11m 39s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 11m 11s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 40s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 05s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 10m 36s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 7m 11s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 13s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 8m 09s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 10s
✔️ ansible-test-changelog SUCCESS in 4m 17s
✔️ ansible-test-splitter SUCCESS in 4m 51s
integration-community.aws-1 FAILURE in 6m 08s
Skipped 21 jobs

@markuman
Copy link
Member

@Zozman this is the integration test error

2023-04-10 22:19:30.698010 | controller | "msg": "Error creating distribution: An error occurred (InvalidArgument) when calling the CreateDistribution operation: The parameter MinTTL is required.",

Without digging deeper, I cannot say if it is a bug in the integration test or if it is a side effect of the changed code.
Do you have some time to investigate here?

@Zozman
Copy link
Contributor Author

Zozman commented Apr 18, 2023

@markuman Thanks for the heads up; wouldn't surprise me if I messed it up so will try to see what's up. Most likely I messed it up somewhere.

abikouo pushed a commit to abikouo/community.aws that referenced this pull request Oct 24, 2023
… to the rule (ansible-collections#1589)

cloudwatchevent_rule should return false when there is no change done to the rule

SUMMARY


Fixes ansible-collections#1080
ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

plugins/modules/cloudwatchevent_rule.py
ADDITIONAL INFORMATION

Reviewed-by: GomathiselviS
Reviewed-by: Mark Chappell
Reviewed-by: Jill R
Reviewed-by: Alina Buzachis
@wwahammy
Copy link

wwahammy commented Dec 1, 2023

@Zozman @markuman thanks for the work on this! Is there anything interested parties can do to get this over the finish-line and merged?

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/94b23170f66342bdaaa2d28646e5ac0a

ansible-galaxy-importer FAILURE in 4m 50s (non-voting)
✔️ build-ansible-collection SUCCESS in 15m 19s
✔️ ansible-test-splitter SUCCESS in 5m 54s
✔️ integration-community.aws-1 SUCCESS in 20m 20s
Skipped 21 jobs

Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/76eb237efc374bfca1c192443c893dfc

ansible-galaxy-importer FAILURE in 5m 11s (non-voting)
✔️ build-ansible-collection SUCCESS in 14m 46s
✔️ ansible-test-splitter SUCCESS in 5m 15s
integration-community.aws-1 NODE_FAILURE Node request 200-0006738760 failed in 0s
Skipped 21 jobs

@Zozman
Copy link
Contributor Author

Zozman commented Dec 11, 2023

recheck

Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/7f0f0b77e94048988927c180eb9952a2

⚠️ ansible-galaxy-importer SKIPPED Skipped due to failed job build-ansible-collection (non-voting)
build-ansible-collection NODE_FAILURE Node request 200-0006738808 failed in 0s
ansible-test-splitter NODE_FAILURE Node request 200-0006738809 failed in 0s
⚠️ integration-community.aws-1 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-2 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-3 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-4 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-5 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-6 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-7 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-8 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-9 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-10 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-11 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-12 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-13 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-14 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-15 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-16 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-17 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-18 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-19 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-20 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-21 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-22 SKIPPED Skipped due to failed job build-ansible-collection

@Zozman
Copy link
Contributor Author

Zozman commented Dec 11, 2023

recheck

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/3ab2a250feb344f490542b37f4556a8a

✔️ ansible-galaxy-importer SUCCESS in 4m 32s (non-voting)
✔️ build-ansible-collection SUCCESS in 14m 25s
✔️ ansible-test-splitter SUCCESS in 5m 31s
✔️ integration-community.aws-1 SUCCESS in 21m 58s
Skipped 21 jobs

@Zozman
Copy link
Contributor Author

Zozman commented Dec 15, 2023

ready_for_review

@Zozman
Copy link
Contributor Author

Zozman commented Dec 15, 2023

Are the errors in the sanity tests something caused by my PR I can fix? It looks like an issue with the job installing dependencies.

@markuman
Copy link
Member

recheck

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/992fee75305348b69bbb91c01d94357d

✔️ ansible-galaxy-importer SUCCESS in 4m 36s (non-voting)
✔️ build-ansible-collection SUCCESS in 14m 09s
✔️ ansible-test-splitter SUCCESS in 5m 16s
✔️ integration-community.aws-1 SUCCESS in 19m 57s
Skipped 21 jobs

@wwahammy
Copy link

wwahammy commented Dec 20, 2023

Are the errors in the sanity tests something caused by my PR I can fix? It looks like an issue with the job installing dependencies.

Just an FYI, I am getting the same error when I install the branch locally using: ansible-galaxy install -r roles/requirements.yml with the requirements.yml of :

---
# roles:
# Install a role from Ansible Galaxy.
# - name: sample
#   version: 1.9.6

collections:
  - name: https://github.com/zozman/community.aws.git # TODO this should be changed to upstream as described in https://github.com/walkerart/devops/issues/12
    type: git
    version: cloudfrontCachePolicy

The output when running the install command is:

$ ansible-galaxy install -r roles/requirements.yml

Starting galaxy collection install process
Process install dependency map
Cloning into '/home/eric/.ansible/tmp/ansible-local-2782030qm8bz_di/tmpd9m5wrhl/community.awscmy49o1k'...
remote: Enumerating objects: 20379, done.
remote: Counting objects: 100% (7479/7479), done.
remote: Compressing objects: 100% (2455/2455), done.
remote: Total 20379 (delta 5233), reused 6757 (delta 4877), pack-reused 12900
Receiving objects: 100% (20379/20379), 9.56 MiB | 4.52 MiB/s, done.
Resolving deltas: 100% (13820/13820), done.
Branch 'cloudfrontCachePolicy' set up to track remote branch 'cloudfrontCachePolicy' from 'origin'.
Switched to a new branch 'cloudfrontCachePolicy'
ERROR! Failed to resolve the requested dependencies map. Could not satisfy the following requirements:
* amazon.aws:>=8.0.0-dev0 (dependency of community.aws:8.0.0-dev0)

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/0d9011ad37e44309b755dbaa980b3890

ansible-galaxy-importer FAILURE in 5m 13s (non-voting)
✔️ build-ansible-collection SUCCESS in 17m 24s
✔️ ansible-test-splitter SUCCESS in 6m 41s
✔️ integration-community.aws-1 SUCCESS in 21m 40s
Skipped 21 jobs

@Zozman
Copy link
Contributor Author

Zozman commented Dec 31, 2023

recheck

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/6cdcb15ecf9040569d88d546179b7dd2

ansible-galaxy-importer FAILURE in 5m 28s (non-voting)
✔️ build-ansible-collection SUCCESS in 15m 02s
✔️ ansible-test-splitter SUCCESS in 5m 17s
✔️ integration-community.aws-1 SUCCESS in 20m 53s
Skipped 21 jobs

Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/0012d334efed4e1cbb6e1b0b5555383d

✔️ ansible-galaxy-importer SUCCESS in 4m 06s (non-voting)
✔️ build-ansible-collection SUCCESS in 14m 03s
✔️ ansible-test-splitter SUCCESS in 5m 57s
integration-community.aws-1 RETRY_LIMIT in 1m 42s
Skipped 21 jobs

@Zozman
Copy link
Contributor Author

Zozman commented Jan 7, 2024

recheck

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/c1495e5e9ff9444d9ec954f5bbb760af

✔️ ansible-galaxy-importer SUCCESS in 7m 05s (non-voting)
✔️ build-ansible-collection SUCCESS in 14m 53s
✔️ ansible-test-splitter SUCCESS in 6m 00s
✔️ integration-community.aws-1 SUCCESS in 21m 14s
Skipped 21 jobs

@Zozman
Copy link
Contributor Author

Zozman commented Jan 7, 2024

bot_status

@tremble tremble added the mergeit Merge the PR (SoftwareFactory) label Jan 9, 2024
Copy link
Contributor

Build succeeded (gate pipeline).
https://ansible.softwarefactory-project.io/zuul/buildset/1462d5e1f1144be8bf2f0e27044e3918

✔️ ansible-galaxy-importer SUCCESS in 3m 38s (non-voting)
✔️ build-ansible-collection SUCCESS in 14m 27s
✔️ ansible-test-splitter SUCCESS in 5m 47s
✔️ integration-community.aws-1 SUCCESS in 20m 01s
Skipped 21 jobs

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 7da2ed5 into ansible-collections:main Jan 9, 2024
8 checks passed
Copy link

patchback bot commented Jan 9, 2024

Backport to stable-7: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-7/7da2ed5c0ed7b7db349f25d41b7e557a78a73ab5/pr-1589

Backported as #2038

🤖 @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 Jan 9, 2024
…equest_policy_id for behaviors (#1589)

cloudfront_distribution: Add support for cache_policy_id and origin_request_policy_id for behaviors

SUMMARY
As described by issue #290, the current cloudfront_distribution module does not support cache_policy_id and origin_request_policy_id in a behavior.  In particular, attempting to use cache_policy_id will add default values that are incompatible with it (mainly default_ttl, max_ttl, min_ttl, and compress).  So this change allows you to use the policies instead of using a forwarded_values for a given behavior.
Fixed #290
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
cloudfront_distribution

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Zac Lovoy
Reviewed-by: Bikouo Aubin
Reviewed-by: Alina Buzachis
(cherry picked from commit 7da2ed5)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jan 9, 2024
…equest_policy_id for behaviors (#1589) (#2038)

[PR #1589/7da2ed5c backport][stable-7] cloudfront_distribution: Add support for cache_policy_id and origin_request_policy_id for behaviors

This is a backport of PR #1589 as merged into main (7da2ed5).
SUMMARY
As described by issue #290, the current cloudfront_distribution module does not support cache_policy_id and origin_request_policy_id in a behavior.  In particular, attempting to use cache_policy_id will add default values that are incompatible with it (mainly default_ttl, max_ttl, min_ttl, and compress).  So this change allows you to use the policies instead of using a forwarded_values for a given behavior.
Fixed #290
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
cloudfront_distribution

Reviewed-by: Mark Chappell
@wwahammy
Copy link

wwahammy commented Jan 9, 2024

Thank you so much @Zozman, this is super helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7 PR should be backported to the stable-7 branch community_review feature This issue/PR relates to a feature request integration tests/integration mergeit Merge the PR (SoftwareFactory) module module needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cloudfront_distribution - Add support for setting cache and origin request policy ids in cache behavior
7 participants