Skip to content

Environment config section#1161

Merged
mssalvatore merged 7 commits intodevelopfrom
environment-config-section
May 13, 2021
Merged

Environment config section#1161
mssalvatore merged 7 commits intodevelopfrom
environment-config-section

Conversation

@mssalvatore
Copy link
Collaborator

@mssalvatore mssalvatore commented May 11, 2021

What does this PR do?

Issue #1146

Creates an "environment" section in the config to separate the environment config from the non-environment config options.

PR Checklist

  • Have you added an explanation of what your changes do and why you'd like to include them?
  • Is the TravisCI build passing?
  • Was the CHANGELOG.md updated to reflect the changes?
  • Was the documentation framework updated to reflect the changes?

Testing Checklist

  • Added relevant unit tests?
  • Have you successfully tested your changes locally? Elaborate:

    Tested by running the monkey locally

  • If applicable, add screenshots or log transcripts of the feature working
Put the environment config inside its own "environment" object in the server_config.json to provide a logical separation between the environment config, logger config, data directory, etc.
@codecov
Copy link

codecov bot commented May 11, 2021

Codecov Report

Merging #1161 (acc6f41) into develop (9476441) will increase coverage by 0.13%.
The diff coverage is 71.42%.

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

@@ Coverage Diff @@ ## develop #1161 +/- ## =========================================== + Coverage 28.78% 28.92% +0.13%  =========================================== Files 414 415 +1 Lines 12758 12904 +146 =========================================== + Hits 3673 3732 +59  - Misses 9085 9172 +87 
Impacted Files Coverage Δ
monkey/monkey_island.py 0.00% <0.00%> (ø)
monkey/monkey_island/cc/main.py 0.00% <0.00%> (ø)
monkey/tests/conftest.py 100.00% <ø> (ø)
...monkey_island/cc/environment/environment_config.py 100.00% <100.00%> (ø)
monkey/monkey_island/cc/app.py 0.00% <0.00%> (ø)
monkey/common/config_value_paths.py 100.00% <0.00%> (ø)
monkey/monkey_island/cc/resources/local_run.py 0.00% <0.00%> (ø)
monkey/monkey_island/cc/services/initialize.py 0.00% <0.00%> (ø)
...nkey/monkey_island/cc/resources/pba_file_upload.py 0.00% <0.00%> (ø)
...key/monkey_island/cc/services/post_breach_files.py 100.00% <0.00%> (ø)
... and 2 more

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 9476441...f0bd6e1. Read the comment docs.

@@ -1,5 +1,8 @@
{
"server_config": "password",
"deployment": "develop",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"deployment": "develop",
"data_dir": "$HOME/.monkey_island",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since the island will supply a default data_dir, I'd prefer to leave this out. Otherwise we need a .develop.linux and a .develop.windows file to cover multiple development platforms.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right. This should be removed then, there's already a "deployment" in "environment".

@mssalvatore mssalvatore mentioned this pull request May 12, 2021
7 tasks
Base automatically changed from no-global-data-dir to develop May 13, 2021 10:03
@mssalvatore mssalvatore marked this pull request as ready for review May 13, 2021 10:06
@mssalvatore mssalvatore merged commit 3205d83 into develop May 13, 2021
@mssalvatore mssalvatore deleted the environment-config-section branch May 13, 2021 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants