Skip to content

Instantly share code, notes, and snippets.

@alikins
alikins / galaxy_ng_rbac_diff_pyff_summary.txt
Created August 12, 2020 14:33
galaxy_ng pyff summary
Removed packages galaxy_ng/app/access_control, galaxy_ng/app/access_control/statements
Package galaxy_ng/app/auth changed:
Module auth.py changed:
New imported settings from new django.conf
New imported BasePermission from new rest_framework.permissions
New class RHEntitlementRequired with 1 public method
Package galaxy_ng/app/api/ui/views changed:
Module auth.py changed:
Removed import of access_policy from removed galaxy_ng.app.access_control
New imported RestrictOnCloudDeployments from new galaxy_ng.app.api.permissions
@alikins
alikins / pulp_openapi.yaml.diff
Created August 11, 2020 18:59
pulp open abstract vs concrete diff
--- pulp_openapi.yaml 2020-08-11 14:53:19.395031869 -0400
+++ pulp_expand_openapi.yaml 2020-08-11 14:36:26.706642136 -0400
@@ -598,14 +598,14 @@
responses:
'200':
description: No response body
- '{ansible_collection_import_href}':
+ /api/automation-hub/content/{path}/v3/imports/collections/{task}/:
get:
- operationId: collection_import_read
@alikins
alikins / pulp_current_openapi.yaml
Created August 11, 2020 18:55
pulp openapi (abstract)
openapi: 3.0.3
info:
title: Pulp 3 API
version: v3
description: Fetch, Upload, Organize, and Distribute Software Packages
contact:
name: Pulp Team
email: [email protected]
url: https://pulpproject.org
license:
@alikins
alikins / pulp_explicit_openapi.yaml
Created August 11, 2020 18:39
pulp explicit openapi spec
openapi: 3.0.3
info:
title: Pulp 3 API
version: v3
description: Fetch, Upload, Organize, and Distribute Software Packages
contact:
name: Pulp Team
email: [email protected]
url: https://pulpproject.org
@alikins
alikins / gist:5a0ba620f878140ee41eecf9414facf3
Created August 11, 2020 18:38
more explicit pulp openapi
diff --git pulpcore/openapi/__init__.py pulpcore/openapi/__init__.py
index 315a40ccf..1d8bd704a 100644
--- pulpcore/openapi/__init__.py
+++ pulpcore/openapi/__init__.py
@@ -281,7 +281,7 @@ def parse(self, request, public):
schema = view.schema
- path = self.convert_endpoint_path_params(path, view, schema)
+ # path = self.convert_endpoint_path_params(path, view, schema)
@alikins
alikins / 0040_0041_migration.diff
Last active August 11, 2020 14:36
pulpcore/galaxy_ng 'migrate' error post RBAC landing (3.6.x, 3adeff2cd62c057f1da19c455377089154606bc6)
(galaxy_ng_2) [newswoop:F31:pulpcore (master % u=)]$ diff -u ~/0040_accesspolicy.py pulpcore/app/migrations/0041_accesspolicy.py
--- /home/adrian/0040_accesspolicy.py 2020-08-11 10:34:53.699259324 -0400
+++ pulpcore/app/migrations/0041_accesspolicy.py 2020-08-11 10:34:59.459240934 -0400
@@ -8,7 +8,7 @@
class Migration(migrations.Migration):
dependencies = [
- ('core', '0039_set_admin_is_staff'),
+ ('core', '0040_set_admin_is_staff'),
]
@alikins
alikins / gist:783ad83474e3080b7b07898a8e100d89
Created August 10, 2020 21:00
galaxy-import code flow sorta
- cli args:
- artifact filename
- --print
- config setup
- get default config
- read config files
- /etc/galaxy-importer/galaxy-imporer.cfg
- site-packages/galaxy-importer/galaxy-importer.cfg
- config options
- log level
@alikins
alikins / gist:8f8afff11f1e540269b75ff7b35d91ec
Created August 4, 2020 15:07
pip-comple error (resolve by updating pip-tools)
# The following packages are considered to be unsafe in a requirements file:
# setuptools
pip-compile -U -o requirements/requirements.insights.txt \
setup.py requirements/requirements.insights.in
Traceback (most recent call last):
File "/home/adrian/venvs/galaxy_ng_2/bin/pip-compile", line 8, in <module>
sys.exit(cli())
File "/home/adrian/venvs/galaxy_ng_2/lib64/python3.6/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/adrian/venvs/galaxy_ng_2/lib64/python3.6/site-packages/click/core.py", line 782, in main
@alikins
alikins / gist:196065bb24651ad37e11ba9206791817
Created August 3, 2020 16:04
pulp manage spectactular AttributeError in pulpcore.openapi
(galaxy_ng_py36) [newswoop:F31:galaxy_ng (use_pulp_git_330 %)]$ ./compose run --rm api manage spectacular --format openapi --file spec-openapi.yaml
INFO: Using compose profile alikins
INFO: $ANSIBLE_HUB_UI_PATH is unset.
If you want to run the UI inside compose please set $ANSIBLE_HUB_UI_PATH
to the location of your local copy of https://github.com/ansible/ansible-hub-ui.
Starting galaxy_ng_postgres_1 ... done
Starting galaxy_ng_redis_1 ... done
Starting galaxy_ng__base_1 ... done
Installing path django-extensions in editable mode.
Installing path pulpcore in editable mode.
@alikins
alikins / gist:0dbf7bf1e7d4f976f6d8be5f9f9bacd7
Created August 3, 2020 15:23
galaxy_ng compose up dep errors
content-app_1 | [2020-08-03 15:22:40 +0000] [102] [INFO] Booting worker with pid: 102
content-app_1 | [2020-08-03 15:22:40 +0000] [103] [INFO] Booting worker with pid: 103
content-app_1 | [2020-08-03 15:22:40 +0000] [104] [INFO] Booting worker with pid: 104
content-app_1 | [2020-08-03 15:22:40 +0000] [105] [INFO] Booting worker with pid: 105
api_1 | [2020-08-03 15:22:40 +0000] [99] [ERROR] Exception in worker process
api_1 | Traceback (most recent call last):
api_1 | File "/venv/lib64/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
api_1 | worker.init_process()
api_1 | File "/venv/lib64/python3.6/site-packages/gunicorn/workers/base.py", line 119, in init_process
api_1 | self.load_wsgi()