Skip to content

Conversation

@hanwen-cluster
Copy link
Contributor

Description of changes

The _dump_job_output has been there in the codebase without anyone using it. This commit uses it. This commit also change an ERROR meesage in the function to INFO to avoid polluting logs with too many ERRORs

Tests

When test_starccm fails, the job stdout and stderr is in the console output

Checklist

  • Make sure you are pointing to the right branch.
  • If you're creating a patch for a branch other than develop add the branch name as prefix in the PR title (e.g. [release-3.6]).
  • Check all commits' messages are clear, describing what and why vs how.
  • Make sure to have added unit tests or integration tests to cover the new/modified code.
  • Check if documentation is impacted by this change.

Please review the guidelines for contributing and Pull Request Instructions.

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

The `_dump_job_output` has been there in the codebase without anyone using it. This commit uses it. This commit also change an ERROR meesage in the function to INFO to avoid polluting logs with too many ERRORs
@hanwen-cluster hanwen-cluster requested review from a team as code owners January 16, 2026 16:45
@hanwen-cluster hanwen-cluster added the skip-changelog-update Disables the check that enforces changelog updates in PRs label Jan 16, 2026
logging.error("JobState of jobid %s not in %s:\n%s", job_id, expected_state, result.stdout)
self._dump_job_output(result.stdout)
raise
self._dump_job_output(job_id, result.stdout)
Copy link
Contributor

Choose a reason for hiding this comment

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

I saw you wrote this in description.

The _dump_job_output has been there in the codebase without anyone using it.

Why? Does the original call of this function not work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nobody called this function before this commit

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct me if I am wrong. There was one and you modified it.
Original:

        try:
            assert_that(result.stdout).contains(f"JobState={expected_state}")
        except AssertionError:
            logging.error("JobState of jobid %s not in %s:\n%s", job_id, expected_state, result.stdout)
            self._dump_job_output(result.stdout)

Now:

        if f"JobState={expected_state}" not in result.stdout:
            logging.error("JobState of jobid %s not in %s:\n%s", job_id, expected_state, result.stdout)
            self._dump_job_output(job_id, result.stdout)
        assert_that(result.stdout).contains(f"JobState={expected_state}")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right! I am closing the PR. Sorry about the confusion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog-update Disables the check that enforces changelog updates in PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants