Added information on in-progress work on Postgrest and more links to users usage.

This commit is contained in:
Adam Saleh 2021-04-28 13:44:49 +02:00
parent 90bdc36f76
commit d51369c5ec
2 changed files with 132 additions and 3 deletions

View file

@ -26,13 +26,11 @@ and cursory investigation of our repositories we use pdc API or through CLI clie
- releng scripts
- fedpkg
- pungi
- fedfind
- bodhi
- pagure
- modulebuildservice
- mirrormanager scripts in ansible-repo
- ODCS
- new hotness
- fedora messaging
- osbs client
@ -82,4 +80,16 @@ we probably want to utilize Postgresql on the backend:
Things to investigate:
- database model that would suit the needs of our current users
- migration path (data import?)
- roles and integration with our account system
- roles and integration with our account system
Preliminary notes on using Postgrest
--------------------------------
Postgrest as a simple api on top of a database model sounded promissing,
but after investigating how to integrate it with ou currentaccount system,
it turned out we would need to maintain a separate service that would serve as a bridge.
- https://postgrest.org/en/stable/auth.html
- https://samkhawase.com/blog/postgrest/postgrest_auth0_service/
This speaks against using Postgrest.

119
docs/pdc/users.rst Normal file
View file

@ -0,0 +1,119 @@
Current users of PDC
====================
release engineering - releng scripts
-----------------------------
Repository: https://pagure.io/releng
Retired packages
- scripts/block_retired.py
- /rest_api/v1/component-branches/?name={1}&type={2}&active=false&page_size=100'
- {1} - branch name, i.e. rawhide
- {2} - type, i.e. rpm
Package unretirement
- scripts/check-unretirement.py
- https://pdc.fedoraproject.org/rest_api/v1/component-branches/?global_component={args.pck}&name={args.brc}&type={args.nms[:-1]}
Package retirement
- scripts/fedretire
- results = pdc.get_paged(pdc['component-branches'], global_component=name, name=branch, type=NAMESPACES[namespace])
- uses fedpkg for actual retirement
Critical path
- scripts/get-critpath
- pdc.get_paged(endpoint, critical_path=True, **kwargs)
Mass rebuild modules
- /rest_api/v1/component-branch-slas/?page_size=100&branch_type=module&branch_active=1'
fedpkg
------
Repository: https://pagure.io/fedpkg
get_release_branches
- fedpkg/utils.py
- query_args = {'fields': ['short', 'version'], 'active': True}
- endpoint = 'product-versions'
get_stream_branches
- fedpkg/utils.py
- query_args = {'global_component': package_name,'fields': ['name', 'active']}
- endpoint = 'component-branches'
query_pdc
- fedpkg/utils.py
- uses requests
pungi
----------
According to lubomir.sedlar@gmail.com:
"Pungi used to integrate with PDC in the past, but this support has been
deprecated and dropped."
fedoraqa - fedfind
------------------
Repository: https://pagure.io/fedora-qa/fedfind
pdc_query
- /home/asaleh/work/fedfind/fedfind/helpers.py
- light rest client with caching
Pungi4Release.metadata
- fedfind/release.py
- pdc_query('compose-images/{}'.format(self._pdccid))
Pungi4Release.previous_release
- fedfind/release.py
- pdc_query('releases', {'version': self.release, 'name': self.dist})
Pungi4Release.get_package_nevras_pdc
- fedfind/release.py
- pdc_query('rpms', [('compose', self.cid), ('arch', 'src')])
Bodhi
------------------
Repository: https://github.com/fedora-infra/bodhi
pdc_api_get
- simple wrapped-requests-library api client
- /home/asaleh/work/bodhi/bodhi/server/util.py
get_critpath_components_from_pdc
- /home/asaleh/work/bodhi/bodhi/server/util.py
fedscm-admin
------------
Repository: https://pagure.io/fedscm-admin/
fedscm_admin/pdc.py
- get_global_component
- new_global_component
- get_branch
- new_branch
- get_sla
- new_sla_to_branch
- component_type_to_singular
To verify
---------
- pagure
- modulebuildservice ?
- based on ansible roles/mbs/common/files/fedora.json.production
- mirrormanager scripts
- roles/mirrormanager/backend/templates/handle_propagation.sh
- roles/mirrormanager/crawler/files/check_propagation.sh
- ODCS has related stuff
* new hotness has related stuff
* fedora messaging has pdc-related configuration
* osbs client has configuration