Skip to content

build: download ACKNOWLEDGEMENTS.md for sentry-cli when packing#5231

Open
jamescrosswell wants to merge 1 commit into
mainfrom
fix/issue-4588-cli-acknowledgements
Open

build: download ACKNOWLEDGEMENTS.md for sentry-cli when packing#5231
jamescrosswell wants to merge 1 commit into
mainfrom
fix/issue-4588-cli-acknowledgements

Conversation

@jamescrosswell

Copy link
Copy Markdown
Collaborator

Summary

The Sentry NuGet package bundles sentry-cli executables under tools/. Those binaries statically compile dozens of third-party Rust crates whose OSS licenses (Apache 2.0, MIT, etc.) require attribution when the software is redistributed. This PR adds the infrastructure to download and pack the ACKNOWLEDGEMENTS.md that sentry-cli will publish alongside its binaries.

What changed

  • Inside DownloadSentryCLI, added a DownloadFile step for the platform-independent ACKNOWLEDGEMENTS.md from https://downloads.sentry-cdn.com/sentry-cli/<version>/ACKNOWLEDGEMENTS.md.
  • The existing <None Include="$(SentryCLIDirectory)**" Pack="true" PackagePath="tools\"> wildcard already covers this file, so no extra pack entry is needed.
  • ContinueOnError="WarnAndContinue" is used while getsentry/sentry-cli#2823 is still in progress (the file is not yet published in sentry-cli releases). Once that ships:
    • Remove ContinueOnError.
    • Add the file hash to the release registry spec and extend update-cli.ps1 to update it.

Testing

  • Local build emits a single MSBuild warning (MSB3923: Failed to download) for the missing file — not an error — confirming graceful degradation.
  • Once sentry-cli#2823 ships, a version-bump via update-cli.ps1 set-version <new> + publish build will pull the file and pack it automatically.

Closes #4588

#skip-changelog

The Sentry NuGet package redistributes the sentry-cli executables, which
compile third-party Rust crates whose OSS licenses require attribution.
Add a download step for the platform-independent ACKNOWLEDGEMENTS.md
alongside the existing platform-specific binary downloads so it is
automatically included in the tools\ folder of the published package.

ContinueOnError="WarnAndContinue" is used as a temporary fallback while
getsentry/sentry-cli#2823 (adding the file to releases) is in progress.
Once that ships the error handling can be tightened and hash verification
added via update-cli.ps1.

Closes #4588

#skip-changelog

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov

codecov Bot commented May 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.12%. Comparing base (a9cb3b2) to head (650d990).
⚠️ Report is 48 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5231   +/-   ##
=======================================
  Coverage   74.12%   74.12%           
=======================================
  Files         508      508           
  Lines       18282    18282           
  Branches     3574     3574           
=======================================
  Hits        13551    13551           
  Misses       3861     3861           
  Partials      870      870           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jamescrosswell jamescrosswell marked this pull request as ready for review May 17, 2026 22:28
@jamescrosswell jamescrosswell requested a review from Flash0ver as a code owner May 17, 2026 22:28
@jamescrosswell

Copy link
Copy Markdown
Collaborator Author

@Flash0ver is this what you had in mind?

@jamescrosswell jamescrosswell added the skip-changelog Suppress automatic changelog generation via Craft label May 27, 2026

@Flash0ver Flash0ver left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure if we should do this before getsentry/sentry-cli#2823 is completed and shipped.

Comment thread src/Sentry/Sentry.csproj
SourceUrl="https://downloads.sentry-cdn.com/sentry-cli/$(SentryCLIVersion)/ACKNOWLEDGEMENTS.md"
DestinationFolder="$(SentryCLIDirectory)"
Condition="!Exists('$(SentryCLIDirectory)ACKNOWLEDGEMENTS.md')"
ContinueOnError="WarnAndContinue"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

question: should we do this now?

Since getsentry/sentry-cli#2823 is not complete yet, this will always fail.
Should we wait until getsentry/sentry-cli#2823 is completed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I've marked the issue this closes as blocked by 2823.

Comment thread src/Sentry/Sentry.csproj
ContinueOnError is temporary while getsentry/sentry-cli#2823 is in progress —
remove it once sentry-cli starts publishing this file in releases.
-->
<DownloadFile

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

question: multi-targeting

Is this task executed multiple times, do to multiple TargetFrameworks?
If so - can we easily ensure to only run once?

Comment thread src/Sentry/Sentry.csproj
Comment thread src/Sentry/Sentry.csproj
Comment on lines +139 to 143
Retries="3" />

<!-- Set executable permissions for local usage. -->
<Exec Command="chmod +x $(SentryCLIDirectory)*" Condition="!$([MSBuild]::IsOSPlatform('Windows'))" />
</Target>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

question: make .md file executable

Already existing code ... but would we make the .md file with the existing/following Exec task "execute" too? Could this be an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blocked skip-changelog Suppress automatic changelog generation via Craft

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pack acknowledgements for third-party libraries of Sentry CLI

2 participants