Skip to content
Snippets Groups Projects

try to ensure all required log file exist before submission

Merged Charlotte Hausman requested to merge fix-log-monitoring into 2.8.3.1-patch
1 unresolved thread
  • message cleanup for external workflows

Merge request reports

Merge request pipeline #16040 passed

Merge request pipeline passed for 7f3dd619

Approval is optional

Merged by Charlotte HausmanCharlotte Hausman 9 months ago (Jun 11, 2024 3:50pm UTC)

Merge details

  • Changes merged into 2.8.3.1-patch with 63c3e9e0.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
792 :return: boolean representing if file was created
793 """
794 if iteration == 3:
795 # try to create file several times, but don't be stupid about it
796 logger.warning(f"Warning: Failed to create {logfile} multiple times. Workflow may fail.")
797 return False
798
799 # create needed logfile if it doesn't exist
800 logfile.touch()
801 # verify that the file was created
802 if logfile.is_file():
803 logger.info("log file %s exists.", logfile)
804 return True
805 else:
806 logger.warning(f"Failed to create {logfile}. Trying again")
807 iteration += 1
  • Daniel Nemergut approved this merge request

    approved this merge request

  • Sam Kagan approved this merge request

    approved this merge request

  • added 1 commit

    • 7f3dd619 - add delay between log creation attempts

    Compare with previous version

  • mentioned in commit 63c3e9e0

  • Please register or sign in to reply
    Loading