airbyte
airbyte copied to clipboard
Source Github: add workflow_jobs stream
What
This PR adds a new stream for github source: workflow_jobs
How
Used the endpoint: https://docs.github.com/pt/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run to lists jobs for a workflow run and create a stream.
Recommended reading order
-
x.java
-
y.python
User Impact
There is no breakchanges, just a new stream was added.
Pre-merge Checklist
Updating a connector
Community member or Airbyter
- [ ] Grant edit access to maintainers (instructions)
- [ ] Secrets in the connector's spec are annotated with
airbyte_secret
- [ ] Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
. - [ ] Code reviews completed
- [ ] Documentation updated
- [ ] Connector's
README.md
- [ ] Connector's
bootstrap.md
. See description and examples - [ ] Changelog updated in
docs/integrations/<source or destination>/<name>.md
including changelog. See changelog example
- [ ] Connector's
- [ ] PR name follows PR naming conventions
Tests
Unit
airbyte-integrations/connectors/source-github/unit_tests/test_stream.py::test_stream_workflow_jobs_read_incremental ✓
airbyte-integrations/connectors/source-github/unit_tests/test_stream.py::test_stream_workflow_jobs_full_refresh ✓
Hi, thanks for the PR. This PR will be reviewed by one of our community maintainers as part our of Community Maintainer Program. Someone will be assigned shortly, thanks for being patient!
This PR is related to this issue: https://github.com/airbytehq/airbyte/issues/16360
/test connector=connectors/github
/test connector=connectors/source-github
:clock2: connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/3054767833 :x: connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/3054767833 :bug: https://gradle.com/s/ypjdx2era5q4s
Build Failed
Test summary info:
=========================== short test summary info ============================
FAILED test_incremental.py::TestIncremental::test_state_with_abnormally_large_values[inputs0]
=================== 1 failed, 38 passed in 292.94s (0:04:52) ===================
@Mainara Thanks for your contribution. It looks like the Workflow_jobs
stream supports incremental sync, which will run the test called TestStateWithAbnormallyLargeValues, here is the documentation.
Basically, it will read the file abnormal state from the json file, and it expects to return zero results because the state value is abnormally huge. Can you add a state value for workflow_jobs?
/test connector=connectors/source-github
@YiyangLi we made the required changes, can you please validate it?
/test connector=connectors/source-github
:clock2: connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/3083224659 :white_check_mark: connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/3083224659 Python tests coverage:
Name Stmts Miss Cover
----------------------------------------------------
source_github/utils.py 14 0 100%
source_github/github_schema.py 8807 0 100%
source_github/__init__.py 2 0 100%
source_github/graphql.py 145 1 99%
source_github/streams.py 779 39 95%
source_github/source.py 104 27 74%
----------------------------------------------------
TOTAL 9851 67 99%
Name Stmts Miss Cover Missing
----------------------------------------------------------------------------------
source_acceptance_test/base.py 10 4 60% 15-18
source_acceptance_test/config.py 83 6 93% 78-80, 84-86
source_acceptance_test/conftest.py 164 164 0% 6-282
source_acceptance_test/plugin.py 48 48 0% 6-104
source_acceptance_test/tests/test_core.py 329 111 66% 39, 50-58, 63-70, 74-75, 79-80, 164, 202-219, 228-236, 240-245, 251, 284-289, 327-334, 374-376, 379, 439-448, 477-478, 484, 487, 520-530, 543-568, 573-577
source_acceptance_test/tests/test_full_refresh.py 52 2 96% 34, 65
source_acceptance_test/tests/test_incremental.py 121 25 79% 21-23, 29-31, 36-43, 48-61, 208-216
source_acceptance_test/utils/asserts.py 37 2 95% 57-58
source_acceptance_test/utils/common.py 77 17 78% 15-16, 24-30, 47-54, 64, 67
source_acceptance_test/utils/compare.py 62 23 63% 21-51, 68, 97-99
source_acceptance_test/utils/connector_runner.py 110 48 56% 23-26, 32, 36, 39-64, 67-69, 72-74, 77-79, 82-84, 87-89, 92-110, 144-146
source_acceptance_test/utils/json_schema_helper.py 105 13 88% 30-31, 38, 41, 65-68, 96, 120, 190-192
----------------------------------------------------------------------------------
TOTAL 1325 463 65%
Build Passed
Test summary info:
All Passed
/publish connector=connectors/source-github
:clock2: Publishing the following connectors:
connectors/source-github
https://github.com/airbytehq/airbyte/actions/runs/3084608070
Connector | Did it publish? | Were definitions generated? |
---|---|---|
connectors/source-github | :white_check_mark: | :x: |
if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️
/publish connector=connectors/source-github auto-bump-version=false
@sajarin We verify that the image of the new version has already been published: airbyte/source-github:0.3.0, and the error is precisely because he tried to publish again this version. What can we do with this situation?
hey @sajarin can we please merge this PR? looks like it's completed. it currently blocks from testing new ones(https://github.com/airbytehq/airbyte/actions/runs/3096389815/jobs/5011926155) as the image is published but not merged
Should be good to go @davydov-d.
Thanks for the PR @Mainara and @py-paulo and thanks for the review @YiyangLi!