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

Re-enable support for turbo mode #169

Merged
merged 3 commits into from
Aug 20, 2021

Conversation

gravesm
Copy link
Member

@gravesm gravesm commented Jul 15, 2021

SUMMARY

This re-enables the ability to add turbo mode. It also adds a few more
tests to cover some cases that had been broken in turbo mode previously.

Testing with turbo mode is not currently enabled, and would fail until ansible-collections/cloud.common#69 can be merged and a new cloud.common release is done. This also does not add cloud.common to the collection dependencies until a decision has been made about how enabling/disabling turbo mode will work when cloud.common is already installed.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
ADDITIONAL INFORMATION

@codecov
Copy link

codecov bot commented Jul 15, 2021

Codecov Report

Merging #169 (d43b846) into main (f98469e) will decrease coverage by 0.37%.
The diff coverage is n/a.

❗ Current head d43b846 differs from pull request most recent head 7f85d58. Consider uploading reports for the commit 7f85d58 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #169      +/-   ##
==========================================
- Coverage   24.40%   24.02%   -0.38%     
==========================================
  Files           1        1              
  Lines         168      154      -14     
  Branches       32       29       -3     
==========================================
- Hits           41       37       -4     
+ Misses        120      112       -8     
+ Partials        7        5       -2     
Impacted Files Coverage Δ
...ections/kubernetes/core/plugins/action/k8s_info.py 24.02% <0.00%> (-0.38%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2559080...7f85d58. Read the comment docs.

AnsibleTurboModule as AnsibleModule,
) # noqa: F401
AnsibleModule.collection_name = "kubernetes.core"
except ImportError:
Copy link
Member

@Akasurde Akasurde Jul 27, 2021

Choose a reason for hiding this comment

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

LGTM, are we waiting for any additional changes?

Copy link
Member Author

Choose a reason for hiding this comment

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

ansible-collections/cloud.common#69 needs to be merged and released before the tests here will pass with turbo mode enabled. If the turbo mode tests are non-voting then we can merge and just have broken tests until the issue with cloud.common is resolved.

gravesm added 3 commits August 2, 2021 10:31
This re-enables the ability to add turbo mode. It also adds a few more
tests to cover some cases that had been broken in turbo mode previously.
@gravesm gravesm changed the title [DNM] Re-enable support for turbo mode Re-enable support for turbo mode Aug 2, 2021
@gravesm
Copy link
Member Author

gravesm commented Aug 2, 2021

@Akasurde if you want to give the new changes a review, I think we can move forward with this for now and adjust later if we need to.

Copy link
Member

@Akasurde Akasurde left a comment

Choose a reason for hiding this comment

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

LGTM. I hope we are adding docs are around this env variable in the later PR.

@gravesm
Copy link
Member Author

gravesm commented Aug 3, 2021

Yeah, I would like to get turbo mode settled and make sure it's being tested before we publish docs for it.

@gravesm
Copy link
Member Author

gravesm commented Aug 4, 2021

To clarify, what I'm suggesting is that the existing environment keyword be used to control this:

- k8s:
    definition:
       ...
  environment:
    ENABLE_TURBO_MODE: true

@goneri
Copy link
Member

goneri commented Aug 19, 2021

Oh crap, I totally missed this PR and I started working on this in parallel: #190 and ansible-collections/cloud.common#73

@gravesm
Copy link
Member Author

gravesm commented Aug 19, 2021

@goneri Yeah, I think I made this after yours as an alternative to consider. I'm not sure which one is better. Mine seems simpler but I may be missing some reason why we wouldn't want to do things this way.

@goneri
Copy link
Member

goneri commented Aug 19, 2021

@goneri Yeah, I think I made this after yours as an alternative to consider. I'm not sure which one is better. Mine seems simpler but I may be missing some reason why we wouldn't want to do things this way.

Yeah. I need to think about this a bit. You're approach is definitely way lighter.

@gravesm
Copy link
Member Author

gravesm commented Aug 20, 2021

I believe it should also be easy to set up a non-voting CI job using something like:

environment:
  ENABLE_TURBO_MODE: "{{ lookup('env', 'ENABLE_TURBO_MODE') }}"

at the playbook level in converge.yml.

@goneri
Copy link
Member

goneri commented Aug 20, 2021

I suggest we land your PR first. And in the future, if we look for something more elaborate, we can still revisit mine.

Copy link

@ansible-zuul ansible-zuul bot left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants