You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@devlake.apache.org by "wouldd (via GitHub)" <gi...@apache.org> on 2024/03/05 10:08:14 UTC

[I] [Bug][BlueprintMakePlan] Cannot add more than 28 scopes to an azure devops connectioni [incubator-devlake]

wouldd opened a new issue, #7116:
URL: https://github.com/apache/incubator-devlake/issues/7116

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### What happened
   
   We have several hundred repositories in each 'project' area in our azure devops server. I was attempting ot create a project in devlake that mapps to those high level areas and link all the repos within to the connector.
   However, the underlying api for PATCH the blueprint fails when there are more than 28 scopes defined as it fails with a 
   
   {"success":false,"message":"error patching the blueprint -dw (400)\nWraps: (2)\nWraps: (3) fork/exec ./run.sh: argument list too long\nWraps: (4) fork/exec ./run.sh\nWraps: (5) argument list too long\nError types: (1) *hintdetail.withDetail (2) *hintdetail.withDetail (3) *hintdetail.withDetail (4) *fs.PathError (5) syscall.Errno","causes":["fork/exec ./run.sh: argument list too long"],"data":null}
   
   Possibly there are other fundamental reasons that I should not want to link that many scopes to a project? or possibly this is just an artefact of the azuredevops plugin being in python and not go?
   
   ### What do you expect to happen
   
   I would expect to be able to easily link as many repos as I want to any given project/blueprint.
   
   ### How to reproduce
   
   setup an azure devops connection to a system with over 30 repos. link them all to config scopes then create a project and try to link them all to the connection.
   After about 28 are selected you start to receive errors on submit of the patch.
   
   ### Anything else
   
   this occurs every time. It's also worth mentioning that the UI element for selecting repos does not behave well with >hundred repos in teh system. It's obviously wired up to some underlying paginator, when you scroll towards the bottom is loads more but resets your position to the top so it's not obvious what's happend. at some point you hit a limit which I think is hard coded because it doesn't seem to successfully load any more beyond a certain point even thought there are many more to load.
   the search function does not work for azure devops repos - again I think this is possibly because the python plugin does not implement that? I can raise a separate bug for that if it helps but I could work around all the UI issues if the underlying API accepted a json doc with the full list.
   
   I'm also looking at fixing this locally, if i figure out a fix i'd be happy to submit a patch but possibly someone that already knows the code base would be able to fix it much eaiser.
   
   ### Version
   
   master
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][BlueprintMakePlan] Cannot add more than 28 scopes to an azure devops connectioni [incubator-devlake]

Posted by "keon94 (via GitHub)" <gi...@apache.org>.
keon94 commented on issue #7116:
URL: https://github.com/apache/incubator-devlake/issues/7116#issuecomment-1979584985

   Personally I would like to see the existing implementation be replaced with a proper RPC framework that supports streaming (e.g. grpc). The existing solution is something we put together for an initial release but it's not a mainstream solution, so extending it with additional features is going to create more maintenance headaches and tech debts.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][BlueprintMakePlan] Cannot add more than 28 scopes to an azure devops connectioni [incubator-devlake]

Posted by "wouldd (via GitHub)" <gi...@apache.org>.
wouldd commented on issue #7116:
URL: https://github.com/apache/incubator-devlake/issues/7116#issuecomment-1978696729

   Just to add some context to this now that I think I understand the code structure a bit better. the azure devops plugin is a remote plugin in python and as such we go via a bridge cmd to invoke a shell script with the parameters of any given plugin command which the python code is using hte Fire framework to automagically map onto it's methods. Sadly because this is all going via essentially linux command line args it's subject to the limits of those arg lengths and the payload for updating a pipeline with more than ~28 scopes is pretty massive.
   I suspect there are two options (assuming this is even a direction it's sensible to head) 
   1) add a method for appending additional scopes rather than re-writing the whole list and break up the remote commands to keep them under a size limit.
   2) write the command payload to a temporary json file and re-read that into the python program rather than relying on the commandline args.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][BlueprintMakePlan] Cannot add more than 28 scopes to an azure devops connectioni [incubator-devlake]

Posted by "keon94 (via GitHub)" <gi...@apache.org>.
keon94 commented on issue #7116:
URL: https://github.com/apache/incubator-devlake/issues/7116#issuecomment-2013957212

   I've opened #7204 to experiment with grpc support for Python and see where it goes. If done right it should fix this problem too.
   
   As for search functionality missing, that is intentional. There's no API that azure gives us a way of globally searching for repos (AFAIK).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][BlueprintMakePlan] Cannot add more than 28 scopes to an azure devops connection [incubator-devlake]

Posted by "Startrekzky (via GitHub)" <gi...@apache.org>.
Startrekzky commented on issue #7116:
URL: https://github.com/apache/incubator-devlake/issues/7116#issuecomment-2056744536

   Close this issue since [this PR](https://github.com/apache/incubator-devlake/pull/7124) has been merged. Feel free to reopen it if it still exists.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][BlueprintMakePlan] Cannot add more than 28 scopes to an azure devops connectioni [incubator-devlake]

Posted by "wouldd (via GitHub)" <gi...@apache.org>.
wouldd commented on issue #7116:
URL: https://github.com/apache/incubator-devlake/issues/7116#issuecomment-1980647807

   I have just noticed that there is an open PR for a fully go implementation of the azure devops plugin - presumably this would ulti mately be the best route since it would be consistent with all the other plugins and would remove this whole situation of passing arguments via process execs. Perhaps it would be best to look at what else is needed to merge that PR?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][BlueprintMakePlan] Cannot add more than 28 scopes to an azure devops connection [incubator-devlake]

Posted by "Startrekzky (via GitHub)" <gi...@apache.org>.
Startrekzky closed issue #7116: [Bug][BlueprintMakePlan] Cannot add more than 28 scopes to an azure devops connection
URL: https://github.com/apache/incubator-devlake/issues/7116


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][BlueprintMakePlan] Cannot add more than 28 scopes to an azure devops connectioni [incubator-devlake]

Posted by "Startrekzky (via GitHub)" <gi...@apache.org>.
Startrekzky commented on issue #7116:
URL: https://github.com/apache/incubator-devlake/issues/7116#issuecomment-1980884049

   Hi @wouldd , yes some contributors want to re-implement AD with Golang but it's on hold now.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org