Skip to content

Commit

Permalink
Konflux: Remove artifact_type from KonfluxRecord and KonfluxBundleBui…
Browse files Browse the repository at this point in the history
…ldRecord
  • Loading branch information
vfreex committed Dec 5, 2024
1 parent a8349c3 commit af71a32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions artcommon/artcommonlib/konflux/konflux_build_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class KonfluxRecord:
def __init__(self, name: str = '', group: str = '', version: str = '', release: str = '', assembly: str = '',
source_repo: str = '', commitish: str = '', rebase_repo_url: str = '', rebase_commitish: str = '',
start_time: datetime = None, end_time: datetime = None,
artifact_type: ArtifactType = ArtifactType.IMAGE, engine: Engine = Engine.KONFLUX,
engine: Engine = Engine.KONFLUX,
image_pullspec: str = '', image_tag: str = '',
outcome: KonfluxBuildOutcome = KonfluxBuildOutcome.SUCCESS, art_job_url: str = '',
build_pipeline_url: str = '', pipeline_commit: str = '', schema_level: int = 0,
Expand All @@ -65,7 +65,6 @@ def __init__(self, name: str = '', group: str = '', version: str = '', release:
self.rebase_commitish = rebase_commitish
self.start_time = start_time
self.end_time = end_time
self.artifact_type = artifact_type if isinstance(artifact_type, ArtifactType) else ArtifactType(artifact_type)
self.engine = engine if isinstance(engine, Engine) else Engine(engine)
self.image_pullspec = image_pullspec
self.image_tag = image_tag
Expand Down Expand Up @@ -157,14 +156,15 @@ def __init__(self, name: str = '', group: str = '', version: str = '', release:
ingestion_time: datetime = None, record_id: str = '', build_id: str = None, nvr: str = None):

super().__init__(name, group, version, release, assembly, source_repo, commitish, rebase_repo_url,
rebase_commitish, start_time, end_time, artifact_type, engine, image_pullspec, image_tag,
rebase_commitish, start_time, end_time, engine, image_pullspec, image_tag,
outcome, art_job_url, build_pipeline_url, pipeline_commit, schema_level, ingestion_time)

self.el_target = el_target
self.arches = arches
self.installed_packages = installed_packages
self.parent_images = parent_images
self.embargoed = embargoed
self.artifact_type = artifact_type if isinstance(artifact_type, ArtifactType) else ArtifactType(artifact_type)
self.init_uuids(record_id, build_id, nvr)


Expand All @@ -174,15 +174,15 @@ class KonfluxBundleBuildRecord(KonfluxRecord):
def __init__(self, name: str = '', group: str = '', version: str = '', release: str = '', assembly: str = '',
source_repo: str = '', commitish: str = '', rebase_repo_url: str = '', rebase_commitish: str = '',
start_time: datetime = None, end_time: datetime = None,
artifact_type: ArtifactType = ArtifactType.IMAGE, engine: Engine = Engine.KONFLUX,
engine: Engine = Engine.KONFLUX,
image_pullspec: str = '', image_tag: str = '',
outcome: KonfluxBuildOutcome = KonfluxBuildOutcome.SUCCESS, art_job_url: str = '',
build_pipeline_url: str = '', pipeline_commit: str = '', schema_level: int = 0,
ingestion_time: datetime = None, operand_nvrs: list = [], operator_nvr: str = '',
record_id: str = '', build_id: str = None, nvr: str = None):

super().__init__(name, group, version, release, assembly, source_repo, commitish, rebase_repo_url,
rebase_commitish, start_time, end_time, artifact_type, engine, image_pullspec, image_tag,
rebase_commitish, start_time, end_time, engine, image_pullspec, image_tag,
outcome, art_job_url, build_pipeline_url, pipeline_commit, schema_level, ingestion_time)
self.operand_nvrs = operand_nvrs
self.operator_nvr = operator_nvr
Expand Down
1 change: 0 additions & 1 deletion artcommon/tests/test_konflux_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ def test_generate_bundle_builds_schema(self):
SchemaField('rebase_commitish', 'STRING', 'REQUIRED'),
SchemaField('start_time', 'TIMESTAMP', 'REQUIRED'),
SchemaField('end_time', 'TIMESTAMP', 'REQUIRED'),
SchemaField('artifact_type', 'STRING', 'REQUIRED'),
SchemaField('engine', 'STRING', 'REQUIRED'),
SchemaField('image_pullspec', 'STRING', 'REQUIRED'),
SchemaField('image_tag', 'STRING', 'REQUIRED'),
Expand Down

0 comments on commit af71a32

Please sign in to comment.