i_1231 Handle ignore_sample if no sample folder in root#1260
Open
johnbrvc wants to merge 1 commit into
Open
Conversation
I misconfigured contest that specifies ignore_sample with no sample folder shouldn't cause an error. We should log a message and handle it as if the ignore_sample was not present.
clevengr
approved these changes
May 25, 2026
Contributor
clevengr
left a comment
There was a problem hiding this comment.
I reviewed the code changes; they all look reasonable to me.
I followed the test procedure specified in the PR and it worked as intended.
I also started up a WTI team client and verified that it works as intended with WTI submissions as well (not that I expected it wouldn't; just being thorough).
Kudos for providing the fully-configured sample contest; it made test extremely easy (it took only about 10 minutes) when otherwise I think it would have taken me hours to figure out how to set up a valid test. Nicely done!
I approve the PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of what the PR does
If a misconfigured contest specifies
ignore_sampleand there is no sample folder we log a message and handle it as if the ignore_sample was not present. That is, this is no loner a fatal error.Noticed during the NAC2026 Challenge. This PR was (successfully) used during the NAC2026 Challenge to address this issue.
Issue which the PR addresses
Fixes #1231
Environment in which the PR was developed (OS,IDE, Java version, etc.)
java version "1.8.0_321"
Java(TM) SE Runtime Environment (build 1.8.0_321-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.321-b07, mixed mode)
Ubuntu 24.04.3
Precise steps for testing the PR (i.e., how to demonstrate that it works correctly)
Preface: It took me a GREAT DEAL of time to write and configure this test procedure. I am trying to take the difficultly out of the testing equation by supplying as much "turn-key" testing tools as possible now. This test procedure includes a ZIP File attached here. The zip file is "Windows" centric, meaning, it is meant to be used on Windows. This is not to say you can't test this on Linux, of course you can, but you will have to make some changes to the configuration: specifically, the
problem.yaml, to make use of the non-windows, non-.exe version of the output validator. In addition, you'll have to modify the judge's data path accordingly. Also, you'll have to copy thesystem-linux.yamloversystem.yamlso you use Linux compilers instead of Windows based ones. The mode of the "validate" program in theoutput_validators/validatorfolder will likely have to be changed to make it executable.If you are going to test on Windows, nothing in the configuration has to be changed unless you choose NOT to locate the extracted ZIP file in
C:\tmp. If you want this test procedure to be as painless as possible, I suggest you extract this ZIP File in a folder calledC:\tmp. Extracting it there will create:C:\tmp\i1231-contestwhich is a FULL one problem contest to test this PR. The problem came from the NAC2026 Challenge (specifically, the "ComputeAllocation" problem.) I have precompiled the validator and preconfigured theproblem.yamlto use the validator. All that being said, if you have problems testing this PR I will be extremely surprised.Prerequisite: You must have g++ installed on your PC. From a command prompt, you should be able to type
g++ --versionand get valid output. If not, good luck and all bets are off and you are on your own:C:\tmpfolder to produce:C:\tmp\i1231-contest--server --login s --contestpassword contest --load /tmp/i1231-contestC:\tmp\i1231-contest\config\computeallocation\submissions\accepted\tourist.cpp- this is one of the judge's accepted solutions.ex_1_A_computeallocation_1_cpp_judge1graderLog-data.txtfile and open it with notepad or cat or whatever viewing program you want. You should see the following, indicating the PR has worked properly. (Note the Notice: message.)