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

refactor: Remove custom targets, use 'None' item group #1472

Merged
merged 13 commits into from
Dec 11, 2024
Merged

Conversation

jviau
Copy link
Contributor

@jviau jviau commented Apr 10, 2024

Description

This PR refactors the python worker nuget package targets as follows:

  1. Removes current custom targets/properties
    1. Properties, items, targets all share the same global namespace. Naming these generally increases risk of conflicts with other props/items/targets.
  2. Leverages None item group with appropriate metadata to have CopyToOutputDirectory and CopyToPublishDirectory targets perform the copies for us.
    1. Instead of copying files to output or publish manually, you can add to various existing item groups and tag them to be copied.
    2. This change improves incremental build support, avoiding copies when the files already exist at the destination.
  3. Adds additional logic to copy only specific runtime files with a runtime identifier is specified.
    1. Will error out if the runtime identifier is not supported.

One of the main benefits is worker size when deployed for a specific runtime. On linux-x64, the workers/python folder goes from 533MB (all runtimes) to 87.8MB (linux-x64 only copied) (tested with python worker 4.34.0).


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and CI is passing.

Quality of Code and Contribution Guidelines

@jviau jviau changed the title Remove custom targets, use 'None' item group refactor: Remove custom targets, use 'None' item group Apr 11, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.88%. Comparing base (c244569) to head (2f40dbd).
Report is 3 commits behind head on dev.

Current head 2f40dbd differs from pull request most recent head 6586aaf

Please upload reports for the commit 6586aaf to get more accurate results.

Additional details and impacted files
@@             Coverage Diff             @@
##              dev    #1472       +/-   ##
===========================================
- Coverage   83.03%   45.88%   -37.15%     
===========================================
  Files          36       35        -1     
  Lines        2322     2040      -282     
  Branches      346      302       -44     
===========================================
- Hits         1928      936      -992     
- Misses        295     1028      +733     
+ Partials       99       76       -23     
Flag Coverage Δ
unittests 45.88% <ø> (-37.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@gavin-aguiar gavin-aguiar merged commit 43e5a72 into dev Dec 11, 2024
4 of 20 checks passed
@gavin-aguiar gavin-aguiar deleted the jviau/targets branch December 11, 2024 18:04
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.

5 participants