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

connector-insights: use SPDX SBOM generated on publish #44493

Conversation

alafanechere
Copy link
Contributor

What

Closes https://github.com/airbytehq/airbyte-internal-issues/issues/9343
SBOMs are not generated on publish and their URL is exposed in the connector registry.
We should fetch already generated SBOM in insights generation instead of generating SBOM at execution time.

How

  • Remove SBOM generation logic in connectors-insights
  • Expose an sbom_url property on the Connector class
  • Change the SBOM parsing logic to use the SPDX format

@alafanechere alafanechere requested a review from a team as a code owner August 21, 2024 07:50
Copy link

vercel bot commented Aug 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Aug 21, 2024 4:07pm

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @alafanechere and the rest of your teammates on Graphite Graphite

@alafanechere alafanechere force-pushed the augustin/08-21-connector-insights_use_SPDX_SBOM_generated_on_publish branch from dc1fd81 to b596d8c Compare August 21, 2024 08:21
@alafanechere alafanechere force-pushed the augustin/08-21-connector-insights_use_SPDX_SBOM_generated_on_publish branch from b596d8c to 89607b3 Compare August 21, 2024 08:27
@alafanechere alafanechere enabled auto-merge (squash) August 21, 2024 15:50
Co-authored-by: Natik Gadzhi <natik@respawn.io>
Copy link
Contributor

@natikgadzhi natikgadzhi left a comment

Choose a reason for hiding this comment

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

I think that's great! I messed up a comment suggestion indentation, let's fix it and go!

Left a couple nits.

@@ -234,8 +240,7 @@ async def generate_insights_for_connector(
"""
logger = logging.getLogger(__name__)
insights_file = FileToPersist("insights.json")
sbom_file = FileToPersist("sbom.json")
files_to_persist = [insights_file, sbom_file]
files_to_persist = [insights_file]
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: if there's just one file, do we even need this list in a variable?

@@ -6,6 +6,8 @@
from pathlib import Path
from typing import TYPE_CHECKING

import requests
Copy link
Contributor

Choose a reason for hiding this comment

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

Wait a second, how did that work before? Are requests used there or no?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, I don't think requests are used ?

airbyte-ci/connectors/connector_ops/connector_ops/utils.py Outdated Show resolved Hide resolved
Comment on lines 8 to +9

import requests
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
import requests

@alafanechere alafanechere merged commit 2ec4921 into master Aug 21, 2024
32 checks passed
@alafanechere alafanechere deleted the augustin/08-21-connector-insights_use_SPDX_SBOM_generated_on_publish branch August 21, 2024 16:14
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