Skip to content

Conversation

tustanivsky
Copy link
Collaborator

@tustanivsky tustanivsky commented Oct 13, 2025

This PR changes the debug symbol upload mechanism by replacing platform-specific shell scripts with a unified Python-based solution.

The proposed approach should make maintaining the symbol upload functionality easier and avoids the limitations encountered when attempting to implement the similar commandlet (#1076).

Note: Unreal Engine includes Python at $(EngineDir)/Binaries/ThirdParty/Python3/ so plugin users don’t need to perform any additional environment configuration or install dependencies.

Key changes:

  • Replaced dual shell scripts (upload-debug-symbols.sh and upload-debug-symbols-win.bat) with a single Python script (upload-debug-symbols.py)
  • Added thin platform-specific wrapper scripts (post-build-steps-{platform}.sh/bat) that handle plugin's binaries management and invoke the Python script
  • Updated Sentry.uplugin PostBuildSteps to use cleaner delegation pattern inspired earlier by the commandlet approach
  • Added a retry mechanism for the symbol upload command to address file locking issues when building multiple configurations simultaneously
  • Added symbol upload configuration to Linux and Windows CI test workflows

Closes #542
Closes #972

Comment on lines +133 to +135
-e SENTRY_AUTH_TOKEN="$SENTRY_AUTH_TOKEN" \
-e SENTRY_ORG="$SENTRY_ORG" \
-e SENTRY_PROJECT="$SENTRY_PROJECT" \
Copy link
Contributor

Choose a reason for hiding this comment

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

There now is a org-auth-token that would allow us to omit the SENTRY_ORG.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also for Symbol upload?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Let’s keep setting the organization explicitly for now as things could get confusing if the "wrong" token type is used.

id: run-tests
env:
EDITOR_BINARY: ${{ inputs.unreal-version == '4.27' && 'UE4Editor.exe' || 'UnrealEditor.exe' }}
SENTRY_UPLOAD_SYMBOLS_AUTOMATICALLY: true
Copy link
Contributor

Choose a reason for hiding this comment

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

Is that getting used anywhere else?

Copy link
Contributor

Choose a reason for hiding this comment

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

In the upload debug symbol python script, it's getting forwarded to docker environment

Comment on lines +11 to +12
# Grant execute permissions to sentry-cli binary (FAB version of the plugin doesn't preserve file permissions)
if [ -f "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Linux-x86_64" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand how this works. The .sh does have permissions to grant permissions?

Copy link
Contributor

Choose a reason for hiding this comment

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

It can grant permissions if the user running it has permissions to do so.

if [ -f "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Linux-x86_64" ]; then
chmod +x "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Linux-x86_64"
fi

Copy link
Contributor

@bitsandfoxes bitsandfoxes Oct 14, 2025

Choose a reason for hiding this comment

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

The Windows cross-compilation copies the crash handler, but the Linux-native script doesn't?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Manual crashpad copying is only required when using the FAB version of the plugin. Since the Epic Games Launcher is not available on Linux, users can’t download the Sentry plugin from the FAB there, so this step isn’t needed for the native build.

Co-authored-by: Stefan Jandl <reg@bitfox.at>
@tustanivsky tustanivsky merged commit 2a175a8 into main Oct 14, 2025
30 checks passed
@tustanivsky tustanivsky deleted the feat/sym-upload-python branch October 14, 2025 11:29
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.

Automatic symbols upload is disabled. Skipping... Intermittent "os error 32" ("file being used by another process")

3 participants