Skip to content

Commit 9d5cd98

Browse files
committed
Enable a containerized version of the ADD API endpoint
[CLOUDDST-28643]
1 parent 928990a commit 9d5cd98

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

iib/web/api_v1.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
from iib.web.s3_utils import get_object_from_s3_bucket
4545
from botocore.response import StreamingBody
4646
from iib.web.utils import pagination_metadata, str_to_bool
47-
from iib.workers.tasks.build import (
48-
handle_add_request,
47+
from iib.workers.tasks.build_containerized_add import (
48+
handle_containerized_add_request,
4949
)
5050
from iib.workers.tasks.build_containerized_rm import handle_containerized_rm_request
5151
from iib.workers.tasks.build_add_deprecations import handle_add_deprecations_request
@@ -619,7 +619,7 @@ def add_bundles() -> Tuple[flask.Response, int]:
619619
args.append(current_user.username)
620620

621621
try:
622-
handle_add_request.apply_async(
622+
handle_containerized_add_request.apply_async(
623623
args=args,
624624
link_error=error_callback,
625625
argsrepr=repr(safe_args),
@@ -990,7 +990,7 @@ def regenerate_bundle_batch() -> Tuple[flask.Response, int]:
990990
@api_v1.route('/builds/add-rm-batch', methods=['POST'])
991991
@login_required
992992
@instrument_tracing(span_name="web.api_v1.add_rm_batch")
993-
def add_rm_batch() -> Tuple[flask.Response, int]:
993+
def add_rm_batch(handle_containerized_add_request=None) -> Tuple[flask.Response, int]:
994994
"""
995995
Submit a batch of requests to add or remove operators from an index image.
996996
@@ -1066,7 +1066,7 @@ def add_rm_batch() -> Tuple[flask.Response, int]:
10661066
error_callback = failed_request_callback.s(request.id)
10671067
try:
10681068
if isinstance(request, RequestAdd):
1069-
handle_add_request.apply_async(
1069+
handle_containerized_add_request.apply_async(
10701070
args=args,
10711071
link_error=error_callback,
10721072
argsrepr=repr(safe_args),

iib/workers/config.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ class Config(object):
9494
'iib.workers.tasks.build_create_empty_index',
9595
'iib.workers.tasks.build_fbc_operations',
9696
'iib.workers.tasks.build_add_deprecations',
97+
'iib.workers.tasks.build_containerized_add',
9798
'iib.workers.tasks.build_containerized_fbc_operations',
9899
'iib.workers.tasks.build_containerized_rm',
99100
'iib.workers.tasks.general',
@@ -246,9 +247,9 @@ class DevelopmentConfig(Config):
246247
iib_registry: str = 'registry:8443'
247248
iib_request_logs_dir: Optional[str] = '/var/log/iib/requests'
248249
iib_request_related_bundles_dir: Optional[str] = '/var/lib/requests/related_bundles'
249-
iib_request_recursive_related_bundles_dir: Optional[
250-
str
251-
] = '/var/lib/requests/recursive_related_bundles'
250+
iib_request_recursive_related_bundles_dir: Optional[str] = (
251+
'/var/lib/requests/recursive_related_bundles'
252+
)
252253
iib_dogpile_backend: str = 'dogpile.cache.memcached'
253254
iib_ocp_opm_mapping: dict = {
254255
"v4.6": "opm-v1.26.4",

0 commit comments

Comments
 (0)