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

glue_connection - Avoid converting connection_parameter keys to lowercase #518

Merged
merged 8 commits into from
Jul 6, 2022
Merged

glue_connection - Avoid converting connection_parameter keys to lowercase #518

merged 8 commits into from
Jul 6, 2022

Conversation

ichekaldin
Copy link
Contributor

@ichekaldin ichekaldin commented Apr 1, 2021

SUMMARY

This is a follow to my own PR #503.

This is a cosmetic change that prevents converting keys in connection_parameters dict to lowercase.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

aws_glue_connection

ADDITIONAL INFORMATION

As an example, this:

- community.aws.glue_connection:
    name: test-connection
    connection_parameters:
      JDBC_ENFORCE_SSL: "false"
    ...

is a valid value, while this:

- community.aws.glue_connection:
    name: test-connection
    connection_parameters:
      jdbc_enforce_ssl: "false"
    ...

is not.

This PR simply aligns the module output to the expected input.

@ansibullbot
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review integration tests/integration module module needs_triage plugins plugin (any type) tests tests labels Apr 1, 2021
@jillr
Copy link
Collaborator

jillr commented Apr 20, 2021

Thanks for this patch @ichekaldin. However this would be a breaking change, and would need a deprecation period where we would maintain both formats.

I haven't really used Glue myself, but it looks like the AWS docs use the upper-cased values https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/glue.html#Glue.Client.get_connection. I'd like to hear what other Glue users think about this change. Can the lower-cases values be used as the input for another Glue task?

@ichekaldin
Copy link
Contributor Author

@jillr from your point of view - is it worth working on this PR further?

alinabuzachis added a commit to alinabuzachis/community.aws that referenced this pull request May 25, 2022
Doc fix ec2_vol_info

SUMMARY

attachment_set has always be returned as a list of dictionaries, but the module documented it as a dictionary instead. Let's fix this documentation mismatch.
"attachment_set": [{
            "attach_time": "2015-10-23T00:22:29.000Z",
            "deleteOnTermination": "false",
            "device": "/dev/sdf",
            "instance_id": "i-8356263c",
            "status": "attached"
        }]

Fixes: ansible-collections#515

ISSUE TYPE


Docs Pull Request

COMPONENT NAME

ec2_vol_info

Reviewed-by: Mark Chappell <None>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
@tremble
Copy link
Contributor

tremble commented Jul 6, 2022

@ichekaldin apologies for the delay here. In my opinion, this is the correct change for the long run, the question is how to 'deprecate' the old key. We're currently discussing a general cleanup of return values (ansible-collections/amazon.aws#865)

To ensure people have a deprecation cycle available to them the consensus seems to be

  • Add a new key with the new value
  • Add a deprecation notice that the original key will be updated/removed after 2 years

As such, I'd suggest here is that we add a new return value raw_connection_parameters and a deprecation notice. We'll then just have to wait for the deprecation cycle to complete before changing the original connection_parameters value.

@ansibullbot
Copy link

@ansibullbot ansibullbot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR new_module New module new_plugin New plugin and removed community_review labels Jul 6, 2022
ichekaldin and others added 3 commits July 6, 2022 09:13
This is a follow to my own PR #503:
#503

This is a cosmetic change that prevents converting keys in
connection_parameters dict to lowercase.

As an example, this:

```
- community.aws.glue_connection:
    name: test-connection
    connection_parameters:
      JDBC_ENFORCE_SSL: "false"
    ...
```

is a valid value, while this:

```
- community.aws.glue_connection:
    name: test-connection
    connection_parameters:
      JDBC_ENFORCE_SSL: "false"
    ...
```

is not.

This PR simply aligns the module output to the expected input.
@ansibullbot

This comment was marked as resolved.

@ansibullbot

This comment was marked as resolved.

@ansibullbot

This comment was marked as resolved.

@ansibullbot ansibullbot added the merge_commit This PR contains at least one merge commit. Please resolve! label Jul 6, 2022
@github-actions
Copy link

github-actions bot commented Jul 6, 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

This comment was marked as outdated.

This is a follow to my own PR #503:
#503

This is a cosmetic change that prevents converting keys in
connection_parameters dict to lowercase.

As an example, this:

```
- community.aws.glue_connection:
    name: test-connection
    connection_parameters:
      JDBC_ENFORCE_SSL: "false"
    ...
```

is a valid value, while this:

```
- community.aws.glue_connection:
    name: test-connection
    connection_parameters:
      JDBC_ENFORCE_SSL: "false"
    ...
```

is not.

This PR simply aligns the module output to the expected input.
@tremble tremble removed the merge_commit This PR contains at least one merge commit. Please resolve! label Jul 6, 2022
@tremble tremble removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jul 6, 2022
@tremble
Copy link
Contributor

tremble commented Jul 6, 2022

@ichekaldin I've just rebased this PR rather than "merged" main into the PR. If you merge main into your branch rather than rebasing it can make something of a mess.

@ansibullbot ansibullbot added community_review and removed new_module New module new_plugin New plugin labels Jul 6, 2022
@softwarefactory-project-zuul

This comment was marked as resolved.

@softwarefactory-project-zuul

This comment was marked as resolved.

@ichekaldin
Copy link
Contributor Author

@tremble Thank you for all the suggestions and edits!

@tremble tremble changed the title Avoid converting connection_parameter keys to lowercase glue_connection - Avoid converting connection_parameter keys to lowercase Jul 6, 2022
@tremble tremble added the backport-4 PR should be backported to the stable-4 branch label Jul 6, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 4m 39s (non-voting)
✔️ build-ansible-collection SUCCESS in 5m 25s
✔️ ansible-test-sanity-docker-devel SUCCESS in 11m 29s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 10m 32s
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 11m 02s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 11m 13s
✔️ ansible-test-units-community-aws-python38 SUCCESS in 6m 02s
✔️ ansible-test-units-community-aws-python39 SUCCESS in 5m 43s
✔️ ansible-test-splitter SUCCESS in 2m 34s
✔️ integration-community.aws-1 SUCCESS in 6m 38s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED

@tremble tremble added the mergeit Merge the PR (SoftwareFactory) label Jul 6, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

✔️ ansible-galaxy-importer SUCCESS in 5m 08s (non-voting)
✔️ build-ansible-collection SUCCESS in 5m 14s
✔️ ansible-test-sanity-docker-devel SUCCESS in 10m 18s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 10m 35s
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 9m 25s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 47s
✔️ ansible-test-units-community-aws-python38 SUCCESS in 6m 47s
✔️ ansible-test-units-community-aws-python39 SUCCESS in 6m 34s
✔️ ansible-test-splitter SUCCESS in 3m 15s
✔️ integration-community.aws-1 SUCCESS in 6m 25s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit b03919d into ansible-collections:main Jul 6, 2022
@patchback
Copy link

patchback bot commented Jul 6, 2022

Backport to stable-4: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-4/b03919db5233d682e2aafb957d9276b6d58b5881/pr-518

Backported as #1321

🤖 @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 Jul 6, 2022
…case (#518)

glue_connection - Avoid converting connection_parameter keys to lowercase

SUMMARY

This is a follow to my own PR #503.
This is a cosmetic change that prevents converting keys in connection_parameters dict to lowercase.

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

aws_glue_connection
ADDITIONAL INFORMATION

As an example, this:
- community.aws.glue_connection:
    name: test-connection
    connection_parameters:
      JDBC_ENFORCE_SSL: "false"
    ...

is a valid value, while this:
- community.aws.glue_connection:
    name: test-connection
    connection_parameters:
      jdbc_enforce_ssl: "false"
    ...

is not.
This PR simply aligns the module output to the expected input.

Reviewed-by: Mark Chappell <None>
(cherry picked from commit b03919d)
@ichekaldin ichekaldin deleted the aws_glue_connection_do_not_lowercase_connection_parameters branch July 6, 2022 15:30
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jul 6, 2022
…case (#518) (#1321)

[PR #518/b03919db backport][stable-4] glue_connection - Avoid converting connection_parameter keys to lowercase

This is a backport of PR #518 as merged into main (b03919d).
SUMMARY

This is a follow to my own PR #503.
This is a cosmetic change that prevents converting keys in connection_parameters dict to lowercase.

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

aws_glue_connection
ADDITIONAL INFORMATION



As an example, this:
- community.aws.glue_connection:
    name: test-connection
    connection_parameters:
      JDBC_ENFORCE_SSL: "false"
    ...

is a valid value, while this:
- community.aws.glue_connection:
    name: test-connection
    connection_parameters:
      jdbc_enforce_ssl: "false"
    ...

is not.
This PR simply aligns the module output to the expected input.

Reviewed-by: Mark Chappell <None>
softwarefactory-project-zuul bot pushed a commit that referenced this pull request May 6, 2024
Bump 2024 deprecations from dates to release versions

SUMMARY
Bump 2024 deprecations from dates to release versions
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
plugins/modules/ecs_cluster.py
plugins/modules/ecs_service.py
plugins/modules/glue_connection.py
ADDITIONAL INFORMATION
See also:
#518
#1640
#1716

Reviewed-by: Alina Buzachis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-4 PR should be backported to the stable-4 branch bug This issue/PR relates to a bug community_review integration tests/integration mergeit Merge the PR (SoftwareFactory) module module plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants