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

Testing new way to specify azure tests #20060

Closed
wants to merge 15 commits into from

Conversation

markcmiller86
Copy link
Member

@markcmiller86 markcmiller86 commented Nov 20, 2024

Description

This PR adjusts how Azure CI testing is handled.

  1. To add any .py file in src/test/tests to Azure CI, just add the string prci to the comma separated CLASSES list in the .py file header comments. Be sure to follow requirements specified in src/test/prci_checksum.txt though.
  2. A new GitHub action computes a checksum over all such .py files and holds it in src/test/prci_checksum.txt
  3. Azure CI is triggered when, among other paths, src/test/prci_checksum.txt has changed.

Type of change

  • Bug fix~~
  • New feature~~
  • Documentation update~~
  • Other~~

How Has This Been Tested?

Reminders:

  • Please follow the style guidelines of this project.
  • Please perform a self-review of your code before submitting a PR and asking others to review it.
  • Please assign reviewers (see VisIt's PR procedures for more information).

Checklist:

  • I have commented my code where applicable.~~
  • I have updated the release notes.~~
  • I have made corresponding changes to the documentation.~~
  • I have added debugging support to my changes.~~
  • I have added tests that prove my fix is effective or that my feature works.~~
  • I have confirmed new and existing unit tests pass locally with my changes.~~
  • I have added new baselines for any new tests to the repo.~~
  • I have NOT made any changes to protocol or public interfaces in an RC branch.~~

@cyrush
Copy link
Member

cyrush commented Nov 20, 2024

I like this idea. One thing to check with the trigger: We need to make sure it triggers if the contents of symlink change. The symlink itself is a version controlled entity, so I am not 100% sure changes to the destination will be seen.

@markcmiller86
Copy link
Member Author

I like this idea. One thing to check with the trigger: We eed to make sure it triggers if the contents of symlink change. The symlink itself is a version controlled entity, so I am not 100% sure changes to the destination will be seen.

Doh! OMG...you are right. ChatGPT says the paths: clause will consider only changes to the symlink itself, not the target. Well, that is less than desireable 😢. I mean, we can probably be ok with a paths: entry of the form src/test/tests/*/*.py which will be a bit overkill but would still at least cover the tests actually run during Azure CI.

@markcmiller86
Copy link
Member Author

Ok, so I did get a pass with this approach in baee914. This approach makes it easier to add tests to Azure CI without having to change the azure-piplines.yml file but doesn't allow for a better trigger based on paths due to reasons mentioned above.

I am trying a different approach now.

@@ -1,5 +1,5 @@
# ----------------------------------------------------------------------------
# CLASSES: nightly
# CLASSES: nightly, prci
Copy link
Member

Choose a reason for hiding this comment

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

Your first condition for PRCI tests isn't true for blueprint: The test typically takes less than 20 seconds to run "normally".

Copy link
Member Author

Choose a reason for hiding this comment

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

The condition is about adding new tests...not about anything preexisting this work.

Copy link
Member

Choose a reason for hiding this comment

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

I see

@JustinPrivitera
Copy link
Member

I feel like we could use some dev docs explaining how to go about adding new tests to the CI. If you haven't seen this PR, the process is mysterious.

@cyrush
Copy link
Member

cyrush commented Nov 21, 2024

@markcmiller86 this is growing a bit complex.

I think simply triggering CI if any py file changes is not the end of the world.

Don't really like the idea of extra commits from the robot to updated the checksum. (those will be in our history)

Also, worried about the timing interaction between github actions and azure.

I really don't like the fact that the CI could trigger on a later, unrelated PR.

@markcmiller86
Copy link
Member Author

@markcmiller86 this is growing a bit complex.

How is this more complex than checking the BLT hash as part of something called the "BLT Time Travel Check"?

I think simply triggering CI if any py file changes is not the end of the world.

Triggering CI is not really what this PR is about. I mean, its certainly part of it but a substantially smaller part than...

  • Being able to easily add (and remove) a .py file to the set of tests run during Pull Request CI without having to go change azure-pipelines.yml. With this PR, this is accomplished simply by adding (or removing) prci in the .py file header.
  • Having to maintain a wholly separate list of .py files to be used in Pull Request CI in azure-pipelines.yml.
  • Not triggering CI when changes don't change what CI computes.

Don't really like the idea of extra commits from the robot to updated the checksum. (those will be in our history)

But those are apparently ok from LC cron jobs during from nightly testing

Also, worried about the timing interaction between github actions and azure.

Nothing to worry about. As explained in prci_checksum.txt, if Azure fires first, it will be cancelled thereafter by the GitHub action.

I really don't like the fact that the CI could trigger on a later, unrelated PR.

Either I don't understand this statement or the statement is false.

@JustinPrivitera
Copy link
Member

Triggering CI is not really what this PR is about. I mean, its certainly part of it but a substantially smaller part than...

* Being able to _easily_ add (and remove) a `.py` file to the set of tests run during Pull Request CI without having to go change `azure-pipelines.yml`. With this PR, this is accomplished simply by adding (or removing) `prci` in the `.py` file header.

you also have to add a symlink for it too

* Having to maintain a wholly separate list of `.py` files to be used in Pull Request CI in `azure-pipelines.yml`.

Either the list is there or it is in this new tests/azure folder. I think I prefer it in azure-pipelines.yml.

* Not triggering CI when changes don't change what CI computes.

Don't really like the idea of extra commits from the robot to updated the checksum. (those will be in our history)

But those are apparently ok from LC cron jobs during from nightly testing

I don't know that we want even more robo commits.

I agree with Cyrus that this all feels complicated. The barrier to entry to understanding how all this works is higher than before.

@markcmiller86
Copy link
Member Author

you also have to add a symlink for it too

Thats not true. Whoops...forgot to remove that stuff. Not needed anymore in this PR

@@ -158,8 +126,8 @@ stages:
# add to ld_lib path (rpaths are missing?)
export LD_LIBRARY_PATH=${VTK_LIB_DIR}:${OSPRAY_LIB_DIR}:${QT_LIB_DIR}
# run test suite on silo + blueprint tests
export TESTS="$(python_test_files)"
./run_visit_test_suite.sh --fuzzy --pixdiff 10 --avgdiff 10 --numdiff 0.1 -v ${TESTS}
export TESTS="$(find ../../src/test/tests -name '*.py' -exec grep -H -m 1 CLASSES {} \; | grep prci | cut -d':' -f1)"
Copy link
Member

Choose a reason for hiding this comment

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

I am not familiar enough with all of these commands to know exactly what is happening... if someone names a variable in a python test prci will the test get unwittingly triggered in CI?

@markcmiller86
Copy link
Member Author

I don't know that we want even more robo commits.

That seems to fly in the face of "more automation" to make our lives easier. Something I've also heard discussed a lot in our team recently.

I don't know what to do about vague statements such as "this feels complex".

I can respond to specific issues for which a technical argument has been offered.

Ok, I see another email...feels like people are just looking for reasons to decline this. I will close.

@markcmiller86 markcmiller86 deleted the task-mcm86-19nov24-expand-azure-tests branch November 21, 2024 21:42
@cyrush
Copy link
Member

cyrush commented Nov 22, 2024

It looks like this could create a commit for every push to a PR, which is not the same as the test suite results (max of one commit per day to the develop branch).

Are those pushed to the current branch? Will those re-trigger the CI? I don't understand it and can't predict how the multiple CI jobs and commits will interact.

Could we still have the symlink folder to organize the ones we want to run on azure and then trigger if any python file in all of the test suite has changed?

Or just run our own script to see if any of those files were changed at the start of the main CI for an easy + fast exit with a pass.

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.

4 participants