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

chore(global_provider): Move methods to class as static #3896

Merged
merged 14 commits into from
May 20, 2024

Conversation

jfagoagas
Copy link
Member

Description

Improve code organisation making the set_global_provider and get_global_provider @staticmethod. This implies renaming a lot of code, which is already done and removes a file.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jfagoagas jfagoagas added the no-merge Please, DO NOT MERGE this PR. label Apr 30, 2024
@jfagoagas jfagoagas requested review from a team as code owners April 30, 2024 06:22
Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

@github-actions github-actions bot added documentation provider/aws Issues/PRs related with the AWS provider provider/azure Issues/PRs related with the Azure provider provider/gcp Issues/PRs related with the Google Cloud Platform provider provider/kubernetes Issues/PRs related with the Kubernetes provider labels Apr 30, 2024
@@ -38,8 +38,8 @@ def __init__(self, arguments, bulk_checks_metadata):
self.fixer = getattr(arguments, "fixer", None)

# Shodan API Key
if arguments.shodan:
update_provider_config("shodan_api_key", arguments.shodan)
# if arguments.shodan:
Copy link
Member Author

Choose a reason for hiding this comment

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

Review this before merge.

@@ -96,19 +95,6 @@ def check_current_version():
return f"{prowler_version_string}"


# TODO: revisit this function
Copy link
Member Author

Choose a reason for hiding this comment

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

We cannot remove this function, it needs to be moved elsewhere.

Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

Copy link
Contributor

github-actions bot commented May 3, 2024

You can check the documentation for this PR here -> SaaS Documentation

Copy link
Contributor

github-actions bot commented May 9, 2024

You can check the documentation for this PR here -> SaaS Documentation

@jfagoagas jfagoagas removed the no-merge Please, DO NOT MERGE this PR. label May 9, 2024
Copy link
Contributor

github-actions bot commented May 9, 2024

You can check the documentation for this PR here -> SaaS Documentation

Copy link
Contributor

github-actions bot commented May 9, 2024

You can check the documentation for this PR here -> SaaS Documentation

Copy link
Contributor

github-actions bot commented May 9, 2024

You can check the documentation for this PR here -> SaaS Documentation

Copy link

codecov bot commented May 9, 2024

Codecov Report

Attention: Patch coverage is 90.24390% with 24 lines in your changes are missing coverage. Please review.

Project coverage is 86.59%. Comparing base (53cfcff) to head (e1ac7e6).
Report is 1 commits behind head on master.

Files Patch % Lines
prowler/providers/common/provider.py 50.00% 21 Missing ⚠️
prowler/__main__.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3896      +/-   ##
==========================================
- Coverage   86.65%   86.59%   -0.07%     
==========================================
  Files         777      776       -1     
  Lines       24139    24146       +7     
==========================================
- Hits        20918    20909       -9     
- Misses       3221     3237      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

@pedrooot pedrooot self-assigned this May 20, 2024
pedrooot
pedrooot previously approved these changes May 20, 2024
Copy link
Member

@pedrooot pedrooot left a comment

Choose a reason for hiding this comment

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

Thanks for your work! @jfagoagas 🥇

@jfagoagas jfagoagas added the no-merge Please, DO NOT MERGE this PR. label May 20, 2024
Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

@pedrooot pedrooot self-requested a review May 20, 2024 08:59
Copy link
Member

@pedrooot pedrooot left a comment

Choose a reason for hiding this comment

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

🔝

@jfagoagas jfagoagas removed the no-merge Please, DO NOT MERGE this PR. label May 20, 2024
@jfagoagas jfagoagas merged commit 6f3eca7 into master May 20, 2024
12 checks passed
@jfagoagas jfagoagas deleted the global-provider-in-class branch May 20, 2024 09:29
puchy22 pushed a commit to puchy22/prowler that referenced this pull request May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation provider/aws Issues/PRs related with the AWS provider provider/azure Issues/PRs related with the Azure provider provider/gcp Issues/PRs related with the Google Cloud Platform provider provider/kubernetes Issues/PRs related with the Kubernetes provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants