I am working on adding the feature to import/export content-views with the debian content.
The feature works as expected on pulp_deb side using API. The PR: https://github.com/pulp/pulp_deb/pull/454
But when I tried to add the feature on Katello side by modifying the exportable_types in repository model, the export
feature works fine with hammer command but when I try to import
the debian content using hammer it throws the following error:
Nov 8 09:30:47 or pulpcore-worker-2: pulp [2f2787e8-b4e0-4590-9652-f763e014d640]: pulpcore.app.tasks.importer:INFO: ...3 import-errors encountered importing ./tmpxsirwjt_/repository-Debian_Client_11-93516_1/pulp_deb.app.modelresource.ReleaseArchitectureResource.json, attempt 2, retrying
Nov 8 09:30:47 or pulpcore-worker-2: pulp [2f2787e8-b4e0-4590-9652-f763e014d640]: pulpcore.app.tasks.importer:INFO: ...3 import-errors encountered importing ./tmpxsirwjt_/repository-Debian_Client_11-93516_1/pulp_deb.app.modelresource.ReleaseArchitectureResource.json, attempt 3, retrying
Nov 8 09:30:48 or pulpcore-worker-2: pulp [2f2787e8-b4e0-4590-9652-f763e014d640]: pulpcore.app.tasks.importer:ERROR: FATAL import-failure importing ./tmpxsirwjt_/repository-Debian_Client_11-93516_1/pulp_deb.app.modelresource.ReleaseArchitectureResource.json
Nov 8 09:30:48 or pulpcore-worker-2: pulp [2f2787e8-b4e0-4590-9652-f763e014d640]: pulpcore.tasking.pulpcore_worker:INFO: Task eb3febd3-573a-40df-9431-fd9f695b8ad1 failed (Release matching query does not exist.)
Nov 8 09:30:48 or pulpcore-worker-2: pulp [2f2787e8-b4e0-4590-9652-f763e014d640]: pulpcore.tasking.pulpcore_worker:INFO: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/pulpcore/tasking/pulpcore_worker.py", line 380, in _perform_task
Nov 8 09:30:48 or pulpcore-worker-2: result = func(*args, **kwargs)
Nov 8 09:30:48 or pulpcore-worker-2: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/pulpcore/app/tasks/importer.py", line 241, in import_repository_version
Nov 8 09:30:48 or pulpcore-worker-2: for a_result in _import_file(os.path.join(rv_path, filename), res_class, retry=True):
Nov 8 09:30:48 or pulpcore-worker-2: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/pulpcore/app/tasks/importer.py", line 130, in _import_file
Nov 8 09:30:48 or pulpcore-worker-2: a_result = resource.import_data(data, raise_errors=True)
Nov 8 09:30:48 or pulpcore-worker-2: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/import_export/resources.py", line 757, in import_data
Nov 8 09:30:48 or pulpcore-worker-2: return self.import_data_inner(dataset, dry_run, raise_errors, using_transactions, collect_failed_rows, **kwargs)
Nov 8 09:30:48 or pulpcore-worker-2: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/import_export/resources.py", line 805, in import_data_inner
Nov 8 09:30:48 or pulpcore-worker-2: raise row_result.errors[-1].error
Nov 8 09:30:48 or pulpcore-worker-2: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/import_export/resources.py", line 650, in import_row
Nov 8 09:30:48 or pulpcore-worker-2: instance, new = self.get_or_init_instance(instance_loader, row)
Nov 8 09:30:48 or pulpcore-worker-2: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/import_export/resources.py", line 342, in get_or_init_instance
I tried to change the order of import as well but it is still throwing the same error with different modelResource .json file.
Is there anything that needs to be done on katello side other than modifying the exportable_types ?