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

Investigate The run identifier could not be detected in trace output of the child process message we are seeing regularly in run.logs recently #2009

Open
techcobweb opened this issue Sep 30, 2024 · 0 comments
Assignees

Comments

@techcobweb
Copy link
Contributor

techcobweb commented Sep 30, 2024

Problem

As a galasactl user running a test, I don't want to see this message in the log "The run identifier could not be detected in trace output of the child process" looping in the CLI, as it feels like an error I should do something about, and if it is I have no idea where to start.

Background

The galactl go thread should be waiting around for the run id to be allocated and reported in the log/test run. This will then be detected and the galasactl will move on monitoring this test.

// Block this thread until we can gather what the RunId for this test is
// It is allocated within the JVM, and traced, where we pick it up from.
func (localTest *LocalTest) waitForRunIdAllocation(outputProcessor *JVMOutputProcessor) (string, error) {
	var err error
	var runId string = ""

	// Wait for the runId to be detected in the JVM output.
	isDoneWaiting := false

	for !isDoneWaiting {
		select {
		case <-outputProcessor.publishResultChannel:
			// We have a RunId
			runId = outputProcessor.detectedRunId
			isDoneWaiting = true
		default:
			// No runid available yet.
			if localTest.isCompleted() {
				// Completed before the runId was available.
				isDoneWaiting = true
			} else {
				localTest.timeService.Sleep(time.Duration(time.Second))
			}
		}
	}

	if runId == "" {
		err = galasaErrors.NewGalasaError(galasaErrors.GALASA_ERROR_RUN_ID_NOT_DETECTED)
	}

	return runId, err
}

This is the code which does this. It sounds like the localTest.isComplete() is returning true, indicating that the test is done already, but as there is no run ID for that test the results are going to be hard to report on without showing an error.

Is this code continually being called with isCompleted() not being set up properly ?

It's OK for this loop to sleep for a bit waiting for the test to get to the point where it can see the test run id, is it sleeping at all ever ? or relying on a higher-level loop to keep re-calling it ?

@techcobweb techcobweb self-assigned this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔖 3 Iteration Backlog
Development

No branches or pull requests

1 participant