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

✨ [source-datadog] refactor connector and add new stream service_level_objectives_history #35362

Closed

Conversation

dlecocq
Copy link
Contributor

@dlecocq dlecocq commented Feb 16, 2024

What

At least of the options in the DataDog connector were overloaded to be used across multiple streams. In some cases, this was appropriate (for example, the maximum number of records retrieved in a single request), and in some cases not (for example, the "query", which may not be appropriate to use for both SLOs and logs (and other streams). In service of that, stream-specific configuration has been isolated to their own configuration groups, and imposing a naming convention (<stream>__<setting>) to differentiate service_level_objectives__query and logs__query.

In addition, not all of the options available on the DataDog endpoints were previously exposed. This MR adds several (for example, monitors__tags, monitors__with_downtimes, etc.), though even this change is not exhaustive. My hope is that if this convention suits the community, we would expand it to the remaining endpoints so that Airbyte exposes more to the connector user.

Lastly, this adds a new stream, the service level objectives history.

How

(Captured above)

🚨 User Impact 🚨

Breaking changes - some of the existing configuration options have been supplanted by their newer versions:

  • query -> logs__query
  • queries -> removed (it was not referenced anywhere in the manifest)

Version bump - an argument could be made for a major bump, but I would suggest a minor version bump to 0.5.0.

Community member or Airbyter

  • Community member? Grant edit access to maintainers
  • 🔴 Unit & integration tests added and passing I have not been able to get airbyte-ci to handle this connector well to run the tests, but I'm working on it. In the meantime, there's value in submitting the MR.

I'll also include some screenshots of it working in my local Airflow:

Screenshot 2024-02-16 at 11 54 13 AM
Screenshot 2024-02-16 at 11 54 20 AM
Screenshot 2024-02-16 at 11 54 27 AM

- Expose more endpoint-specific optional parameters
- Include the Service Level Objectives History stream
Copy link

vercel bot commented Feb 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
airbyte-docs ❌ Failed (Inspect) Jun 14, 2024 2:31pm

@octavia-squidington-iii octavia-squidington-iii added area/connectors Connector related issues area/documentation Improvements or additions to documentation community connectors/source/datadog labels Feb 16, 2024
Copy link
Contributor

Before Merging a Connector Pull Request

Wow! What a great pull request you have here! 🎉

To merge this PR, ensure the following has been done/considered for each connector added or updated:

  • PR name follows PR naming conventions
  • Breaking changes are considered. If a Breaking Change is being introduced, ensure an Airbyte engineer has created a Breaking Change Plan.
  • Connector version has been incremented in the Dockerfile and metadata.yaml according to our Semantic Versioning for Connectors guidelines
  • You've updated the connector's metadata.yaml file any other relevant changes, including a breakingChanges entry for major version bumps. See metadata.yaml docs
  • Secrets in the connector's spec are annotated with airbyte_secret
  • All documentation files are up to date. (README.md, bootstrap.md, docs.md, etc...)
  • Changelog updated in docs/integrations/<source or destination>/<name>.md with an entry for the new version. See changelog example
  • Migration guide updated in docs/integrations/<source or destination>/<name>-migrations.md with an entry for the new version, if the version is a breaking change. See migration guide example
  • If set, you've ensured the icon is present in the platform-internal repo. (Docs)

If the checklist is complete, but the CI check is failing,

  1. Check for hidden checklists in your PR description

  2. Toggle the github label checklist-action-run on/off to re-run the checklist CI.

@dlecocq
Copy link
Contributor Author

dlecocq commented Feb 16, 2024

Also worth noting that this depends on #35341

@natikgadzhi
Copy link
Contributor

queries -> removed (it was not referenced anywhere in the manifest)

🤦🏼 Thank you for cleaning it up. We're taking a look.

pagination_strategy:
type: "PageIncrement"
page_size: "{{ config['max_records_per_request'] }}"
start_from_page: 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that was a string value, would the dependency PR still be required @dlecocq?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we set it to an int of our choosing, then they would be decoupled. I did try with "500" and the like, and it still complains. It has to be a literal yaml int in order for it to work.

FWIW, this is not a hill that I'd die on - if we wanted to hard code it for now, I think that's a sensible approach.

@marcosmarxm marcosmarxm changed the title Refactor DataDog source connector ✨ [source-datadog] refactor connector and add new stream service_level_objectives_history Feb 16, 2024
Copy link
Contributor

@natikgadzhi natikgadzhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me at first glance. Let's merge the CDK one first, then get back to this, should be quick.

@@ -33,12 +33,11 @@ acceptance_tests:
# extra_records: yes
incremental:
bypass_reason: "This connector does not implement incremental sync"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bypass_reason: "This connector does not implement incremental sync"

I think for these tests to run, you'd need to remove bypass_reason.

- "monitors"
- "service_level_objectives"
- "synthetic_tests"
- "users"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for inlining the spec 👏

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

np - I wasn't sure if that was the convention or not, but to run read command line (which is how I did most of my iterating), it seemed to need it all in the manifest.

@natikgadzhi
Copy link
Contributor

Once the CDK change gets merged in, let's run tests on this, and merge this.

@dlecocq, if you have a minute, would you be open to improving a few other things in source-datadog? Would it be okay if I reach out to you with those changes in a separate issue?

@natikgadzhi
Copy link
Contributor

@marcosmarxm heads up, this is very behind master. It might be easier to cherry-pick the changes and reapply them in a fresh PR, if @dlecocq has time.

@natikgadzhi
Copy link
Contributor

Ah no I'm wrong, it's actually not bad. But, we'd need to carefully resolve the conflicts.

@marcosmarxm
Copy link
Member

marcosmarxm commented Jun 14, 2024

/format-fix

Format-fix job started... Check job output.

🟦 Job completed successfully (no changes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation community connectors/source/datadog Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants