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

Refresh page till pipeline runs #263

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

poojantcs
Copy link
Contributor

@poojantcs poojantcs commented Jan 19, 2025

Objective: Refresh the pipeline run page if the status of the pipeline is stuck on UI. This is a workaround till the UI issue is fixed.

Summary of the changes:

  • Updated the "waitTillPipelineRunCompletes()" function for the page refresh
  • WaitHelper.waitForElementToBeHidden() has been fixed with try-catch block

return !(isRunning());

try {
Thread.sleep(5000); // Wait for 5 second after the refresh
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to use the static wait as there are multiple threads running in parallel and UI responsiveness can introduce unwanted failures

Copy link
Member

Choose a reason for hiding this comment

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

can we move this to constant class?

Copy link
Member

@itsankit-google itsankit-google left a comment

Choose a reason for hiding this comment

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

please revert unintended checkstyle changes.

Also RetryUtils#retry was also running a loop and retrying the operation? What is changing now?

} catch (Exception e) {
e.printStackTrace();
}

Copy link
Member

Choose a reason for hiding this comment

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

nit: remove empty line

// Wait for the Pipeline run to complete for the default timeout
WaitHelper.waitForElementToBeHidden(CdfPipelineRunLocators.runningStatus);
} catch (Exception e) {
e.printStackTrace();
Copy link
Member

Choose a reason for hiding this comment

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

can we properly log the error?

try {
Thread.sleep(5000); // Wait for 5 second after the refresh
} catch (InterruptedException e) {
e.printStackTrace();
Copy link
Member

Choose a reason for hiding this comment

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

same comment here

return !(isRunning());

try {
Thread.sleep(5000); // Wait for 5 second after the refresh
Copy link
Member

Choose a reason for hiding this comment

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

can we move this to constant class?

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


Copy link
Member

Choose a reason for hiding this comment

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

remove empty line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants