dosubot[bot] commented on issue #7750:
URL:
https://github.com/apache/incubator-devlake/issues/7750#issuecomment-2230732335
<!-- Greeting -->
Hey there, @Nickcw6! I'm here to help you with any bugs, questions, or
contributions you might have. Let's tackle this issue together!
<!-- Answer -->
The issue you're experiencing with the CircleCI plugin collecting data only
from the past 24 hours, regardless of the `Time Range` setting, is likely due
to the `timeAfter` parameter not being correctly set. Here are the steps to
ensure the `timeAfter` parameter is set correctly and to collect data from the
full specified time range:
1. **Create a Project**: Ensure you have created a project as described in
the documentation.
2. **Add a CircleCI Connection**: Add the CircleCI connection to the project.
3. **Set the Sync Policy**:
- Go to the Sync Policy settings.
- Set the `Data Time Range` to the desired time range instead of the
default past 24 hours.
### Example:
```md
### Step 2.3 - Set the Sync Policy
There are three settings for Sync Policy:
- **Data Time Range**: You can select the time range of the data you wish to
collect. The default is set to the past six months. Ensure this is set to the
full time range you need.
- **Sync Frequency**: Choose how often you would like to sync your data by
selecting a sync frequency option or enter a cron code to specify your
preferred schedule.
- **Skip Failed Tasks**: Choose to skip failed tasks to avoid spending more
time running the pipeline all over again.
```
4. **Run the Plugin with Correct Parameters**: Ensure that the `timeAfter`
parameter is set correctly when running the plugin. For example:
```sh
cmd := &cobra.Command{Use: "CircleCi"}
connectionId := cmd.Flags().Uint64P("connection", "c", 0, "CircleCi
connection id")
projectSlug := cmd.Flags().StringP("project", "p", "", "CircleCi project
slug")
timeAfter := cmd.Flags().StringP("timeAfter", "a", "", "collect data that
are created after specified time, ie 2006-01-02T15:04:05Z")
cmd.Run = func(cmd *cobra.Command, args []string) {
runner.DirectRun(cmd, args, PluginEntry, map[string]interface{}{
"connectionId": *connectionId,
"projectSlug": *projectSlug,
}, *timeAfter)
}
runner.RunCmd(cmd)
```
By setting the `timeAfter` parameter correctly and starting the data
collection, the CircleCI plugin should collect data from the full specified
time range
<sup>[[1]](https://github.com/apache/incubator-devlake-website/blob/main/docs/Configuration/CircleCI.md)</sup><sup>[[2]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.21/Configuration/CircleCI.md)</sup><sup>[[3]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v1.0/Configuration/CircleCI.md)</sup><sup>[[4]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/circleci/circleci.go)</sup>.
Additionally, ensure that there are no API rate limits or other issues
affecting the data collection. The CircleCI plugin handles pagination and rate
limits, but if you encounter specific error messages or logs, they can provide
insights into why data collection might be limited
<sup>[[5]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/pagerduty/tasks/incidents_collector.go)</sup><sup>[[6]](https://github.com/apache/incubator-devlake/blob/main/config-ui/src/routes/onboard/step-4.tsx)</sup><sup>[[7]](https://github.com/apache/incubator-devlake-website/blob/main/docs/Troubleshooting/Configuration.md)</sup><sup>[[8]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.17/Troubleshooting/Configuration.md)</sup>.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]