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

Testing K2 Integration #820

Draft
wants to merge 705 commits into
base: develop-k2-integration
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
705 commits
Select commit Hold shift + click to select a range
a21115e
Separate botocore langchain and botocorelatest
hmstepanek Mar 27, 2024
0e67af5
Merge pull request #1112 from newrelic/develop-ai-limited-preview-3
umaannamalai Mar 27, 2024
2735997
Remove import six
hmstepanek Mar 27, 2024
9f9751d
Merge pull request #1116 from newrelic/remove-import
hmstepanek Mar 27, 2024
5364c53
Add new langchain vectorstore models
lrafeei Apr 2, 2024
d66e7e8
Report only raw content dictionary for claude.
umaannamalai Apr 3, 2024
07040b3
Merge pull request #1119 from newrelic/add-new-langchain-vectorstores
hmstepanek Apr 5, 2024
633c4ae
Merge branch 'main' into langchain-bedrock-content
umaannamalai Apr 9, 2024
ce988a8
Merge pull request #1120 from newrelic/langchain-bedrock-content
hmstepanek Apr 9, 2024
6284d24
Use six from packages (#1117)
hmstepanek Apr 10, 2024
78853fe
Add config setting for memory usage runtime metrics.
umaannamalai Apr 10, 2024
583776c
Merge branch 'main' into memory-usage-sampler-config
umaannamalai Apr 10, 2024
9c5c589
Change setting to disable PID memory metrics.
umaannamalai Apr 11, 2024
2855610
Merge branch 'memory-usage-sampler-config' of github.com:newrelic/new…
umaannamalai Apr 11, 2024
76e15c7
Linting fixes.
umaannamalai Apr 11, 2024
240ea2e
Merge pull request #1122 from newrelic/memory-usage-sampler-config
umaannamalai Apr 11, 2024
c55b4d0
Fix aiohttp Failures (#1123)
TimPansino Apr 16, 2024
acf10cc
Celery Distributed Tracing (#1121)
TimPansino Apr 16, 2024
780f4a2
Move validate_custom_event validators into validators directory (#1089)
lrafeei Apr 16, 2024
bd4e4b1
Update urllib3 to 1.26.18 to silence security warnings (#1124)
TimPansino Apr 16, 2024
b364b5c
Tweak makefile (#1118)
TimPansino Apr 16, 2024
649044c
Update Artifact Actions to Newer Versions (#1125)
TimPansino Apr 16, 2024
3b46fad
Pin All GitHub Actions (#1126)
TimPansino Apr 16, 2024
7b90b64
Celery Instrumentation Cleanup (#1128)
TimPansino Apr 18, 2024
fc7381a
Add NEW_RELIC_K8S_OPERATOR_ENABLED
hmstepanek Apr 17, 2024
d9dcfaa
Add PID into MEMORY_RUNTIME_METRICS_ENABLED (#1129)
hmstepanek Apr 18, 2024
185f6f9
Merge pull request #1127 from newrelic/add-config-option
hmstepanek Apr 19, 2024
e908c37
Add VLite Vectorstore to Langchain
lrafeei Apr 29, 2024
b7bcc52
Drop Python 3.7 for jinja testing
lrafeei Apr 29, 2024
9734878
Add 3.7 testing to version before latest
lrafeei Apr 29, 2024
0aef37a
Merge pull request #1131 from newrelic/add-vlite-vectorstore
umaannamalai Apr 29, 2024
f697c65
Merge branch 'main' into drop-3_7-for-jinja
mergify[bot] Apr 29, 2024
a1ff84a
Merge branch 'main' into drop-3_7-for-jinja
lrafeei Apr 29, 2024
a447772
Merge pull request #1132 from newrelic/drop-3_7-for-jinja
umaannamalai Apr 29, 2024
8b9e394
Add method to urllib3 trace (#1130)
lrafeei May 3, 2024
8884497
Fix LangChain tests and pin langchain to 0.1.16. (#1134)
umaannamalai May 7, 2024
df2b159
Fix gRPC URI Detection (#1137)
TimPansino May 8, 2024
3e5be52
Fix Celery Instrumentation for Workers (#1133)
TimPansino May 9, 2024
72382b4
Add agent_language to serverless payload.
umaannamalai May 15, 2024
8ecba66
[Mega-Linter] Apply linters fixes
umaannamalai May 15, 2024
4032369
Merge branch 'main' into update-lambda-payload
umaannamalai May 15, 2024
292b1ff
Add support for mistral bedrock model
hmstepanek May 15, 2024
69d2818
[Mega-Linter] Apply linters fixes
hmstepanek May 16, 2024
ac6fe6d
Trigger tests
hmstepanek May 16, 2024
93ad043
Merge pull request #1141 from newrelic/add-mistral
hmstepanek May 17, 2024
250ca8c
K8s sitecustomize changes (#1144)
TimPansino May 20, 2024
01c1325
Add default to pop so doesn't error
hmstepanek May 20, 2024
0c289bf
[Mega-Linter] Apply linters fixes
hmstepanek May 20, 2024
59ec1db
Merge branch 'main' into update-lambda-payload
umaannamalai May 20, 2024
ed3bcfc
Add agent_language to serverless payload.
umaannamalai May 15, 2024
ad8483b
Trigger tests
hmstepanek May 20, 2024
8c6bb58
Add support for llama3
hmstepanek May 20, 2024
6d30f32
Merge pull request #1147 from newrelic/support-llama3
umaannamalai May 21, 2024
acd91f1
Merge branch 'main' into fix-parsing-error
umaannamalai May 21, 2024
4ffb603
Fix sklearn ensemble tests.
umaannamalai May 21, 2024
de51634
Merge branch 'main' into update-lambda-payload
umaannamalai May 21, 2024
8b79e6c
Merge pull request #1146 from newrelic/fix-parsing-error
hmstepanek May 22, 2024
e6c2a2f
Merge branch 'main' into fix-ensemble-sklearn-tests
hmstepanek May 22, 2024
ac28232
Update logger_loguru.py to include milliseconds (#1149)
julia-tadej-wttech May 22, 2024
08a3971
Merge branch 'main' into fix-ensemble-sklearn-tests
mergify[bot] May 22, 2024
20c5298
Merge pull request #1148 from newrelic/fix-ensemble-sklearn-tests
hmstepanek May 23, 2024
c5b4199
Merge branch 'main' into update-lambda-payload
umaannamalai May 23, 2024
b75ea43
AIOBotocore instrumentation (#1135)
lrafeei May 23, 2024
d4fee6d
Merge branch 'update-lambda-payload' of github.com:newrelic/newrelic-…
umaannamalai May 24, 2024
577347a
Remove linter change.
umaannamalai May 24, 2024
5561ed7
[Mega-Linter] Apply linters fixes
umaannamalai May 24, 2024
f806a52
Disable pylint.
umaannamalai May 24, 2024
456e7cb
Merge branch 'update-lambda-payload' of github.com:newrelic/newrelic-…
umaannamalai May 24, 2024
f221901
Merge branch 'main' into update-lambda-payload
umaannamalai May 24, 2024
bc7085c
fix: Llm event durations
RyanKadri May 24, 2024
27c8491
Apply suggestions from code review
umaannamalai May 28, 2024
142daa0
[Mega-Linter] Apply linters fixes
umaannamalai May 28, 2024
caf4601
Bump tests.
umaannamalai May 28, 2024
b09a58e
Merge branch 'update-lambda-payload' of github.com:newrelic/newrelic-…
umaannamalai May 28, 2024
650530b
Fix tests.
umaannamalai May 28, 2024
ca3b4e2
[Mega-Linter] Apply linters fixes
umaannamalai May 28, 2024
13d726b
Merge pull request #1151 from RyanKadri/fix/llm-durations
umaannamalai May 28, 2024
f87bf7c
Merge branch 'main' into update-lambda-payload
mergify[bot] May 28, 2024
0a6681c
Bump.
umaannamalai May 29, 2024
1b11605
[Mega-Linter] Apply linters fixes
umaannamalai May 29, 2024
a00c605
Update.
umaannamalai May 29, 2024
7f2374d
Merge pull request #1140 from newrelic/update-lambda-payload
umaannamalai May 29, 2024
a0c5db2
Fix failing test from import
TimPansino Jun 6, 2024
d980f39
[Mega-Linter] Apply linters fixes
TimPansino Jun 6, 2024
de83220
Optimize environment_settings() for hooks
TimPansino Jun 6, 2024
b387a7f
Put sklearn import back
TimPansino Jun 7, 2024
2ab12c5
Merge pull request #1159 from newrelic/fix-sklearn-failing-test
hmstepanek Jun 7, 2024
60c5549
Support for OpenAI's .with_raw_response. (#1138)
lrafeei Jun 10, 2024
73f3197
Psycopg3 Instrumentation (#1155)
TimPansino Jun 10, 2024
45b575f
Early exit for OpenAI's .with_streaming_response. (#1157)
lrafeei Jun 10, 2024
504abd1
Fix bug in asgi when no content-length header
hmstepanek Jun 10, 2024
48250b2
Merge remote-tracking branch 'origin/main' into develop-k8s-agent-ope…
TimPansino Jun 11, 2024
52a452a
Fixup: de-duplicate test name
hmstepanek Jun 12, 2024
7495c9e
Disable package capture when testing
hmstepanek Jun 12, 2024
d070f58
Fixup: remove unused imports
hmstepanek Jun 12, 2024
e818420
Fixup: remove restats
hmstepanek Jun 13, 2024
44ccef0
Merge pull request #1160 from newrelic/fix-bug-in-asgi-wrapper
hmstepanek Jun 13, 2024
b9ce4e1
Merge branch 'main' into fix-package-capture
mergify[bot] Jun 13, 2024
18e2974
Merge branch 'main' into develop-k8s-agent-operator
TimPansino Jun 13, 2024
4ddc5b1
Merge pull request #1165 from newrelic/fix-package-capture
hmstepanek Jun 13, 2024
d969238
Merge branch 'main' into develop-k8s-agent-operator
mergify[bot] Jun 13, 2024
7c839f0
Merge pull request #1162 from newrelic/develop-k8s-agent-operator
hmstepanek Jun 13, 2024
16838fb
Fix release strategy (#1166)
TimPansino Jun 13, 2024
6e72cdf
Update flask tests and enable flaskmaster (#1163)
lrafeei Jun 20, 2024
b584946
Fix logic for env scraping
TimPansino Jun 27, 2024
541d126
Enable GraphQL master tests (#1167)
lrafeei Jun 27, 2024
861f91c
Merge branch 'main' into fix-verison-check
mergify[bot] Jun 27, 2024
8890cde
Merge pull request #1172 from newrelic/fix-verison-check
hmstepanek Jun 27, 2024
60d1669
fix: typo bug
niehusst Jul 3, 2024
5a3431f
Adds instrumentation for aiomcache (#1173)
jairhenrique Jul 3, 2024
61c6fea
Merge branch 'main' into main
lrafeei Jul 3, 2024
f7efc7d
Merge pull request #1174 from niehusst/main
hmstepanek Jul 9, 2024
9b6b2e5
Change Langhchain->LangChain per agent spec (#1176)
hmstepanek Jul 10, 2024
5469c4a
Add support for account level AIM disable. (#1175)
umaannamalai Jul 11, 2024
47581e9
NewRelicContextFormatter update to support adding a stack trace (#1168)
fritzdj Jul 11, 2024
a4ca19d
Fix strawberry tests (#1182)
umaannamalai Jul 24, 2024
8ba20fe
Add AWS SQS agent attributes
hmstepanek Jul 23, 2024
28a984d
Create AWS wrapper in botocore instrumentation
hmstepanek Jul 29, 2024
60fe0b6
Merge pull request #1183 from newrelic/capture-aws-sqs-info
hmstepanek Aug 1, 2024
1fa0688
Change to using auto detect bind args
hmstepanek Aug 5, 2024
ee15710
Add new redis commands
hmstepanek Aug 7, 2024
6350bd3
Merge pull request #1189 from newrelic/fix-failing-openai
hmstepanek Aug 7, 2024
10de1d5
Merge branch 'main' into add-new-redis-methods
hmstepanek Aug 7, 2024
772adec
Merge pull request #1190 from newrelic/add-new-redis-methods
hmstepanek Aug 7, 2024
08a512a
Move connector instantiation inside event loop
hmstepanek Aug 8, 2024
234bd74
Merge pull request #1191 from newrelic/fix-failing-aiothttp-test
umaannamalai Aug 8, 2024
6c870ec
Instrument s3transfer BoundExecutor submit function. (#1185)
umaannamalai Aug 8, 2024
4e2dd16
Add server.address attribute to RabbitMQ (#1186)
TimPansino Aug 8, 2024
2909603
Botocore SQS Code Cleanup (#1187)
TimPansino Aug 8, 2024
70e98a5
Fix params not getting passed bug (#1193)
hmstepanek Aug 8, 2024
e6ab3a2
Add env var for GC runtime metrics.
umaannamalai Aug 19, 2024
5232c26
[Mega-Linter] Apply linters fixes
umaannamalai Aug 19, 2024
dd7e582
Remove falcon master tests for py37 (unsupported)
TimPansino Aug 16, 2024
96dc174
Bump tests
TimPansino Aug 19, 2024
87edeb4
Merge pull request #1196 from newrelic/gc-env-var
umaannamalai Aug 19, 2024
052213b
Merge branch 'main' into fix-main-tests
umaannamalai Aug 19, 2024
846536a
Merge pull request #1198 from newrelic/fix-main-tests
umaannamalai Aug 19, 2024
ec59999
Fix Psycopg3 Api Incompatibilities (#1197)
TimPansino Aug 19, 2024
0704620
Remove Python 2 Support (#1195)
TimPansino Aug 22, 2024
7603533
Replace old style classes with new style (#1201)
TimPansino Aug 26, 2024
3173305
Misc Python 3 Improvements (#1202)
TimPansino Aug 26, 2024
a0a9dd7
Fix bugs
hmstepanek Aug 21, 2024
f36eafd
Test w/ latest langchain
hmstepanek Aug 27, 2024
412ced5
Add support for new vectorstores
hmstepanek Aug 27, 2024
f7719a3
Remove unreachable []
hmstepanek Aug 27, 2024
968fc4d
Convert String Formatting to f-strings with Flynt (#1200)
TimPansino Sep 3, 2024
8c1a4b9
Remove frameworks that only work in Python 2.7 (#1205)
lrafeei Sep 9, 2024
41e5475
Merge pull request #1199 from newrelic/fix-ai-bug
hmstepanek Sep 9, 2024
ef07134
Use replace instead of lstrip to strip dns://
hmstepanek Sep 10, 2024
a03f73f
Add support for ECS container IDs.
umaannamalai Sep 11, 2024
b4dee7b
Rename ecs related variables.
umaannamalai Sep 11, 2024
a9a5ab8
Fix import.
umaannamalai Sep 11, 2024
470d9ac
Add more test cases.
umaannamalai Sep 11, 2024
1df2a58
Merge branch 'main' into ecs-docker-id
umaannamalai Sep 11, 2024
892e66c
Merge pull request #1206 from newrelic/fix-grpc-external-bug
hmstepanek Sep 12, 2024
0e124ef
Add dispatcher for uvicorn_worker
TimPansino Sep 13, 2024
9dca71a
Fix bedrock expected error
hmstepanek Sep 16, 2024
e463e28
Add metadata field to expected events
hmstepanek Sep 16, 2024
db023da
Adjust location of expected pydantic error
hmstepanek Sep 16, 2024
9e4a83c
Langchain does not support python3.8
hmstepanek Sep 17, 2024
770bcf4
Remove graphql master from tests
hmstepanek Sep 17, 2024
d642980
Merge pull request #1210 from newrelic/fix-uvicorn_workers
hmstepanek Sep 17, 2024
7e19ad8
Merge branch 'main' into fix-botocore-error-test
umaannamalai Sep 17, 2024
b9f328c
Merge pull request #1211 from newrelic/fix-botocore-error-test
hmstepanek Sep 17, 2024
7d29f26
Add support for kafka-python-ng
hmstepanek Sep 17, 2024
47fac67
Merge branch 'main' into add-kafka-python-ng
mergify[bot] Sep 17, 2024
2d6525e
Merge pull request #1212 from newrelic/add-kafka-python-ng
hmstepanek Sep 17, 2024
c201bf1
Capture pymemcache,aiomcache,bmemcached host&port
hmstepanek Aug 15, 2024
8094552
Merge pull request #1194 from newrelic/capture-host-port-info-pymemcache
hmstepanek Sep 17, 2024
c84d105
Add new custom attribute context manager.
umaannamalai Sep 18, 2024
5a7c183
Add new custom attribute context manager.
umaannamalai Sep 18, 2024
844558d
Add bootstrap server metric for kafka (#1207)
hmstepanek Sep 19, 2024
df11858
Add test cases.
umaannamalai Sep 20, 2024
37e5b3b
Merge branch 'llm-custom-attrs-api' of github.com:newrelic/newrelic-p…
umaannamalai Sep 20, 2024
977f1b7
Cleanup files.
umaannamalai Sep 20, 2024
4f82456
Merge branch 'main' into llm-custom-attrs-api
umaannamalai Sep 20, 2024
90c423e
Merge remote-tracking branch 'origin/main' into develop-remove-python27
TimPansino Sep 23, 2024
21f033f
Lint f-strings
TimPansino Sep 23, 2024
dd023f9
Fix Issues in PyMongo and Botocore Tests (#1218)
TimPansino Sep 24, 2024
a6830a9
Updated matrix for urllib3 tests (#1216)
TimPansino Sep 24, 2024
b3f1e90
Merge remote-tracking branch 'origin/main' into merge-main-develop-py…
TimPansino Sep 24, 2024
f305ba7
Merge main into develop-remove-python27 (#1217)
TimPansino Sep 25, 2024
3c8686a
Merge branch 'develop-remove-python27' into merge-main-develop-python…
mergify[bot] Sep 25, 2024
f006351
Merge pull request #1220 from newrelic/merge-main-develop-python27-no…
TimPansino Sep 25, 2024
286a714
Merge pull request #1215 from newrelic/develop-remove-python27
TimPansino Sep 25, 2024
2b37b64
Add Python version specific recommendations to installation error.
TimPansino Aug 21, 2024
a5c6f1e
Merge branch 'main' into llm-custom-attrs-api
umaannamalai Sep 25, 2024
c339504
Merge branch 'main' into ecs-docker-id
umaannamalai Sep 25, 2024
4768fba
Merge pull request #1221 from newrelic/feature-python-version-warnings
TimPansino Sep 25, 2024
c3184e0
Remove loguru version checks.
umaannamalai Sep 25, 2024
1899827
Linting in tests.
umaannamalai Sep 25, 2024
63ca33b
[Mega-Linter] Apply linters fixes
umaannamalai Sep 25, 2024
5ddf5f2
Remove unused variable.
umaannamalai Sep 25, 2024
5618f78
Merge branch 'remove-loguru-version-check' of github.com:newrelic/new…
umaannamalai Sep 25, 2024
15605f2
Merge branch 'main' into llm-custom-attrs-api
mergify[bot] Sep 25, 2024
85f4035
Merge pull request #1222 from newrelic/remove-loguru-version-check
umaannamalai Sep 26, 2024
79b5cbe
Merge branch 'main' into llm-custom-attrs-api
mergify[bot] Sep 26, 2024
f51c621
Add new custom attribute context manager.
umaannamalai Sep 18, 2024
f6a8c5d
Add test cases.
umaannamalai Sep 20, 2024
9cd6d6b
Add new custom attribute context manager.
umaannamalai Sep 26, 2024
db2ac31
Cleanup files.
umaannamalai Sep 20, 2024
ba684ed
Add contextvars.
umaannamalai Sep 26, 2024
a3098b2
[Mega-Linter] Apply linters fixes
umaannamalai Sep 25, 2024
fb09703
Add Trivy
hmstepanek Sep 16, 2024
5cbefb8
Upgrade urllib3 to 1.26.19
hmstepanek Sep 27, 2024
f142815
Merge branch 'main' into add-trivy
mergify[bot] Sep 27, 2024
c07d6f4
Merge pull request #1213 from newrelic/add-trivy
hmstepanek Sep 27, 2024
34ae93e
Cleanup.
umaannamalai Sep 30, 2024
0a475af
Merge branch 'main' into ecs-docker-id
umaannamalai Sep 30, 2024
01bff2b
Merge pull request #1209 from newrelic/ecs-docker-id
umaannamalai Oct 1, 2024
fa903ec
Merge branch 'main' into llm-custom-attrs-api
umaannamalai Oct 1, 2024
00a99b7
Update redis tests for newer versions
TimPansino Oct 1, 2024
7ae5f59
Merge pull request #1224 from newrelic/fix-redis-tests
TimPansino Oct 1, 2024
7a01097
Merge branch 'main' into llm-custom-attrs-api
mergify[bot] Oct 1, 2024
bf2b12f
Upgrade ubuntu version
TimPansino Jun 27, 2024
f4b28d1
Upgrade Python versions
TimPansino Jun 27, 2024
f353cb9
Update test runners to ubuntu-latest
TimPansino Jun 27, 2024
dc662e0
Fix chmod by using octal notation
TimPansino Sep 30, 2024
cdc0949
Isolate tools into individual environments with pipx
TimPansino Sep 30, 2024
825275b
Put CI image OS back to 20.04 for Python 3.7 compatibility
TimPansino Sep 30, 2024
38b5feb
Trim some redis tests for compatibility and speed
TimPansino Oct 1, 2024
d926afe
Merge branch 'llm-custom-attrs-api' of github.com:newrelic/newrelic-p…
umaannamalai Oct 2, 2024
7d690f6
Merge branch 'llm-custom-attrs-api' of github.com:newrelic/newrelic-p…
umaannamalai Oct 2, 2024
68aa7ae
Update celery tox matrix
TimPansino Oct 2, 2024
1807857
Merge pull request #1171 from newrelic/update-ci-image
TimPansino Oct 2, 2024
b38c89b
Update error handling.
umaannamalai Oct 2, 2024
a8beff8
Merge branch 'main' into llm-custom-attrs-api
mergify[bot] Oct 2, 2024
18278db
Undo unnecessary formatting changes
hmstepanek Oct 7, 2024
1694844
Revert to transaction based storage of attrs.
umaannamalai Oct 8, 2024
1c27c2b
Merge branch 'llm-custom-attrs-api' of github.com:newrelic/newrelic-p…
umaannamalai Oct 8, 2024
76e7640
[Mega-Linter] Apply linters fixes
umaannamalai Oct 8, 2024
3a001b0
Python 3.13 Support (#1226)
TimPansino Oct 8, 2024
6edffd1
Merge branch 'main' into llm-custom-attrs-api
mergify[bot] Oct 8, 2024
beeb67f
Delete context attrs instead of nullifying.
umaannamalai Oct 8, 2024
4f7c555
Merge branch 'llm-custom-attrs-api' of github.com:newrelic/newrelic-p…
umaannamalai Oct 8, 2024
46d5521
Update tests.
umaannamalai Oct 9, 2024
7160696
Remove newline.
umaannamalai Oct 9, 2024
ef40ca6
Assert attribute deletion was successful.
umaannamalai Oct 9, 2024
f705b91
Add SQLiteVec support.
umaannamalai Oct 9, 2024
9916499
[Mega-Linter] Apply linters fixes
umaannamalai Oct 9, 2024
6a2a660
Trigger tests
hmstepanek Oct 9, 2024
2d17237
Merge pull request #1231 from newrelic/add-langchain-vs
umaannamalai Oct 9, 2024
182cc71
Merge branch 'main' into llm-custom-attrs-api
mergify[bot] Oct 9, 2024
573d5f0
Merge pull request #1214 from newrelic/llm-custom-attrs-api
umaannamalai Oct 10, 2024
38c2ba4
Separate Python 3.7 build workflow (#1235)
TimPansino Oct 10, 2024
a465475
Add urllib3 LICENSE.txt file
hmstepanek Oct 11, 2024
96fa0e0
Merge pull request #1237 from newrelic/add-urllib3-license
hmstepanek Oct 11, 2024
b2d8cc5
Pin gRPC version supported in Python 3.7 (#1239)
lrafeei Oct 15, 2024
7d6da2c
Azure init container setting flag (#1223)
lrafeei Oct 15, 2024
99c3b77
Merge branch 'main' into test-k2-integration
AnupamJuniwal Oct 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 20 additions & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
ARG IMAGE=ghcr.io/newrelic-experimental/pyenv-devcontainer:latest

# To target other architectures, change the --platform directive in the Dockerfile.
FROM --platform=linux/amd64 ${IMAGE}
ARG IMAGE_TAG=latest
FROM ghcr.io/newrelic/newrelic-python-agent-ci:${IMAGE_TAG}

# Setup non-root user
USER root
ARG UID=1001
ARG GID=${UID}
ENV HOME=/home/vscode
RUN mkdir -p ${HOME} && \
groupadd --gid ${GID} vscode && \
useradd --uid ${UID} --gid ${GID} --home ${HOME} vscode && \
chown -R ${UID}:${GID} /home/vscode

# Fix pyenv installation
RUN echo 'eval "$(pyenv init -)"' >>${HOME}/.bashrc && \
chown -R vscode:vscode "${PYENV_ROOT}" && \
chown -R vscode:vscode "${PIPX_HOME}"

# Set user
USER ${UID}:${GID}
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// To target other architectures, change the --platform directive in the Dockerfile.
"dockerfile": "Dockerfile",
"args": {
"IMAGE": "ghcr.io/newrelic-experimental/pyenv-devcontainer:latest"
"IMAGE_TAG": "latest"
}
},
"remoteUser": "vscode",
Expand Down
50 changes: 0 additions & 50 deletions .github/actions/setup-python-matrix/action.yml

This file was deleted.

117 changes: 117 additions & 0 deletions .github/containers/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@

# Copyright 2010 New Relic, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM ubuntu:20.04

# Install OS packages
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y \
bash \
build-essential \
curl \
expat \
fish \
fontconfig \
freetds-common \
freetds-dev \
gcc \
git \
libbz2-dev \
libcurl4-openssl-dev \
libffi-dev \
libgmp-dev \
libkrb5-dev \
liblzma-dev \
libmpfr-dev \
libncurses-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
locales \
make \
odbc-postgresql \
openssl \
python3-dev \
python3-pip \
sudo \
tzdata \
unixodbc-dev \
unzip \
vim \
wget \
zip \
zlib1g \
zlib1g-dev \
zsh && \
rm -rf /var/lib/apt/lists/*

# Build librdkafka from source
ARG LIBRDKAFKA_VERSION=2.1.1
RUN cd /tmp && \
wget https://github.com/confluentinc/librdkafka/archive/refs/tags/v${LIBRDKAFKA_VERSION}.zip -O ./librdkafka.zip && \
unzip ./librdkafka.zip && \
rm ./librdkafka.zip && \
cd ./librdkafka-${LIBRDKAFKA_VERSION} && \
./configure && \
make all install && \
cd /tmp && \
rm -rf ./librdkafka-${LIBRDKAFKA_VERSION}

# Setup ODBC config
RUN sed -i 's|Driver=psqlodbca.so|Driver=/usr/lib/x86_64-linux-gnu/odbc/psqlodbca.so|g' /etc/odbcinst.ini && \
sed -i 's|Driver=psqlodbcw.so|Driver=/usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so|g' /etc/odbcinst.ini && \
sed -i 's|Setup=libodbcpsqlS.so|Setup=/usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so|g' /etc/odbcinst.ini

# Set the locale
RUN locale-gen --no-purge en_US.UTF-8
ENV LANG=en_US.UTF-8 \ LANGUAGE=en_US:en \ LC_ALL=en_US.UTF-8
ENV TZ="Etc/UTC"
RUN ln -fs "/usr/share/zoneinfo/${TZ}" /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata

# Use root user
ENV HOME=/root
WORKDIR "${HOME}"

# Install pyenv
ENV PYENV_ROOT="/usr/local/pyenv"
RUN curl https://pyenv.run/ | /bin/bash
ENV PATH="${PYENV_ROOT}/bin:${PYENV_ROOT}/shims:${PATH}"
RUN echo 'eval "$(pyenv init -)"' >>${HOME}/.bashrc && \
pyenv update

# Install Python
ARG PYTHON_VERSIONS="3.12 3.11 3.10 3.9 3.8 3.7 3.13 pypy3.10-7.3.17"
COPY --chown=0:0 --chmod=755 ./install-python.sh /tmp/install-python.sh
RUN /tmp/install-python.sh && \
rm /tmp/install-python.sh

# Install dependencies for main python installation
COPY ./requirements.txt /tmp/requirements.txt
RUN pyenv exec pip install --upgrade -r /tmp/requirements.txt && \
rm /tmp/requirements.txt

# Install tools with pipx in isolated environments
COPY ./requirements-tools.txt /tmp/requirements-tools.txt
ENV PIPX_HOME="/opt/pipx"
ENV PIPX_BIN_DIR="${PIPX_HOME}/bin"
ENV PATH="${PIPX_BIN_DIR}:${PATH}"
RUN mkdir -p "${PIPX_BIN_DIR}" && \
while IFS="" read -r line || [ -n "$line" ]; do \
pyenv exec pipx install --global "${line}"; \
done </tmp/requirements-tools.txt && \
rm /tmp/requirements-tools.txt
74 changes: 74 additions & 0 deletions .github/containers/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Copyright 2010 New Relic, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Override constants
PLATFORM_OVERRIDE:=
PYTHON_VERSIONS_OVERRIDE:=

# Computed variables
IMAGE_NAME:=ghcr.io/newrelic/newrelic-python-agent-ci
MAKEFILE_DIR:=$(dir $(realpath $(firstword ${MAKEFILE_LIST})))
REPO_ROOT:=$(realpath ${MAKEFILE_DIR}../../)
UNAME_P:=$(shell uname -p)
PLATFORM_AUTOMATIC:=$(if $(findstring arm,${UNAME_P}),linux/arm64,linux/amd64)
PLATFORM:=$(if ${PLATFORM_OVERRIDE},${PLATFORM_OVERRIDE},${PLATFORM_AUTOMATIC})
PYTHON_VERSIONS_AUTOMATIC:=3.10
PYTHON_VERSIONS:=$(if ${PYTHON_VERSIONS_OVERRIDE},${PYTHON_VERSIONS_OVERRIDE},${PYTHON_VERSIONS_AUTOMATIC})

.PHONY: default
default: test

.PHONY: build
build:
@docker build ${MAKEFILE_DIR} \
--platform=${PLATFORM} \
-t ${IMAGE_NAME}:local \
--build-arg='PYTHON_VERSIONS=${PYTHON_VERSIONS}'

# Run the local tag as a container.
.PHONY: run
run: run.local

# Run a specific tag as a container.
# Usage: make run.<tag>
# Defaults to run.local, but can instead be run.latest or any other tag.
.PHONY: run.%
run.%:
# Build image if local was specified, else pull latest
@if [[ "$*" = "local" ]]; then \
cd ${MAKEFILE_DIR} && $(MAKE) build; \
else \
docker pull --platform=${PLATFORM} ${IMAGE_NAME}:$*; \
fi
@docker run --rm -it \
--platform=${PLATFORM} \
--mount type=bind,source="${REPO_ROOT}",target=/home/github/python-agent \
--workdir=/home/github/python-agent \
--add-host=host.docker.internal:host-gateway \
-e NEW_RELIC_HOST="${NEW_RELIC_HOST}" \
-e NEW_RELIC_LICENSE_KEY="${NEW_RELIC_LICENSE_KEY}" \
-e NEW_RELIC_DEVELOPER_MODE="${NEW_RELIC_DEVELOPER_MODE}" \
-e GITHUB_ACTIONS="true" \
${IMAGE_NAME}:$* /bin/bash

# Ensure python versions are usable. Cannot be automatically used with PYTHON_VERSIONS_OVERRIDE.
.PHONY: test
test: build
@docker run --rm \
--platform=${PLATFORM} \
ghcr.io/newrelic/python-agent-ci:local \
/bin/bash -c '\
python3.10 --version && \
touch tox.ini && tox --version && \
echo "Success! Python versions installed."'
50 changes: 50 additions & 0 deletions .github/containers/install-python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash
# Copyright 2010 New Relic, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -eo pipefail

main() {
# Coerce space separated string to array
if [[ ${#PYTHON_VERSIONS[@]} -eq 1 ]]; then
PYTHON_VERSIONS=($PYTHON_VERSIONS)
fi

if [[ -z "${PYTHON_VERSIONS[@]}" ]]; then
echo "No python versions specified. Make sure PYTHON_VERSIONS is set." 1>&2
exit 1
fi

# Find all latest pyenv supported versions for requested python versions
PYENV_VERSIONS=()
for v in "${PYTHON_VERSIONS[@]}"; do
LATEST=$(pyenv latest -k "$v" || pyenv latest -k "$v-dev")
if [[ -z "$LATEST" ]]; then
echo "Latest version could not be found for ${v}." 1>&2
exit 1
fi
PYENV_VERSIONS+=($LATEST)
done

# Install each specific version
for v in "${PYENV_VERSIONS[@]}"; do
pyenv install "$v" &
done
wait

# Set all installed versions as globally accessible
pyenv global ${PYENV_VERSIONS[@]}
}

main
6 changes: 6 additions & 0 deletions .github/containers/requirements-tools.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
bandit
black
flake8
flynt
isort
tox
5 changes: 5 additions & 0 deletions .github/containers/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pip
pipx
setuptools
virtualenv
wheel
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
version: 2
updates:
- package-ecosystem: "pip"
directory: "/newrelic/packages/"
schedule:
interval: "daily"
# Disable all pull requests for dependencies
open-pull-requests-limit: 0
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
# Disable all pull requests for dependencies
open-pull-requests-limit: 0
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
# Disable all pull requests for dependencies
open-pull-requests-limit: 0
16 changes: 15 additions & 1 deletion .github/scripts/retry.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
#!/bin/bash
# Copyright 2010 New Relic, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


# Time in seconds to backoff after the initial attempt.
INITIAL_BACKOFF=10
Expand All @@ -25,4 +39,4 @@ for i in $(seq 1 $retries); do
done

# Exit with status code of wrapped command
exit $?
exit $result
2 changes: 1 addition & 1 deletion .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
#
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
daysUntilStale: 365
# Number of days of inactivity before a stale issue is closed
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: false
Expand Down
Loading
Loading