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

Update newrelic deployment command to support New Relic REST API v2 #1461

Merged
merged 16 commits into from
Sep 27, 2022

Conversation

tannalynn
Copy link
Contributor

@tannalynn tannalynn commented Sep 23, 2022

Before contributing, please read our contributing guidelines and code of conduct.

Overview

The older deployment endpoint doesn't support newer license keys. There is an internal ticket for that endpoint to be updated, but in the meantime we have added support for the newer New Relic REST API v2 deployment endpoint. The config option api_key must be provided to the agent to use this newer endpoint.

closes #715

Submitter Checklist:

  • Include a link to the related GitHub issue, if applicable
  • Include a security review link, if applicable

Testing

The agent includes a suite of unit and functional tests which should be used to
verify your changes don't break existing functionality. These tests will run with
Github Actions when a pull request is made. More details on running the tests locally can be found
here for our unit tests,
and here for our functional tests.
For most contributions it is strongly recommended to add additional tests which
exercise your changes.

Reviewer Checklist

  • Perform code review
  • Add performance label
  • Perform appropriate level of performance testing
  • Confirm all checks passed
  • Add version label prior to acceptance

@tannalynn tannalynn changed the title Update deployment rake task Update newrelic deployment to support New Relic REST API v2 Sep 23, 2022
@tannalynn tannalynn changed the title Update newrelic deployment to support New Relic REST API v2 Update newrelic deployment command to support New Relic REST API v2 Sep 23, 2022
@tannalynn tannalynn marked this pull request as ready for review September 23, 2022 23:16
Copy link
Contributor

@fallwith fallwith left a comment

Choose a reason for hiding this comment

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

Very good stuff!!! This one has remained in limbo while different API teams hem and haw. It's great to have the agent itself be flexible and dynamically switch between the old and the new ways of doing things.

Left two requests for change:

  • Use consistent capitalization of "API" (or "api") in the config param description
  • "whne" typo

The other suggestions can be implemented or waived as you see fit. Great work!

lib/new_relic/agent/configuration/default_source.rb Outdated Show resolved Hide resolved
lib/new_relic/cli/commands/deployments.rb Show resolved Hide resolved
lib/new_relic/cli/commands/deployments.rb Outdated Show resolved Hide resolved
lib/new_relic/cli/commands/deployments.rb Outdated Show resolved Hide resolved
fallwith
fallwith previously approved these changes Sep 24, 2022
lib/new_relic/cli/commands/deployments.rb Show resolved Hide resolved
kaylareopelle
kaylareopelle previously approved these changes Sep 26, 2022
Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

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

Nice job balancing the two API versions and cracking that curl command! Approved as-is, but I have some Changelog requests if you'd like to address them.

CHANGELOG.md Show resolved Hide resolved
lib/new_relic/agent/configuration/default_source.rb Outdated Show resolved Hide resolved
@tannalynn tannalynn dismissed stale reviews from kaylareopelle and fallwith via 5a2c8be September 26, 2022 18:53
@github-actions
Copy link
Contributor

SimpleCov Report

Coverage Threshold
Line 92.81% 90%
Branch 83.59% 80%

Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

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

I'm so happy this is fixed! Great work, Tanna!

@tannalynn tannalynn merged commit a040ae9 into dev Sep 27, 2022
@fallwith fallwith deleted the update_deployment_rake_task branch October 11, 2022 17:02
kaylareopelle added a commit to kaylareopelle/docs-website that referenced this pull request Nov 15, 2022
PR newrelic/newrelic-ruby-agent#1461 added support for deployment recording using a customer's user API key. This update was missing from the document.
tabathadelane pushed a commit to newrelic/docs-website that referenced this pull request Nov 21, 2022
PR newrelic/newrelic-ruby-agent#1461 added support for deployment recording using a customer's user API key. This update was missing from the document.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

newrelic deployments does not work with newly created API keys
3 participants