Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow override of UploadSymbolsAutomatically value from an environment variable. #636

Merged
merged 4 commits into from
Oct 4, 2024

Conversation

Quogu
Copy link
Contributor

@Quogu Quogu commented Sep 18, 2024

The use-case for this is that we want to upload symbols in some CI builds, but not when developers build and cook locally, so currently we have to edit the config file DefaultConfig.ini as part of the CI process. This is cumbersome, as it has some awkward interactions with Perforce and e.g. TeamCity that make the state of the files on CI agents hard to reason about without adding a preamble script to every job that enforces the correct value, even ones that shouldn't need to touch this config file. It interacts especially poorly when a developer has edited DefaultConfig.ini in their Perforce changelist, and introduces risk when other jobs reusing the same workspace make commits back to Perforce.

Allowing an environment variable to be supplied instead will allow conditional enabling / disabling of symbol upload without having to edit files, making it much easier to implement without having to worry about the state of files on disk, so is much preferable.

I've tested this with Unreal Engine 5.4, and the environment variable is passed through from the call to UnrealAutomationTool through to invoking the post-build script.

…t variable.

The use-case for this is that we want to upload symbols in some CI builds, but not when developers build and cook locally, so currently we have to edit the config file DefaultConfig.ini as part of the CI process. This is cumbersome, as it has some awkward interactions with Perforce and e.g. TeamCity that make the state of the files on CI agents hard to reason about without adding a preamble script to every job that enforces the correct value, even ones that shouldn't need to touch this config file. It interacts especially poorly when a developer has edited DefaultConfig.ini in their Perforce changelist, and introduces risk when other jobs reusing the same workspace make commits back to Perforce.

Allowing an environment variable to be supplied instead will allow conditional enabling / disabling of symbol upload without having to edit files, making it much easier to implement without having to worry about the state of files on disk, so is much preferable.

I've tested this with Unreal Engine 5.4, and the environment variable is passed through from the call to UnrealAutomationTool through to invoking the post-build script.
… it's inside the else block for some reason.
@tustanivsky
Copy link
Collaborator

@Quogu Thank you for submitting this PR! The idea of configuring certain plugin behaviors via the environment variables has been there for a while so I guess symbol upload can become a good starting point for bringing it to life. We'll run some tests on our end and get back to you.

Meanwhile, would you mind adding a similar feature for Mac/Linux (upload-debug-symbols.sh) to keep things consistent across the supported platforms?

@Quogu
Copy link
Contributor Author

Quogu commented Sep 25, 2024

Hi @tustanivsky, I've added an equivalent implementation in the bash script, and in isolation, the change appears to work in WSL bash, but I don't have the means of testing this in-situ and making sure that the environment variable actually comes through properly via UBT.

@tustanivsky
Copy link
Collaborator

Looks good, thanks again @Quogu!

I'll make sure this is also mentioned in docs.

@tustanivsky tustanivsky merged commit 9e57f86 into getsentry:main Oct 4, 2024
2 checks passed
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