Skip to content

fix: use "contents" field and remove "fullText" license field #3857

Merged
spiffcs merged 4 commits intomainfrom
remove-fullText-for-contents
May 5, 2025
Merged

fix: use "contents" field and remove "fullText" license field #3857
spiffcs merged 4 commits intomainfrom
remove-fullText-for-contents

Conversation

@spiffcs
Copy link
Copy Markdown
Contributor

@spiffcs spiffcs commented May 5, 2025

Before we do a release of syft we want to make sure the license fields are not duplicated. This removes fullText which was added #3450. It routes the changes of #3450 through contents which was added previously here: #3366

Note to Reviewers: We previously included a struct tag for the contents field that ignored it as part of our LicenseSet identification process. This tag has been removed. Given that licenses can now be some combination of UNKNOWN -> CONTENTS where the difference in licenses is the "content" of their contents we could not longer continue ignoring this field. The resulting license sets would only allow for a single UNKNOWN license.

I have added a test that illustrates this behavior.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have added unit tests that cover changed behavior
  • I have tested my code in common scenarios and confirmed there are no regressions
  • I have added comments to my code, particularly in hard-to-understand sections

spiffcs added 3 commits May 5, 2025 16:22
Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com>
Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com>
Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com>
@wagoodman wagoodman added the changelog-ignore do not add a entry for this when generating the changelog label May 5, 2025
@spiffcs spiffcs requested a review from wagoodman May 5, 2025 20:59
@wagoodman wagoodman changed the title fix: Remove full text for contents fix: Use "contents" field over "fullText" license field May 5, 2025
Comment thread syft/pkg/license_set_test.go Outdated
Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com>
@spiffcs spiffcs changed the title fix: Use "contents" field over "fullText" license field fix: use "contents" field and remove "fullText" license field May 5, 2025
@spiffcs spiffcs enabled auto-merge (squash) May 5, 2025 21:20
@spiffcs spiffcs merged commit 1ba1186 into main May 5, 2025
13 checks passed
@spiffcs spiffcs deleted the remove-fullText-for-contents branch May 5, 2025 21:40
spiffcs added a commit that referenced this pull request May 6, 2025
* main:
  fix: use "contents" field and remove "fullText" license field  (#3857)
  Add `deep-squashed` scope to annotate all layers where a package exists (#3138)
  fix: propagate unarchive error of file source (#3845)
@spiffcs spiffcs restored the remove-fullText-for-contents branch May 14, 2025 12:55
@spiffcs spiffcs deleted the remove-fullText-for-contents branch May 14, 2025 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-ignore do not add a entry for this when generating the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants