Skip to content

Commit

Permalink
Do not use ix temp dir when creating catalogs (#13100)
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicaj committed Feb 6, 2024
1 parent 485f790 commit 2f1ebb6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/middlewared/middlewared/plugins/catalogs_linux/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,12 @@ async def do_create(self, job, data):
if not data.pop('force'):
job.set_progress(40, f'Validating {data["label"]!r} catalog')
# We will validate the catalog now to ensure it's valid wrt contents / format
k8s_dataset = (await self.middleware.call('kubernetes.config'))['dataset']
path = os.path.join(
TMP_IX_APPS_DIR, 'validate_catalogs', convert_repository_to_path(data['repository'], data['branch'])
'/mnt', k8s_dataset, 'catalogs/validate_catalogs',
convert_repository_to_path(data['repository'], data['branch'])
)
await self.middleware.run_in_thread(shutil.rmtree, path, ignore_errors=True)
try:
await self.middleware.call('catalog.update_git_repository', {**data, 'location': path})
await self.middleware.call('catalog.validate_catalog_from_path', path)
Expand Down

0 comments on commit 2f1ebb6

Please sign in to comment.