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

Add debug symbols upload #59

Merged
merged 30 commits into from
Aug 21, 2022
Merged

Add debug symbols upload #59

merged 30 commits into from
Aug 21, 2022

Conversation

tustanivsky
Copy link
Collaborator

@tustanivsky tustanivsky commented Aug 11, 2022

Resolves #47
Resolves #57
Resolves #60

It will also make sense to automate Sentry CLI update in a way similar to other plugin dependencies (#60)

plugin-dev/Scripts/upload-debug-symbols-win.ps1 Outdated Show resolved Hide resolved
return $ini
}

$ConfigIni = ParseIniFile "$ConfigPath\DefaultEngine.ini"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this file normally under version control? If so, we shouldn't use it for sentry CLI configuration (a.k.a sentry.properties) as that's supposed to be excluded from git due to the auth-token.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, DefaultEngine.ini is an essential part of any UE project that keeps all of its settings (including plugins) and usually it's under source control. Though I don't think it can cause any issues for plugin users since they are likely to take care of securing their project config files. Or did I get it wrong?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Even if it's in a private repo, unless it's a single-person project, it's best not to commit auth tokens into source control. Additionally, this disqualifies any open-source games.

Copy link
Collaborator

@vaind vaind Aug 17, 2022

Choose a reason for hiding this comment

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

I'd suggest sticking to a single sentry.propertiies file, regardless of the platform

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Don't we have the exact same issue with Unity then? AFAIK there auth token is stored in a separate asset (SentryCliOptions scriptible object) which apparently could be a part of the game as well

Copy link
Collaborator

@vaind vaind Aug 17, 2022

Choose a reason for hiding this comment

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

yes, we use the sentry.properties file on windows without an issue with Unity

Copy link
Collaborator

@vaind vaind Aug 18, 2022

Choose a reason for hiding this comment

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

Practical illustration why we shouldn't store the settings in the same file as everything else - from the in-repo sample PR (#64):

image

How can we move that to a different location so the "shared" file doesn't change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How can we move that to a different location so the "shared" file doesn't change?

We can replace user credentials here with a path to sentry.properties file which won't be publicly accessible. Later we can add some editor tool that will automate the creation of this file. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

sounds good to me

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Alright, no more user credentials in DefaultEngine.ini. Now in order to obtain auth token and other stuff for Sentry CLI path to sentry.properties file has to be provided firs. Apparently not an ideal solution since it may vary on different machines, though at least we've removed the risk of compromising sensitive data

@github-actions
Copy link
Contributor

github-actions bot commented Aug 19, 2022

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 4fa854f

@tustanivsky tustanivsky requested a review from vaind August 19, 2022 08:59
@vaind
Copy link
Collaborator

vaind commented Aug 19, 2022

@tustanivsky for Android, we need to update the UPL file - how can we reference the ProjectDir and the Sentry.PropertiesFilePath here?

<copyFile src="$S(PluginDir)/../../Resources/sentry.properties" dst="$S(BuildDir)/gradle/sentry.properties" />

@tustanivsky
Copy link
Collaborator Author

@tustanivsky for Android, we need to update the UPL file - how can we reference the ProjectDir and the Sentry.PropertiesFilePath here?

<copyFile src="$S(PluginDir)/../../Resources/sentry.properties" dst="$S(BuildDir)/gradle/sentry.properties" />

$S(ProjectDir) should give us the path to the project directory and the sentry.properties file can be referenced via $S(PropertiesFilePath) variable which is defined above.

It actually looks like something went wrong during recent merges - src should be $S(PropertiesFilePath)

@vaind
Copy link
Collaborator

vaind commented Aug 19, 2022

It actually looks like something went wrong during recent merges - src should be $S(PropertiesFilePath)

fixed

please have a look at my changes and feel free to merge. Also, can you please manually check macOS? I've only tested windows & android with these changes

@tustanivsky tustanivsky merged commit 4ec6db1 into main Aug 21, 2022
@tustanivsky tustanivsky deleted the feature/debug-symbols-upload branch August 21, 2022 09:41
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 Sentry CLI update in CI Unreal Engine Debug File Uploads Automatic debug symbols upload for iOS
2 participants