Skip to content

feat: Add table option to filter workflow runs#17539

Merged
kodiakhq[bot] merged 6 commits intocloudquery:mainfrom
erezrokah:feat/github_workflow_runs_created
Apr 8, 2024
Merged

feat: Add table option to filter workflow runs#17539
kodiakhq[bot] merged 6 commits intocloudquery:mainfrom
erezrokah:feat/github_workflow_runs_created

Conversation

@erezrokah
Copy link
Copy Markdown
Member

@erezrokah erezrokah commented Apr 5, 2024

Summary

Tried to do #17475 using created_at column but that's not really possible as while we can filter based on a created_at range the results are always returned in descending order, so we always get newest results first.
Which means that if the sync stops in the middle and we only get part of the data, next sync we'd have to split the range to get the runs before the oldest we retrieved and after the newest (and do a split each time we have partial state).

We could maybe save the state only after retrieving all the pages (and not after each page) which should ensure we don't have data to catch up on in the next sync.

This PR does something else, it adds a table option to let users specify the range they'd like to sync.

Opening for feedback

@erezrokah erezrokah requested review from a team and candiduslynx and removed request for a team April 5, 2024 19:52
@erezrokah erezrokah requested a review from hermanschaaf April 5, 2024 19:53
Comment thread plugins/source/github/client/spec.go
Comment thread plugins/source/github/resources/services/actions/workflow_runs.go Outdated
@erezrokah erezrokah requested a review from candiduslynx April 8, 2024 09:54
@erezrokah
Copy link
Copy Markdown
Member Author

Ok forgot to add docs, doing it now

@erezrokah erezrokah added the automerge Automatically merge once required checks pass label Apr 8, 2024
@kodiakhq kodiakhq bot merged commit 202fe42 into cloudquery:main Apr 8, 2024
kodiakhq bot pushed a commit that referenced this pull request Apr 8, 2024
🤖 I have created a release *beep* *boop*
---


## [9.2.0](plugins-source-github-v9.1.0...plugins-source-github-v9.2.0) (2024-04-08)


### Features

* Add table option to filter workflow runs ([#17539](#17539)) ([202fe42](202fe42))


### Bug Fixes

* **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.36.4 ([#17485](#17485)) ([f370de4](f370de4))
* **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.36.5 ([#17526](#17526)) ([554c499](554c499))
* **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.37.0 ([#17532](#17532)) ([8080970](8080970))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/plugin/source/github automerge Automatically merge once required checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants