Skip to content

Commit

Permalink
SBOM hub no longer exists
Browse files Browse the repository at this point in the history
Solution:
Remove all support for the SBOM hub

Fixes AB#7166

Signed-off-by: Paul Hewlett <[email protected]>
  • Loading branch information
eccles committed Mar 31, 2023
1 parent b5022f4 commit 998ac3f
Show file tree
Hide file tree
Showing 28 changed files with 56 additions and 2,017 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
python3 -m pip install setuptools wheel
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_ALL_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_ALL_PASSWORD }}
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
rm -f archivist/about.py
./scripts/version.sh
Expand Down
2 changes: 1 addition & 1 deletion archivist/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def list(
def regenerate(self, identity: str) -> Application:
"""Regenerate secret
Makes an SBOM public.
Regenerate secret for app registration
Args:
identity (str): identity of application
Expand Down
3 changes: 0 additions & 3 deletions archivist/archivist.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
from .locations import _LocationsClient
from .retry429 import retry_429
from .runner import _Runner
from .sboms import _SBOMSClient
from .subjects import _SubjectsClient
from .tenancies import _TenanciesClient

Expand Down Expand Up @@ -98,7 +97,6 @@ class Archivist(ArchivistPublic): # pylint: disable=too-many-instance-attribute
"events": _EventsRestricted,
"locations": _LocationsClient,
"runner": _Runner,
"sboms": _SBOMSClient,
"subjects": _SubjectsClient,
"tenancies": _TenanciesClient,
}
Expand Down Expand Up @@ -145,7 +143,6 @@ def __init__(
self.events: _EventsRestricted
self.locations: _LocationsClient
self.runner: _Runner
self.sboms: _SBOMSClient
self.subjects: _SubjectsClient
self.tenancies: _TenanciesClient

Expand Down
6 changes: 0 additions & 6 deletions archivist/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,6 @@
LOCATIONS_SUBPATH = "v2"
LOCATIONS_LABEL = "locations"

SBOMS_SUBPATH = "v1"
SBOMS_LABEL = "sboms"
SBOMS_WILDCARD = "-/metadata"
SBOMS_METADATA = "metadata"
SBOMS_PUBLISH = "publish"
SBOMS_WITHDRAW = "withdraw"
SBOM_PACKAGE = "Software Package"
SBOM_RELEASE = "Software Package Release"

Expand Down
8 changes: 0 additions & 8 deletions archivist/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ class ArchivistUnconfirmedError(ArchivistError):
"""asset or event failed to confirm after fixed timeout"""


class ArchivistUnpublishedError(ArchivistError):
"""Sbom failed to publish after fixed timeout"""


class ArchivistUnwithdrawnError(ArchivistError):
"""Sbom failed to be withdrawn after fixed timeout"""


class ArchivistInvalidOperationError(ArchivistError):
"""Runner Operation is invalid"""

Expand Down
9 changes: 2 additions & 7 deletions archivist/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
)
from .dictmerge import _deepmerge
from .errors import ArchivistBadFieldError, ArchivistNotFoundError
from .sboms import sboms_parse

LOGGER = getLogger(__name__)

Expand Down Expand Up @@ -351,18 +352,12 @@ def create_from_data(
)
event_attributes["arc_location_identity"] = loc["identity"]

sbom = data.pop("sbom", None)
if sbom is not None:
sbom_result = self._archivist.sboms.create(sbom)
for k, v in sbom_result.items():
event_attributes[f"sbom_{k}"] = v

attachments = data.pop("attachments", None)
if attachments is not None:
for a in attachments:
result = self._archivist.attachments.create(a)
if a.get("type") == SBOM_RELEASE:
sbom_result = self._archivist.sboms.parse(a)
sbom_result = sboms_parse(a)
for k, v in sbom_result.items():
event_attributes[f"sbom_{k}"] = v

Expand Down
53 changes: 0 additions & 53 deletions archivist/publisher.py

This file was deleted.

54 changes: 0 additions & 54 deletions archivist/sbommetadata.py

This file was deleted.

Loading

0 comments on commit 998ac3f

Please sign in to comment.