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

Add exit code to in case of error in test script #1710

Merged
merged 21 commits into from
Jan 10, 2024

Conversation

A-Harby
Copy link
Contributor

@A-Harby A-Harby commented Dec 17, 2023

Description

After the update script issue, the tests have been failing but passing in the test result because of the try and catch that have been added to the code. Removed all the try and catch from the scripts and added a checker after the delete all.

Update the yggdrasil version to the latest v0.5.4.

Changes

Only the scripts that are included in the grid nightly workflow.

Related Issues

#1673
#950

#1756

Copy link
Contributor

@zaelgohary zaelgohary left a comment

Choose a reason for hiding this comment

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

Maybe we can throw the error instead of logging it and exiting the process? Also, not all scripts are updated.

@xmonader
Copy link
Contributor

We need to make sure clean up function is always executed

@AhmedHanafy725
Copy link
Contributor

Maybe we can throw the error instead of logging it and exiting the process? Also, not all scripts are updated.

let's remove the try-catch block in case we need to make it crash on failure. There is no need for it

@A-Harby
Copy link
Contributor Author

A-Harby commented Dec 20, 2023

  • Removed try-catch from the test scripts, then all of them.
  • Update the workflow to check that all the contracts are deleted after cleaning up, and if not, the workflow will fail.
  • Change the time to 4 AM to run before mass deployment by 2 hours.
  • Tested both successful run and deletion failure.

@A-Harby
Copy link
Contributor Author

A-Harby commented Jan 3, 2024

Copy link
Contributor

@mohamedamer453 mohamedamer453 left a comment

Choose a reason for hiding this comment

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

In this run you can see that the contracts were deleted successfully, however the run failed in the Check if contracts are empty step, i think it might be giving a false positive, the issue might be that it needs a bit of time before listing all contracts to register that the contracts were deleted, so if it's possible to increase the timeout before doing this step to ensure that it's not giving a false positive.

@A-Harby
Copy link
Contributor Author

A-Harby commented Jan 4, 2024

In this run you can see that the contracts were deleted successfully, however the run failed in the Check if contracts are empty step, i think it might be giving a false positive, the issue might be that it needs a bit of time before listing all contracts to register that the contracts were deleted, so if it's possible to increase the timeout before doing this step to ensure that it's not giving a false positive.

This should be fixed and I test it here.

Copy link
Contributor

@mohamedamer453 mohamedamer453 left a comment

Choose a reason for hiding this comment

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

After the latest run the workflow seems to be working fine. great work!

@AhmedHanafy725 AhmedHanafy725 merged commit b63bcc4 into development Jan 10, 2024
8 of 10 checks passed
@AhmedHanafy725 AhmedHanafy725 deleted the development_add_exit_code_to_test_script branch January 10, 2024 10:14
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.

5 participants