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

Log LSF execution host to Azure #8826

Merged

Conversation

andreas-el
Copy link
Contributor

@andreas-el andreas-el commented Oct 1, 2024

Issue
Resolves https://github.com/equinor/scout/issues/1117

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'pytest tests/ert/unit_tests -n logical -m "not integration_test"')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

@andreas-el andreas-el force-pushed the propagate_exec_host_to_azure_logs branch from 461aaff to 1f5f5d5 Compare October 1, 2024 07:12
@andreas-el andreas-el added enhancement release-notes:improvement Automatically categorise as improvement in release notes and removed enhancement labels Oct 1, 2024
@andreas-el andreas-el changed the title Retrieve exec_hosts from bjobs and log to azure Log LSF execution host to Azure Oct 1, 2024
@andreas-el andreas-el force-pushed the propagate_exec_host_to_azure_logs branch from 08f19db to fd4dab2 Compare October 1, 2024 08:27
Retrieve exec_hosts from bjobs and log to azure
Update bjobs output with placeholder for exec_hosts in tests
Add tests for bjobs_exec_host parsing
@andreas-el andreas-el force-pushed the propagate_exec_host_to_azure_logs branch from fd4dab2 to 473854b Compare October 1, 2024 08:29
@codecov-commenter
Copy link

codecov-commenter commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.40%. Comparing base (0825322) to head (38803a9).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8826      +/-   ##
==========================================
+ Coverage   91.30%   91.40%   +0.09%     
==========================================
  Files         342      343       +1     
  Lines       21028    21084      +56     
==========================================
+ Hits        19200    19272      +72     
+ Misses       1828     1812      -16     
Flag Coverage Δ
cli-tests 39.62% <17.64%> (+0.01%) ⬆️
gui-tests 73.48% <17.64%> (+0.03%) ⬆️
performance-tests 50.17% <17.64%> (+0.11%) ⬆️
unit-tests 79.88% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@berland
Copy link
Contributor

berland commented Oct 1, 2024

Is there a test to assert that this message is only logged once pr realization?

bjobs_exec_hosts = parse_bjobs_exec_hosts(stdout.decode(errors="ignore"))

for jobid, exec_hosts in bjobs_exec_hosts.items():
if self._jobs[jobid].exec_hosts == "-":
Copy link
Contributor

Choose a reason for hiding this comment

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

This condition is never true in the tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I rewrote this to get better coverage. Also, this is the default value for exec_hosts, and the value bjobs will yield when no node is yet assigned for the job.
A re-run of codecov would have been nice.

Copy link
Contributor

@berland berland left a comment

Choose a reason for hiding this comment

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

Nice!

@andreas-el andreas-el merged commit 398ce6a into equinor:main Oct 2, 2024
50 checks passed
@andreas-el andreas-el deleted the propagate_exec_host_to_azure_logs branch October 2, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:improvement Automatically categorise as improvement in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants