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

Prevent tests from transitioning to BUILD_CREATED state after failure #813

Conversation

hwikle-lanl
Copy link
Collaborator

Previously, tests were failing during the build phase and correctly logging a BUILD_ERROR state, but then incorrectly continuing on to log a BUILD_COMPLETE state, sometimes multiple times. This commit fixes that. It also fixes a double logging of an ABORTED state (albeit with different messages).

Several issues with logging states remain:

  • In the aforementioned double ABORTED state, one log statement should probably be removed.

  • Nearly identical tests will show either an ENV_FAILED state, or an ENV_FAILED state followed by a BUILD_FAILED state. This inconsistency needs to be resolved, but a decision needs to be made as to the intended behavior.

  • Some log states appear to be used inappropriately, which should eventually be fixed.

Code review checklist:

  • Code is generally sensical and well commented
  • Variable/function names all telegraph their purpose and contents
  • Functions/classes have useful doc strings
  • Function arguments are typed
  • Added/modified unit tests to cover changes.
  • New features have documentation added to the docs.
  • New features and backwards compatibility breaks are noted in the RELEASE.md

Previously, tests were failing during the build phase and correctly
logging a `BUILD_ERROR` state, but then incorrectly continuing on to
log a `BUILD_COMPLETE` state, sometimes multiple times. This commit
fixes that. It also fixes a double logging of an ABORTED state (albeit
with different messages).

Several issues with logging states remain:

- In the aforementioned double ABORTED state, one log statement should
probably be removed.

- Nearly identical tests will show either an ENV_FAILED state, or an
ENV_FAILED state followed by a BUILD_FAILED state. This inconsistency
needs to be resolved, but a decision needs to be made as to the
intended behavior.

- Some log states appear to be used inappropriately, which should
eventually be fixed.
@hwikle-lanl hwikle-lanl linked an issue Feb 5, 2025 that may be closed by this pull request
@hwikle-lanl hwikle-lanl changed the title Prevent tests from transition to BUILD_CREATED state after failure Prevent tests from transitioning to BUILD_CREATED state after failure Feb 5, 2025
@hwikle-lanl hwikle-lanl self-assigned this Feb 5, 2025
@hwikle-lanl hwikle-lanl requested a review from smehta99 February 5, 2025 20:58
@hwikle-lanl hwikle-lanl added the bug Something isn't working label Feb 5, 2025
Comment on lines +113 to +117
def is_fatal(self, state) -> bool:
"""Determine whether the given state is fatal."""

return state in self._fatal_states

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes please.

@hwikle-lanl hwikle-lanl merged commit 83ba81f into develop Feb 6, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test state transitions to BUILD_CREATED after build failure.
2 participants