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

CI misc improvements #296

Merged
merged 54 commits into from
Aug 13, 2024
Merged

CI misc improvements #296

merged 54 commits into from
Aug 13, 2024

Conversation

justinlaughlin
Copy link
Contributor

@justinlaughlin justinlaughlin commented Jul 23, 2024

Changes:

  • Generate image diffs (abs and rel)
    • "abs" is the L2 of image diff in rgb space with a fixed scaling factor
    • "rel" is scaled by the max diff found in the images
    • PNGs are saved for "abs" and "rel"
    • An html is also generated using "rel". This lets you interactively zoom/pan to see where the test failed. It can only be viewed with an internet connection (this was done to save filesize)
  • Always run all tests (set fail-fast: false)
  • Rename artifacts to (hopefully) be less confusing
  • Misc refactoring
  • Separate unused code

tests/glvis_driver.py Outdated Show resolved Hide resolved
@tzanio
Copy link
Member

tzanio commented Jul 23, 2024

Should we add this to the checklist in #284?

@justinlaughlin
Copy link
Contributor Author

I don't think its necessary since it is only features to help with development. I think the other PRs are very close / ready so I don't want to hold up the release. This could be merged in afterwards.

@najlkin
Copy link
Contributor

najlkin commented Jul 23, 2024

You may just rerun it, the Mac runners are extra crappy 😄 🤭

@justinlaughlin
Copy link
Contributor Author

Btw, has anyone seen this error before? I definitely saw it in a test last week (trying to find the job) but in the next test it was fixed and I'm not sure why.

6: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'API misuse: setting the main menu on a non-main thread. Main menu contents should only be modified from the main thread.'

@najlkin
Copy link
Contributor

najlkin commented Jul 23, 2024

It happens randomly, I have seen that before. It is only on Mac 🍎🪱

@justinlaughlin
Copy link
Contributor Author

justinlaughlin commented Jul 23, 2024

You may just rerun it, the Mac runners are extra crappy 😄 🤭

oh, are you're telling me the mac tests are stochastic? 🤣

we should change the tests results to a probability density function instead of [PASS] / [FAIL]

edit: I was half-joking but out of 6 samples so far these are the {failed tests}: {6,10}, {9}, {10}, {10}, {10,20}, {}
I think this is a common issue though actions/runner-images#8642

edit2: I don't see any differences in the runner image between fails/success 🤔... Best solution might just be to re-run a couple of times on failure.

Current runner version: '2.317.0'
Operating System
  macOS
  14.5
  [2](https://github.com/GLVis/glvis/actions/runs/10067769382/job/27832593078?pr=296#step:1:2)3F79
Runner Image
  Image: macos-1[4](https://github.com/GLVis/glvis/actions/runs/10067769382/job/27832593078?pr=296#step:1:4)-arm64
  Version: 20240714.2
  Included Software: https://github.com/actions/runner-images/blob/macos-14-arm[6](https://github.com/GLVis/glvis/actions/runs/10067769382/job/27832593078?pr=296#step:1:7)4/20240714.2/images/macos/macos-14-arm64-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/macos-14-arm64%2F20240[7](https://github.com/GLVis/glvis/actions/runs/10067769382/job/27832593078?pr=296#step:1:8)14.2

edit3: @najlkin I noticed that runs that were using a cache instead of building mfem on macos failed. I tried forcing the mfem-build step for macos and it seems to have worked? We'll see...

edit4: forcing a build did not solve the macos failures😔

@tzanio tzanio changed the title Ci misc improvements CI misc improvements Jul 24, 2024
@najlkin
Copy link
Contributor

najlkin commented Jul 25, 2024

Just for testing, or maybe just attach an example file here so we can see it 😉

@najlkin
Copy link
Contributor

najlkin commented Jul 25, 2024

Still no HTML, it was not that bad idea to test it 😄

@justinlaughlin
Copy link
Contributor Author

justinlaughlin commented Jul 25, 2024

Just for testing, or maybe just attach an example file here so we can see it 😉

I changed the glvis/data hash to make an artifact, I'll switch it back later. There is an html file under mesh-explorer

image

image

@najlkin
Copy link
Contributor

najlkin commented Jul 25, 2024

Ahaa, like that, but why is it so big? It seems it still includes the picture data. I unzippzed only the HTML and it shows the pictures without the PNGs 😅

@justinlaughlin
Copy link
Contributor Author

Ahaa, like that, but why is it so big? It seems it still includes the picture data. I unzippzed only the HTML and it shows the pictures without the PNGs 😅

It is the bundled source code. There is an option under figure.write_html() called include_plotlyjs='cdn'. That reduces the filesize down to around the size of the images - but then the html can only be used online. We could do that?

@najlkin
Copy link
Contributor

najlkin commented Jul 25, 2024

No, I meant to use file://test.nominal....png in source, so no data in HTML. It is not possible?

@justinlaughlin
Copy link
Contributor Author

No, I meant to use file://test.nominal....png in source, so no data in HTML. It is not possible?

Can we discuss over slack real quick? might be easier

@najlkin
Copy link
Contributor

najlkin commented Jul 25, 2024

Maybe we could add here the that enabling of the style checks for PR CIs. Or separate? 🤔

@justinlaughlin
Copy link
Contributor Author

justinlaughlin commented Jul 25, 2024

Maybe we could add here the that enabling of the style checks for PR CIs. Or separate? 🤔

If you want to add it, up to you. Otherwise imo, separate PR. I need to work on another project so if we want to include this in 4.3 I say ship it as-is. I did consider that too

@tzanio tzanio mentioned this pull request Aug 7, 2024
12 tasks
@tzanio
Copy link
Member

tzanio commented Aug 10, 2024

I just merged master in here, and everything looks good.

Are we ready to merge this?

Copy link
Contributor

@najlkin najlkin left a comment

Choose a reason for hiding this comment

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

LGTM, good work 👍

Copy link
Member

@tzanio tzanio left a comment

Choose a reason for hiding this comment

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

Please mention in CHANGELOG

@justinlaughlin justinlaughlin merged commit 2b8a8ec into master Aug 13, 2024
10 checks passed
@justinlaughlin justinlaughlin deleted the ci-misc-improvements branch August 13, 2024 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants