Skip to content

Conversation

@Zahed-Riyaz
Copy link
Contributor

@Zahed-Riyaz Zahed-Riyaz commented Jun 25, 2025

[Fix #119] This PR implements the feature to allow hosts to create multiple versions of challenges using different git branches.

I tested it by forking the repo with the commits of this PR.

  • RNG - Singular challenge was made using the default starters repo, could not create a version 2 of it.
  • The other 2 were created using the commits implemented via this PR. The only changes made between these two challenges were title and descriptions.

Screenshot 2025-06-23 at 6 57 02 PM

Limitations :

  • This PR does not account for different host configurations/different teams via different git branches.

@Zahed-Riyaz
Copy link
Contributor Author

Added an extra job in the validate-and-process.yml file.

Detect & Validate Branch :

  • Grabs the actual branch name (from github.head_ref on PRs or github.ref_name on pushes).
  • Checks whether it follows the challenge(-suffix)? pattern.
  • If it does, it flags is_challenge_branch=true and extracts the optional suffix (for versioning).
  • If not, it sets is_challenge_branch=false and the rest of the workflow can skip challenge processing.

Added lines in challenge_processing_script.py :

  • Added an optional branch_name positional arg (e.g. challenge-v2).
  • Enforced that any provided branch must match ^challenge(-.*)?$.
  • Add BRANCH_NAME to the POST payload so EvalAI treats each branch as a separate version

Updated the README.md file to reflect these changes.

@Zahed-Riyaz Zahed-Riyaz marked this pull request as ready for review June 25, 2025 11:28
@RishabhJain2018
Copy link
Member

Hey @Zahed-Riyaz, Please resolve the conflicts here?

@Zahed-Riyaz
Copy link
Contributor Author

@RishabhJain2018 I think it's good to go

Copy link
Member

@RishabhJain2018 RishabhJain2018 left a comment

Choose a reason for hiding this comment

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

Hey @Zahed-Riyaz , I think you need to make the change in the backend as well. I don't think we are storing for now which branch is used to create a challenge, since it was always the challenge branch. I think we should also store the branch and repository name (We already store that.)

Also, let's restrict the branch pattern to be challenge-<year>-<versions>. Just in case if someone has multiple versions for a challenge in the same year.

@Zahed-Riyaz
Copy link
Contributor Author

Hi @RishabhJain2018 sure I'll check it out and open a PR later.

@Zahed-Riyaz Zahed-Riyaz force-pushed the challenge-versions branch from 9d1ee53 to 164f991 Compare July 9, 2025 07:24
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.

➕ Support Multiple Challenge Versions in Same Repository via Branches

2 participants