Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pagerduty source and destination #125

Merged
merged 21 commits into from
Nov 12, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3a395b6
pagerduty source and destination
Roma-Kyrnis Oct 29, 2021
c4a1a86
Merge branch 'main' of github.com:faros-ai/airbyte-connectors into rk…
Roma-Kyrnis Oct 29, 2021
dfbf03a
move test to folder
Roma-Kyrnis Oct 29, 2021
2649b79
update to feedback; since null if full_refresh
Roma-Kyrnis Nov 2, 2021
04b8d64
Merge branch 'main' of github.com:faros-ai/airbyte-connectors into rk…
Roma-Kyrnis Nov 2, 2021
77465a7
since is null if full_refresh
Roma-Kyrnis Nov 2, 2021
e1d77ff
update error text in tests
Roma-Kyrnis Nov 2, 2021
9ea97b2
Merge branch 'main' of github.com:faros-ai/airbyte-connectors into rk…
Roma-Kyrnis Nov 3, 2021
1322da9
add pagerduty config to faros-destination
Roma-Kyrnis Nov 3, 2021
31a8480
update PagerDuty name and names in source test's files
Roma-Kyrnis Nov 3, 2021
6f689da
update test_files/spec.json
Roma-Kyrnis Nov 3, 2021
cccba9b
update acceptance tests; wrapApiError
Roma-Kyrnis Nov 4, 2021
64aa27f
try to fix acceptance tests
Roma-Kyrnis Nov 8, 2021
6305fa1
Merge branch 'main' of github.com:faros-ai/airbyte-connectors into rk…
Roma-Kyrnis Nov 8, 2021
869817b
Merge branch 'main' into rk/add-pagerduty
cjwooo Nov 10, 2021
7156384
Get source acceptance test mostly working
cjwooo Nov 10, 2021
4d3b890
remove application mapping
Roma-Kyrnis Nov 12, 2021
985c177
Merge branch 'main' of github.com:faros-ai/airbyte-connectors into rk…
Roma-Kyrnis Nov 12, 2021
3f9bbee
Merge branch 'rk/add-pagerduty' of github.com:faros-ai/airbyte-connec…
Roma-Kyrnis Nov 12, 2021
bbc7c95
Mark premium stream as expected to be empty
cjwooo Nov 12, 2021
639d968
Merge branch 'main' into rk/add-pagerduty
cjwooo Nov 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions sources/pagerduty-source/acceptance-test-config.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
connector_image: pagerduty-source
tests:
spec:
- config_path: "test_files/config.json"
- config_path: "secrets/config.json"
cjwooo marked this conversation as resolved.
Show resolved Hide resolved
spec_path: "test_files/spec.json"
connection:
- config_path: "test_files/config.json"
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "test_files/invalid_config.json"
status: "failed"
discovery:
- config_path: "test_files/config.json"
- config_path: "secrets/config.json"
basic_read:
- config_path: "test_files/config.json"
- config_path: "secrets/config.json"
configured_catalog_path: "test_files/full_configured_catalog.json"
expect_records:
path: "test_files/expected_records.txt"
full_refresh:
- config_path: "test_files/config.json"
- config_path: "secrets/config.json"
configured_catalog_path: "test_files/full_configured_catalog.json"
incremental:
- config_path: "test_files/config.json"
- config_path: "secrets/config.json"
configured_catalog_path: "test_files/incremental_configured_catalog.json"
future_state_path: "test_files/abnormal_state.json"
cursor_paths:
Expand Down
4 changes: 2 additions & 2 deletions sources/pagerduty-source/src/streams/incidentLogEntries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class IncidentLogEntries extends AirbyteStreamBase {
get cursorField(): string | string[] {
return 'created_at';
}

async *readRecords(
syncMode: SyncMode,
cursorField?: string[],
Expand Down Expand Up @@ -67,7 +67,7 @@ export class IncidentLogEntries extends AirbyteStreamBase {
currentStreamState: IncidentLogEntryState,
latestRecord: LogEntry
): IncidentLogEntryState {
const currentState = new Date(currentStreamState.lastSynced);
const currentState = new Date(currentStreamState.lastSynced ?? 0);
const lastState = new Date(latestRecord.created_at);
return {
lastSynced:
Expand Down
2 changes: 1 addition & 1 deletion sources/pagerduty-source/src/streams/incidents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class Incidents extends AirbyteStreamBase {
currentStreamState: IncidentState,
latestRecord: Incident
): IncidentState {
const currentState = new Date(currentStreamState.lastSynced);
const currentState = new Date(currentStreamState.lastSynced ?? 0);
const lastState = new Date(latestRecord.created_at);
return {
lastSynced:
Expand Down
4 changes: 2 additions & 2 deletions sources/pagerduty-source/test_files/abnormal_state.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"incidents": {
"lastSynced": "2021-10-29T05:52:30Z"
"lastSynced": "2200-10-29T05:52:30Z"
},
"incident_log_entries": {
"lastSynced": "2021-10-29T05:52:30Z"
"lastSynced": "2200-10-29T05:52:30Z"
}
}