Skip to content

Conversation

alf-devnull
Copy link
Contributor

What was the problem/requirement? (What/Why)

It's necessary that CondaPackages parameter should contain same UE version as the version of the project from job is submitted. Therefore the default value define in Template should be updated on submit if its differs

What was the solution? (How)

Add validation of CondaPackages parameter.

  • If CondaPackages parameter not in OpenJob parameters - skip validation.
  • Otherwise check if its value contains unrealengine=x.x (Regex)
    • If contains compare with current UE version of the Project
      • If equals, continue submit. Raise an Error otherwise
    • If its not there, build with current version

What is the impact of this change?

Job can't be submitted with wrong unreal engine conda package version

How was this change tested?

Submit Job without CondaPackages parameter - validation skipped
With empty CondaPackages parameter - unrealengine=x.x were added (5.4)
With CondaPackages=unrealengine=5.3 - raise an error (Project was on 5.4)
With CondaPackages=unrealengine=5.4 - validation passed (Project was on 5.4)

  • Have you run the unit tests?
    Yes

Have you run a render job successfully with these changes?

Yes

Was this change documented?

Yes

Is this a breaking change?

No

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@alf-devnull alf-devnull requested a review from a team as a code owner August 30, 2025 22:00
@alf-devnull alf-devnull changed the title Feat: Set right UE version to CondaPackages parameter feat: Set right UE version to CondaPackages parameter Aug 30, 2025
@Cherie-Chen
Copy link
Contributor

Thank you for looking into this. This feature will be extremely helpful for our users.

Proposed workflow for this feature:

  • Auto-Detection: Automatically detect user's current UE version
  • Version Handling:
    • Override 'CondaPackages' default UE version with user's current version
    • Display a warning popup if submission target version differs from current version
    • Allow users to submit jobs with mismatched UE versions if they choose to proceed

This will provide maximum flexibility while maintaining proper warnings for users.

@alf-devnull alf-devnull force-pushed the feature/check-ue-version branch from 5e34b9d to 89b5bbe Compare September 3, 2025 12:30
@Cherie-Chen
Copy link
Contributor

Cherie-Chen commented Sep 3, 2025

Formatting issue detected in unreal_open_job.py by code scanning tool.

To resolve:

  • View issues: Run hatch run lint
  • Auto-fix formatting: Run hatch run fmt

@Cherie-Chen
Copy link
Contributor

Hey, I've noticed something odd with the UE version detection. I'm running UE 5.5 (though I have 5.4 and 5.6 installed too), but the CondaPackages parameter is still showing 5.6. Oddly enough, I'm not seeing any validation warnings either, which is strange because I definitely got validation errors in the previous revision.

Could you please take a look again?

@alf-devnull
Copy link
Contributor Author

alf-devnull commented Sep 4, 2025

Hey, I've noticed something odd with the UE version detection. I'm running UE 5.5 (though I have 5.4 and 5.6 installed too), but the CondaPackages parameter is still showing 5.6. Oddly enough, I'm not seeing any validation warnings either, which is strange because I definitely got validation errors in the previous revision.

Could you please take a look again?

Regarding the appearance of 5.6: This value always taken from YAML template and we don't overwrite its content since its our source of truth. But that really strange that there were no warnings.

I've got a question: which UE version resulted job has: 5.6 or 5.5?

@Cherie-Chen
Copy link
Contributor

Cherie-Chen commented Sep 5, 2025

This value always taken from YAML template and we don't overwrite its content since its our source of truth.

Setting a default value for the CondaPackages parameter in unrealengine was implemented as a temporary solution to enable SMF support. We should enhance user experience by automatically detecting and populating the Unreal Engine version that the user is currently working with.

We still need to keep the default value for script-based job submissions, as it will be used when jobs are submitted programmatically.

BTW, pop-up warning dialog is working as expected in UE5.5 and UE5.6.

@Cherie-Chen Cherie-Chen closed this Sep 5, 2025
@Cherie-Chen Cherie-Chen reopened this Sep 5, 2025
@github-actions github-actions bot added the waiting-on-maintainers Waiting on the maintainers to review. label Sep 5, 2025
@alf-devnull alf-devnull force-pushed the feature/check-ue-version branch from 3d91b08 to 43f628a Compare September 12, 2025 12:04
@Cherie-Chen
Copy link
Contributor

Small change request.

When submitting a job with mis-matched UE version, we first popup a warning asking user if they want to continue. When user click "No", we pop up another error. Please remove the 2nd pop up of error.

Screen.Recording.2025-09-19.at.10.54.24.AM.mov

unreal.AppReturnType.YES,
)

if result != unreal.AppReturnType.YES:
Copy link
Contributor

@Cherie-Chen Cherie-Chen Sep 19, 2025

Choose a reason for hiding this comment

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

Same feed back as the video recording above. No need to raise error here.

Comment on lines 570 to 572
raise exceptions.InvalidUEVersionInCondaPackageParameterNoUI(
"CondaPackages Unreal Engine version mismatch"
)
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest modifying the check_conda_package_version function to return a boolean value. This would make the logic more straightforward:

  • Return true to continue job submission
  • Return false to stop the process

This approach would make the code more readable and easier to maintain.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adressed

@alf-devnull alf-devnull force-pushed the feature/check-ue-version branch from 67a43c0 to dbd119e Compare October 2, 2025 07:51
Copy link

sonarqubecloud bot commented Oct 2, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-maintainers Waiting on the maintainers to review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants