Skip to content

Adding dev-no-sleeps and dev-no-optimization to the cluster #1185

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

Merged
merged 3 commits into from
May 14, 2025

Conversation

ArneTR
Copy link
Member

@ArneTR ArneTR commented May 13, 2025

Greptile Summary

Added development settings for measurement control in the Green Metrics Tool, enabling skipping of sleep times and optimizations during development/testing phases.

  • Migration file /migrations/2025_05_13_user_settings_dashboard.sql needs correction: wrong column name in WHERE clause and missing transaction wrapper
  • Added boolean validation in /api/object_specifications.py for UserSetting model to support new dev settings
  • New dev settings UI elements in /frontend/settings.html with clear warning messages about measurement validity impact
  • Implemented checkbox handling in /frontend/js/settings.js for new boolean settings with proper error handling
  • Modified ScenarioRunner in /lib/scenario_runner.py to support skipping sleeps/optimizations, but potential data integrity concerns with dev_no_optimizations not marking runs as invalid

@ArneTR
Copy link
Member Author

ArneTR commented May 13, 2025

@ribalba Through a new user setting you can now, in your user, set the cluster to --dev-no-sleeps if you want to hand in runs and have it running quickly
Screenshot 2025-05-13 at 12 46 04 PM

Copy link
Contributor

@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.

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

'["measurement.dev_no_sleeps","measurement.dev_no_optimizations","measurement.total_duration"]'::jsonb,
true -- Create the key if it doesn't exist
)
WHERE user_id = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Column name 'user_id' is incorrect - the users table uses 'id' as the primary key column name

Suggested change
WHERE user_id = 1;
WHERE id = 1;

Copy link

Eco CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Measurement #1 29.2501 3207.97 4.21 762.73
--- --- --- --- ---
Total Run 29.25 3207.97 4.21 762.73
--- --- --- --- ---
Additional overhead from Eco CI N/A 8.80 4.07 2.16

🌳 CO2 Data:
City: Washington, Lat: 38.7095, Lon: -78.1539
IP: 172.203.175.12
CO₂ from energy is: 1.260732210 g
CO₂ from manufacturing (embodied carbon) is: 0.217617401 g
Carbon Intensity for this location: 393 gCO₂eq/kWh
SCI: 1.478350 gCO₂eq / pipeline run emitted


Total cost of whole PR so far:

@ArneTR ArneTR merged commit 69f0d3a into main May 14, 2025
1 check failed
@ArneTR ArneTR deleted the dev-no-sleeps-optimization-cluster branch May 14, 2025 05:36
ArneTR added a commit that referenced this pull request May 15, 2025
* main: (68 commits)
  Guard clause that runner.run_until may never be used without a context
  Software add now accepts but logs unknown endpoints other than GitHub and GitLab
  Added volumes key
  allow_unsafe and skip_unsafe technically usable via configuration. Not exposed
  Bump psycopg[binary] from 3.2.8 to 3.2.9 (#1188)
  Bump redis from 5.2.1 to 6.1.0 (#1187)
  Added statistical significance schedule mode [skip ci] (#1186)
  Bump deepdiff from 8.4.2 to 8.5.0 (#1181)
  Bump pylint from 3.3.6 to 3.3.7 (#1175)
  Adding dev-no-sleeps and dev-no-optimization to the cluster (#1185)
  Shm size (#1184)
  Shutdown in the cluster happens now dynamically depending on what is configured in shutdown_on_job_no
  Memory resource limits may also be plain int or float\nWill then be interpreted as bytes
  Bump playwright/python in /docker/auxiliary-containers/gcb_playwright (#1174)
  Bump psycopg[binary] from 3.2.7 to 3.2.8 (#1183)
  Bump hiredis from 3.1.0 to 3.1.1 (#1182)
  Temperature errors are reset now inline
  (fix): Version is allowed to be int, float or datetime too
  Added --dev-no-save flag (#1179)
  Removed duplicate ln
  ...
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