Skip to content

I_1217 Source unavailable in some cases for submissions from API and a primary.#1218

Open
johnbrvc wants to merge 2 commits intopc2ccs:developfrom
johnbrvc:i1217_source_unavailable
Open

I_1217 Source unavailable in some cases for submissions from API and a primary.#1218
johnbrvc wants to merge 2 commits intopc2ccs:developfrom
johnbrvc:i1217_source_unavailable

Conversation

@johnbrvc
Copy link
Collaborator

@johnbrvc johnbrvc commented Feb 7, 2026

Description of what the PR does

Fix EventFeedUtilities.java to ignore zip file names that are empty or are directories (end in a /).
CI: Somewhat related, but do not create a zip file for an API submission source file request with entries that have empty filenames.
CI: Fix errant comment.
CI: Change overrideSubmissionID to default of 0 since a submission will not have an ID of 0. A negative submission ID is special and will get converted to a positive number, so -1 is really submission 1, hence we can't use that as a default.

Issue which the PR addresses

#1217

Environment in which the PR was developed (OS,IDE, Java version, etc.)

Windows 11
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)

Linux Ubuntu 24.04.3 (for testing)

Precise steps for testing the PR (i.e., how to demonstrate that it works correctly)

  1. Unzip the attached zip (pr1217files.zip) file into a new directory someplace convenient. BTW, you'll need python3 installed for this test procedure to work, otherwise --- you're on your own.
    pr1217files.zip
  2. Load up a clean copy of the sumithello contest
  3. Start the contest
  4. Start an administrator client.
  5. On the Configuration->Accounts tab, Generate a single EventFeeder account.
  6. On the Configuration->Accounts tab, edit the feeder1 account just created and in the Permissions/Abilities pane on the right, scroll down to Shadow Proxy Team and check the box next to it. This allows the CLICS api to make submissions on behalf of a team.
  7. On the Configuration->Settings tab, under Remote CCS Settings, check both the "Enable CCS Test Mode" and "Enable Shadow Mode" check boxes. (This is more of a historical thing, but is required for the CLICS API submit to work.)
  8. Start an event feeder client (pc2ef) or from eclipse, just start a pc2 client and use the login ef1.
  9. Press the Start button on the event feeder. This will start the CLICS API reader on port 50443.
  10. Navigate to where your ~/.netrc file is located (either $HOME/.netrc on Linux or C:\Users\USERNAME\.netrc on Windows)
  11. Edit the .netrc file and make sure there are no lines that refer to localhost in there. If there are, remove them, or the script below will use those credentials to log into PC2, which is NOT what you want here.
  12. From a command prompt, change to the directory where you extracted the pr1217file.zip file.
  13. Execute either doplayback1.sh (Linux) or doplayback1.bat (Windows). This will make a submission using the 1.zip file included in pr1217file.zip. 1.zip contains a hierarchy which aggravated the bug previously.
  14. After the submission completes successfully, go to the administrator Run Contest->Runs tab.
  15. Select the only run there (Run id 1).
  16. Press the View Source button. You should see some source code pop up and NOT receive an error.

Fix EventFeedUtilities.java to ignore zip file names that are empty or are directories (end in a /).
CI: Somewhat related, but do not create a zip file for an API submission source file request with entries that have empty filenames.
Fix errant comment.
Change overrideSubmissionID to default of 0 since a submissions can not have an ID of 0.  A negative submission ID is special and will get converted to a positive number, so -1 is really submission 1.
@johnbrvc johnbrvc added this to the 9.11.0 milestone Feb 7, 2026
@johnbrvc johnbrvc self-assigned this Feb 7, 2026
Copy link
Collaborator

@JoeTerlizzi JoeTerlizzi left a comment

Choose a reason for hiding this comment

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

Ran according to instructions with success.
Windows 11

Change the doplayback1.bat from ${subfile} to %subfile%

Make note for users to delete or edit their .netrc file to use admin logins.

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.

2 participants