-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bedrock Testing Infrastructure (#937)
* Add AWS Bedrock testing infrastructure * Cache Package Version Lookups (#946) * Cache _get_package_version * Add Python 2.7 support to get_package_version caching * [Mega-Linter] Apply linters fixes * Bump tests --------- Co-authored-by: SlavaSkvortsov <[email protected]> Co-authored-by: TimPansino <[email protected]> * Fix Redis Generator Methods (#947) * Fix scan_iter for redis * Replace generator methods * Update instance info instrumentation * Remove mistake from uninstrumented methods * Add skip condition to asyncio generator tests * Add skip condition to asyncio generator tests --------- Co-authored-by: Lalleh Rafeei <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> * Automatic RPM System Updates (#948) * Checkout old action * Adding RPM action * Add dry run * Incorporating action into workflow * Wire secret into custom action * Enable action * Correct action name * Fix syntax * Fix quoting issues * Drop pre-verification. Does not work on python * Fix merge artifact * Remove OpenAI references --------- Co-authored-by: Uma Annamalai <[email protected]> Co-authored-by: SlavaSkvortsov <[email protected]> Co-authored-by: TimPansino <[email protected]> Co-authored-by: Lalleh Rafeei <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
43160af
commit c4ea3cb
Showing
13 changed files
with
2,672 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: "update-rpm-config" | ||
description: "Set current version of agent in rpm config using API." | ||
inputs: | ||
agent-language: | ||
description: "Language agent to configure (eg. python)" | ||
required: true | ||
default: "python" | ||
target-system: | ||
description: "Target System: prod|staging|all" | ||
required: true | ||
default: "all" | ||
agent-version: | ||
description: "3-4 digit agent version number (eg. 1.2.3) with optional leading v (ignored)" | ||
required: true | ||
dry-run: | ||
description: "Dry Run" | ||
required: true | ||
default: "false" | ||
production-api-key: | ||
description: "API key for New Relic Production" | ||
required: false | ||
staging-api-key: | ||
description: "API key for New Relic Staging" | ||
required: false | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Trim potential leading v from agent version | ||
shell: bash | ||
run: | | ||
AGENT_VERSION=${{ inputs.agent-version }} | ||
echo "AGENT_VERSION=${AGENT_VERSION#"v"}" >> $GITHUB_ENV | ||
- name: Generate Payload | ||
shell: bash | ||
run: | | ||
echo "PAYLOAD='{ \"system_configuration\": { \"key\": \"${{ inputs.agent-language }}_agent_version\", \"value\": \"${{ env.AGENT_VERSION }}\" } }'" >> $GITHUB_ENV | ||
- name: Generate Content-Type | ||
shell: bash | ||
run: | | ||
echo "CONTENT_TYPE='Content-Type: application/json'" >> $GITHUB_ENV | ||
- name: Update Staging system configuration page | ||
shell: bash | ||
if: ${{ inputs.dry-run == 'false' && (inputs.target-system == 'staging' || inputs.target-system == 'all') }} | ||
run: | | ||
curl -X POST 'https://staging-api.newrelic.com/v2/system_configuration.json' \ | ||
-H "X-Api-Key:${{ inputs.staging-api-key }}" -i \ | ||
-H ${{ env.CONTENT_TYPE }} \ | ||
-d ${{ env.PAYLOAD }} | ||
- name: Update Production system configuration page | ||
shell: bash | ||
if: ${{ inputs.dry-run == 'false' && (inputs.target-system == 'prod' || inputs.target-system == 'all') }} | ||
run: | | ||
curl -X POST 'https://api.newrelic.com/v2/system_configuration.json' \ | ||
-H "X-Api-Key:${{ inputs.production-api-key }}" -i \ | ||
-H ${{ env.CONTENT_TYPE }} \ | ||
-d ${{ env.PAYLOAD }} | ||
- name: Verify Staging system configuration update | ||
shell: bash | ||
if: ${{ inputs.dry-run == 'false' && (inputs.target-system == 'staging' || inputs.target-system == 'all') }} | ||
run: | | ||
STAGING_VERSION=$(curl -X GET 'https://staging-api.newrelic.com/v2/system_configuration.json' \ | ||
-H "X-Api-Key:${{ inputs.staging-api-key }}" \ | ||
-H "${{ env.CONTENT_TYPE }}" | jq ".system_configurations | from_entries | .${{inputs.agent-language}}_agent_version") | ||
if [ "${{ env.AGENT_VERSION }}" != "$STAGING_VERSION" ]; then | ||
echo "Staging version mismatch: $STAGING_VERSION" | ||
exit 1 | ||
fi | ||
- name: Verify Production system configuration update | ||
shell: bash | ||
if: ${{ inputs.dry-run == 'false' && (inputs.target-system == 'prod' || inputs.target-system == 'all') }} | ||
run: | | ||
PROD_VERSION=$(curl -X GET 'https://api.newrelic.com/v2/system_configuration.json' \ | ||
-H "X-Api-Key:${{ inputs.production-api-key }}" \ | ||
-H "${{ env.CONTENT_TYPE }}" | jq ".system_configurations | from_entries | .${{inputs.agent-language}}_agent_version") | ||
if [ "${{ env.AGENT_VERSION }}" != "$PROD_VERSION" ]; then | ||
echo "Production version mismatch: $PROD_VERSION" | ||
exit 1 | ||
fi | ||
- name: (dry-run) Update Staging system configuration page | ||
shell: bash | ||
if: ${{ inputs.dry-run != 'false' && (inputs.target-system == 'staging' || inputs.target-system == 'all') }} | ||
run: | | ||
cat << EOF | ||
curl -X POST 'https://staging-api.newrelic.com/v2/system_configuration.json' \ | ||
-H "X-Api-Key:**REDACTED**" -i \ | ||
-H ${{ env.CONTENT_TYPE }} \ | ||
-d ${{ env.PAYLOAD }} | ||
EOF | ||
- name: (dry-run) Update Production system configuration page | ||
shell: bash | ||
if: ${{ inputs.dry-run != 'false' && (inputs.target-system == 'prod' || inputs.target-system == 'all') }} | ||
run: | | ||
cat << EOF | ||
curl -X POST 'https://api.newrelic.com/v2/system_configuration.json' \ | ||
-H "X-Api-Key:**REDACTED**" -i \ | ||
-H ${{ env.CONTENT_TYPE }} \ | ||
-d ${{ env.PAYLOAD }} | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.