You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@devlake.apache.org by "slaterx (via GitHub)" <gi...@apache.org> on 2024/05/24 00:30:55 UTC
[I] [Bug][Scope Config] Only the first 10 items are inheriting the scope config [incubator-devlake]
slaterx opened a new issue, #7503:
URL: https://github.com/apache/incubator-devlake/issues/7503
### 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
Created a new project, added 100 data scopes from existing github connection in it:

However, only the first 10 are inheriting the scope config, all other 90 are showing N/A for scope config:

### What do you expect to happen
All scopes have a valid scope config in it
### How to reproduce
- Add a github connection with lots of repo (ours have more than 1000)
- Add a scope config to add repos in the connection
- Create new project
- Add 100 repos to the data scope
### Anything else
We're troubleshooting why we are not seeing any numbers/data in DORA grafana charts, and we arrived at this situation.
### Version
1.0.0-beta6
### Are you willing to submit PR?
- [X] 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][Scope Config] Only the first 10 items are inheriting the scope config [incubator-devlake]
Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on issue #7503:
URL: https://github.com/apache/incubator-devlake/issues/7503#issuecomment-2128466459
Can you share screenshots of the connection detail page for those scopes that are NOT inheriting scope config?
--
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][Scope Config] Only the first 10 items are inheriting the scope config [incubator-devlake]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7503:
URL: https://github.com/apache/incubator-devlake/issues/7503#issuecomment-2285116755
This issue has been closed because it has been inactive for a long time. You can reopen it if you encounter the similar problem in the future.
--
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][Scope Config] Only the first 10 items are inheriting the scope config [incubator-devlake]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7503:
URL: https://github.com/apache/incubator-devlake/issues/7503#issuecomment-2267963188
This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.
--
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][Scope Config] Only the first 10 items are inheriting the scope config [incubator-devlake]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #7503: [Bug][Scope Config] Only the first 10 items are inheriting the scope config
URL: https://github.com/apache/incubator-devlake/issues/7503
--
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][Scope Config] Only the first 10 items are inheriting the scope config [incubator-devlake]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #7503:
URL: https://github.com/apache/incubator-devlake/issues/7503#issuecomment-2128280453
<!-- Greeting -->
Hey @slaterx! I'm [Dosu](https://dosu.dev), a friendly bot here to help you solve bugs, answer questions, and guide you in becoming a contributor. While you wait for a human maintainer, I'm here to assist! 😄
<!-- Answer -->
The issue you're encountering, where only the first 10 items are inheriting the scope config and the rest are showing "N/A," could be related to how the scope configurations are being processed and inherited in the codebase.
### Potential Cause
The scope config is marked as "N/A" when the `scopeConfigId` is not provided or is undefined <sup>[[1]](https://github.com/apache/incubator-devlake/blob/main/config-ui/src/plugins/components/scope-config/index.tsx)</sup>. This might be happening due to a limitation or bug in the code that processes the scope configurations for multiple data scopes.
### Relevant Code
The inheritance of scope configurations is implemented using Go's struct embedding feature. The `GithubScopeConfig` struct embeds the `common.ScopeConfig` struct, which allows it to inherit fields and methods from `common.ScopeConfig` <sup>[[2]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/github/models/scope_config.go)</sup>.
### Troubleshooting Steps
1. **Check the API Handling**: Ensure that the API endpoints responsible for creating and updating scope configurations are correctly handling all the data scopes. The relevant functions are `PostScopeConfig`, `PatchScopeConfig`, `GetScopeConfig`, `GetScopeConfigList`, and `DeleteScopeConfig` <sup>[[3]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/github/api/scope_config_api.go)</sup>.
2. **Review the Pipeline Plan Creation**: The `MakeDataSourcePipelinePlanV200` function in `blueprint_v200.go` handles multiple data scopes when creating a pipeline plan. Ensure that this function is correctly loading and applying the scope configurations for all data scopes <sup>[[4]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/github/api/blueprint_v200.go)</sup>.
3. **Logs and Error Messages**: Check for any logs or error messages that might indicate issues with decoding or applying the scope configurations. Look for messages like "error in decoding scope config" or "no scope config with given id" <sup>[[5]](https://github.com/apache/incubator-devlake/blob/main/backend/server/services/remote/plugin/scope_config_api.go)</sup>.
### Next Steps
- **Debugging**: Add debugging statements to the relevant parts of the code to trace how the scope configurations are being applied to each data scope.
- **Unit Tests**: Ensure that there are unit tests covering the inheritance of scope configurations when adding multiple data scopes. The `TestScopeApiHelper_Put` test verifies the correct setting of scope fields and the successful addition of multiple scopes <sup>[[6]](https://github.com/apache/incubator-devlake/blob/main/backend/helpers/pluginhelper/api/scope_helper_test.go)</sup>.
By following these steps, you should be able to identify and resolve the issue causing only the first 10 items to inherit the scope config. If you need further assistance, feel free to ask!
<!-- Dosu Comment Footer -->
<details open>
<summary>
#### Details
</summary>
**About Dosu**
This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
</details>
*To continue the conversation, mention @dosu.*
--
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][Scope Config] Only the first 10 items are inheriting the scope config [incubator-devlake]
Posted by "slaterx (via GitHub)" <gi...@apache.org>.
slaterx commented on issue #7503:
URL: https://github.com/apache/incubator-devlake/issues/7503#issuecomment-2146458369
@klesh it's all in the same connection, not a new one. Installation has only one project with only one connection in it. And all repos in it have a configured scope in it.
--
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