Replies: 3 comments 3 replies
|
@forsyth2 thanks for organizing this discussion. I think two things would enhance the current framework, let me know if this makes sense, I’m sure there may be cases this hasn’t considered/covered.
The problemWhen the weekly test shows image diffs, we can't tell whether our code caused them or a dependency update did Root causeThere are two independent sources of image diffs:
Today they land in a single test run, so neither can be read cleanly. Current vs. proposed
How it worksOne baseline = a set of expected images + a lock file recording the exact resolved env that produced them ( Each cycle runs the current code two ways:
A human reviews both, then makes one bless decision:
The expected images and the lock always move together — that pairing is what keeps "a diff = our code" true. Diffs outside our control (external package problems)
What we're not doing (keeping it simple)
AutomationThe heavy tests already run end-to-end via
Blessing stays manual — automation reports, a human decides. Relationship to the open PRsThis is essentially #849's two-run idea, made reproducible: the "frozen env" becomes a resolved lock file tied to each baseline that advances on every bless (rather than a re-created |
|
@tomvothecoder @forsyth2 @chengzhuzhang On every Linux system I know, a user is given the rights to a personal "crontab" file, operated by root but limited in permissions to the ordinary user account permissions. If a user (someone with an account) can execute a bash script that loops, sleeps and runs other stuff, then there is no added privilege in having a crontab as well. The added benefits of a crontab are:
Where one has very complex, multi-application workflows with operational inter-dependencies, a workflow orchestrator like "Jenkins Pipelines" may be of service, but I have personally never needed such involved scheduling controls. At the very least, simple crontab entries can launch control scripts that assess other dependencies for prototyping more complex flows. |
|
@xylar noted on the 8/12 test results thread:
This makes me think #852 (allow partial updates of expected results) is the higher priority issue compared with #849 (double-test: once with our changes, once with dependency changes). Xylar's note here reveals a flaw in my line of thinking noted in the "Proposed changes" section above. Specifically, I had said:
But "we see something truly out of the ordinary" isn't actually that rare of a case. Dependency version updates can and do reveal/create bugs in our code. As noted in the same thread, some diffs were purely cosmetic but others were genuine bugs. My takeaway here is that testing against a frozen env is less valuable than I had originally thought. I think it's more important that we're able to update the expected results we know are correct, so that they don't get "stale" waiting for everything to be perfect. @chengzhuzhang with that in mind, I'm thinking we should direct our attention to merging #852, but with some sort of printout/log of what environment was used for each task (not just |
Uh oh!
There was an error while loading. Please reload this page.
@chengzhuzhang @tomvothecoder (cc @zhangshixuan1987, @xylar) This post expands on the discussion from today's meeting. It is a follow-up to #848, which was focused on
pcmdi_diags, and two un-merged PRs (#849, which enables testing using frozen environments and #852, which enables partial updates of expected results)The current test workflow
The current test workflow is documented here. With the merging of #774, many of those steps have been automated away; the mostly automated workflow is documented here. With either method, there are four possible cases:
In cases 3 & 4, we need to update the expected results. The process to do that is documented here. It includes running several updater scripts, depending on what test you're updating results for.
I've outlined two proposed changes below, corresponding to the two un-merged PRs mentioned above.
Proposed changes
Testing with frozen environments
In #848, @zhangshixuan1987 suggested we test using a frozen environment, so we can be sure it's changes we made that are causing the diffs. This would essentially eliminate case 4 above. With that in mind, I started implementing #849. However, @xylar pointed out that this makes the E3SM Unified release extremely difficult. We agreed here that the ideal solution would be:
That is, test run 1 lets us know if we're in case 2 or 3 (we caused a failure, either expected or not), test run 2 lets us know if we're in case 4 (dependencies caused a failure). This is obviously a bit more of a hassle, but with the test script now automated, it should be more straight-forward.
Potential concerns:
Partially updating expected results
#852 updates the expected results-updater scripts mentioned above, such that only a portion of the expected results are updated. This is extremely useful in cases where we know we can update the expected results for some tasks, but not others. For example, on the 8/12 test, we knew we could update the expected results for
e3sm_diags,global_time_series, andpcmdi_diags, but that we should not update the expected results yet formpas_analysis.Potential concerns:
ls -lt /lcrc/group/e3sm/public_html/zppy_test_resources(the expected results dir) now shows everything with a date stamp of 8/14, even thoughmpas_analysiswasn't updated yet.ls -lt /lcrc/group/e3sm/public_html/zppy_test_resources/expected_comprehensive_v3in fact shows a 8/14 update fore3sm_diags,global_time_series, andpcmdi_diags, and a 5/20 update formpas_analysis,livvkit, andilamb.livvkitandilambweren't updated either -- they had no failures, so there's not much point in re-writing their expected results./lcrc/group/e3sm/public_html/zppy_test_resources_previous/, so we can roll back to previous expected results if need be.@tomvothecoder also had a suggestion that involved keeping track of the dependency versions. This is not currently done for the expected results directory. It is also worth pointing out we'd need a full dev environment printout not only for
zppybut all the tasks it calls (e3sm_diags,mpas_analysis, etc.).Why care about updating the expected results often?
Updating the expected results frequently is really important to ensuring we know what actual changes are being introduced. As noted above, a frequent occurrence is that a pixel shift produces a bunch of diffs even though the plots are actually 100% acceptable. Let's call that
task1. Say we can't update the expected results though, because a different task,task2has real failures to debug. The following week we merge a new feature ontask1, but remember we still haven't updated the baseline expected results. Now, it's impossible for me to tell if all these diffs are just the pixel shift we already knew about or new bugs introduced by this new feature! Now imagine this goes on for a few weeks, perhaps withtask3ortask4failing as well. Now, the expected results are weeks or even months out of date. They've essentially become useless as a comparison point. (In fact, currently, the last expected results are from May 20, almost 3 months ago!)All reactions