Closed Aricg closed 5 years ago
Found a failure on our side that I believe led to the multiple sub-project relationship creations
https://jenkins.o-ran-sc.org/view/rtdv3-global/job/rtdv3-global-merge-master/230/console Afaik this worked before, investigating our api implementation.
18:14:59 File "/home/jenkins/.local/lib/python3.6/site-packages/lftools/api/endpoints/readthedocs.py", line 244, in subproject_list
18:14:59 subproject_list.append(subproject['child']['slug'])
18:14:59 TypeError: list indices must be integers or slices, not str
Looking into our implementation now.
Reviewed this and confirmed Aricg's findings
This was already fixed in https://github.com/readthedocs/readthedocs.org/pull/6275, but the fix isn't deployed yet
@Aricg I'll need to delete the duplicate subproject relatioship manually for you. Which one is it?
I just tested this and I think the fix just deployed worked. Please, let us know if it's still there. Thanks!
@stsewd There are several listed here https://readthedocs.org/projects/o-ran-sc-doc/
$ cat /tmp/foo | sort | uniq -c 1 o-ran-sc-ci-management 2 o-ran-sc-it-dev 3 o-ran-sc-it-otf 1 o-ran-sc-it-test 2 o-ran-sc-nonrtric 1 o-ran-sc-portal-ric-dashboard 1 o-ran-sc-pti-rtp 1 o-ran-sc-ric-app-admin 6 o-ran-sc-ric-app-mc 1 o-ran-sc-ric-app-ml 1 o-ran-sc-ric-plt-a1 1 o-ran-sc-ric-plt-lib-rmr 2 o-ran-sc-scp-ocu-openlte
@Aricg ok, I think I have deleted all duplicated subprojects. Let me know if I missed one
Details
sub-project relationship created with v3 api. Cannot remove subproject when duplicate subprojects are defined. https://readthedocs.org/dashboard/o-ran-sc-doc/subprojects/o-ran-sc-ric-app-mc/edit/
returns:
Fail. Check back in a bit!
Expected Result
If a subproject listing already exists, refuse to create it a second time. If duplicates do exist, allow user to remove them.
Actual Result
Subproject listing is duplicated many times https://imgur.com/a/BgYClJa
Note
The docs are now setup with a domain, docs.o-ran-sc.org and that may effect this. unsure.
My code actually checks if the subproject relationship exists, and tries to do the right thing. So not sure how this happend.
Here is the code with the subproject check before subproject creation. https://gist.github.com/Aricg/95812e76e8611a16ffde5c3f490813e2