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

Internal network #1030

Merged
merged 2 commits into from
Dec 23, 2024
Merged

Internal network #1030

merged 2 commits into from
Dec 23, 2024

Conversation

ArneTR
Copy link
Member

@ArneTR ArneTR commented Dec 23, 2024

Docker and other orchestrators allow the virtual network to be isolated.

This means that containers can connect to each other, but not to external networks like the internet.

This PR brings this feature to GMT.

Useful for testing workloads that do non critical network requests which shall be suppressed to make more stable measuerements

Greptile Summary

Added support for Docker's internal network feature, allowing containers to communicate internally while being isolated from external networks, useful for more stable measurements by suppressing non-critical network requests.

  • Added internal network validation in lib/schema_checker.py to support the 'internal' network modifier as a boolean property
  • Added test case in tests/test_usage_scenario.py verifying that containers in internal networks cannot access external URLs
  • Created tests/data/usage_scenarios/internal_network.yml demonstrating internal network configuration and testing
  • Modified runner.py to handle the internal flag when creating Docker networks using --internal option

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

4 file(s) reviewed, 5 comment(s)
Edit PR Review Bot Settings | Greptile

tests/test_usage_scenario.py Show resolved Hide resolved
lib/schema_checker.py Show resolved Hide resolved
Copy link

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run (incl. overhead) 27.5276 2101.27 4.06 517.25
Measurement #1 27.4996 2101.27 4.08 515.54

🌳 CO2 Data:
City: Boydton, Lat: 36.6676, Lon: -78.3875
IP: 20.161.78.99
CO₂ from energy is: 0.876229590 g
CO₂ from manufacturing (embodied carbon) is: 0.147578567 g
Carbon Intensity for this location: 417 gCO₂eq/kWh
SCI: 1.023808 gCO₂eq / pipeline run emitted


Total cost of whole PR so far:

@ArneTR ArneTR merged commit 25df9da into main Dec 23, 2024
4 checks passed
@ArneTR ArneTR deleted the internal-network branch December 23, 2024 23:04
ArneTR added a commit that referenced this pull request Dec 24, 2024
* main:
  Internal network (#1030)
  Updated EE
  (fix): Error display was broken for catched Exceptions
  Updated EE
  (style): Reducing variable scope
  User Zero / Super Admin (#1021)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant