-
Notifications
You must be signed in to change notification settings - Fork 292
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
Use remote service to get CI provider info when configured to do so #7689
Merged
nikita-tkachenko-datadog
merged 4 commits into
master
from
nikita-tkachenko/remote-ci-provider-environment
Sep 27, 2024
Merged
Use remote service to get CI provider info when configured to do so #7689
nikita-tkachenko-datadog
merged 4 commits into
master
from
nikita-tkachenko/remote-ci-provider-environment
Sep 27, 2024
Conversation
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
nikita-tkachenko-datadog
added
the
comp: ci visibility
Continuous Integration Visibility
label
Sep 27, 2024
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 50 metrics, 13 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.40.0-SNAPSHOT~fca948a4bf, baseline=1.40.0-SNAPSHOT~aa1e54c87a
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.07 s) : 0, 1070192
Total [baseline] (10.448 s) : 0, 10448322
Agent [candidate] (1.078 s) : 0, 1078106
Total [candidate] (10.474 s) : 0, 10473776
section appsec
Agent [baseline] (1.201 s) : 0, 1201345
Total [baseline] (10.617 s) : 0, 10616993
Agent [candidate] (1.211 s) : 0, 1210564
Total [candidate] (10.653 s) : 0, 10653429
section iast
Agent [baseline] (1.201 s) : 0, 1200510
Total [baseline] (10.866 s) : 0, 10865567
Agent [candidate] (1.202 s) : 0, 1202085
Total [candidate] (10.88 s) : 0, 10880407
section profiling
Agent [baseline] (1.269 s) : 0, 1269021
Total [baseline] (10.596 s) : 0, 10596218
Agent [candidate] (1.267 s) : 0, 1267370
Total [candidate] (10.666 s) : 0, 10665806
gantt
title petclinic - break down per module: candidate=1.40.0-SNAPSHOT~fca948a4bf, baseline=1.40.0-SNAPSHOT~aa1e54c87a
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (682.843 ms) : 0, 682843
BytebuddyAgent [candidate] (687.814 ms) : 0, 687814
GlobalTracer [baseline] (311.19 ms) : 0, 311190
GlobalTracer [candidate] (313.827 ms) : 0, 313827
AppSec [baseline] (54.092 ms) : 0, 54092
AppSec [candidate] (54.23 ms) : 0, 54230
Remote Config [baseline] (671.071 µs) : 0, 671
Remote Config [candidate] (669.487 µs) : 0, 669
Telemetry [baseline] (7.679 ms) : 0, 7679
Telemetry [candidate] (7.702 ms) : 0, 7702
section appsec
BytebuddyAgent [baseline] (702.199 ms) : 0, 702199
BytebuddyAgent [candidate] (706.541 ms) : 0, 706541
GlobalTracer [baseline] (303.701 ms) : 0, 303701
GlobalTracer [candidate] (306.36 ms) : 0, 306360
AppSec [baseline] (162.824 ms) : 0, 162824
AppSec [candidate] (163.405 ms) : 0, 163405
Remote Config [baseline] (646.559 µs) : 0, 647
Remote Config [candidate] (650.79 µs) : 0, 651
Telemetry [baseline] (7.866 ms) : 0, 7866
Telemetry [candidate] (9.282 ms) : 0, 9282
IAST [baseline] (20.808 ms) : 0, 20808
IAST [candidate] (21.055 ms) : 0, 21055
section iast
BytebuddyAgent [baseline] (798.858 ms) : 0, 798858
BytebuddyAgent [candidate] (800.828 ms) : 0, 800828
GlobalTracer [baseline] (301.357 ms) : 0, 301357
GlobalTracer [candidate] (301.913 ms) : 0, 301913
AppSec [baseline] (54.151 ms) : 0, 54151
AppSec [candidate] (53.883 ms) : 0, 53883
Remote Config [baseline] (635.04 µs) : 0, 635
Remote Config [candidate] (615.333 µs) : 0, 615
Telemetry [baseline] (7.055 ms) : 0, 7055
Telemetry [candidate] (7.086 ms) : 0, 7086
IAST [baseline] (24.593 ms) : 0, 24593
IAST [candidate] (23.863 ms) : 0, 23863
section profiling
BytebuddyAgent [baseline] (674.834 ms) : 0, 674834
BytebuddyAgent [candidate] (674.786 ms) : 0, 674786
GlobalTracer [baseline] (395.492 ms) : 0, 395492
GlobalTracer [candidate] (395.058 ms) : 0, 395058
AppSec [baseline] (54.89 ms) : 0, 54890
AppSec [candidate] (54.633 ms) : 0, 54633
Remote Config [baseline] (656.639 µs) : 0, 657
Remote Config [candidate] (671.188 µs) : 0, 671
Telemetry [baseline] (7.448 ms) : 0, 7448
Telemetry [candidate] (7.461 ms) : 0, 7461
ProfilingAgent [baseline] (96.912 ms) : 0, 96912
ProfilingAgent [candidate] (95.929 ms) : 0, 95929
Profiling [baseline] (96.936 ms) : 0, 96936
Profiling [candidate] (95.953 ms) : 0, 95953
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.40.0-SNAPSHOT~fca948a4bf, baseline=1.40.0-SNAPSHOT~aa1e54c87a
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.077 s) : 0, 1076899
Total [baseline] (8.565 s) : 0, 8564584
Agent [candidate] (1.075 s) : 0, 1075356
Total [candidate] (8.586 s) : 0, 8585700
section iast
Agent [baseline] (1.192 s) : 0, 1191970
Total [baseline] (9.024 s) : 0, 9023770
Agent [candidate] (1.193 s) : 0, 1192884
Total [candidate] (9.042 s) : 0, 9042340
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.193 s) : 0, 1193135
Total [baseline] (8.985 s) : 0, 8985400
Agent [candidate] (1.195 s) : 0, 1195317
Total [candidate] (8.987 s) : 0, 8987352
section iast_TELEMETRY_OFF
Agent [baseline] (1.207 s) : 0, 1207330
Total [baseline] (9.052 s) : 0, 9052106
Agent [candidate] (1.198 s) : 0, 1198277
Total [candidate] (9.077 s) : 0, 9076828
gantt
title insecure-bank - break down per module: candidate=1.40.0-SNAPSHOT~fca948a4bf, baseline=1.40.0-SNAPSHOT~aa1e54c87a
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (687.599 ms) : 0, 687599
BytebuddyAgent [candidate] (686.035 ms) : 0, 686035
GlobalTracer [baseline] (312.752 ms) : 0, 312752
GlobalTracer [candidate] (312.92 ms) : 0, 312920
AppSec [baseline] (54.295 ms) : 0, 54295
AppSec [candidate] (54.188 ms) : 0, 54188
Remote Config [baseline] (691.747 µs) : 0, 692
Remote Config [candidate] (671.989 µs) : 0, 672
Telemetry [baseline] (7.718 ms) : 0, 7718
Telemetry [candidate] (7.699 ms) : 0, 7699
section iast
BytebuddyAgent [baseline] (792.985 ms) : 0, 792985
BytebuddyAgent [candidate] (793.685 ms) : 0, 793685
GlobalTracer [baseline] (299.377 ms) : 0, 299377
GlobalTracer [candidate] (299.438 ms) : 0, 299438
AppSec [baseline] (54.779 ms) : 0, 54779
AppSec [candidate] (53.765 ms) : 0, 53765
IAST [baseline] (23.489 ms) : 0, 23489
IAST [candidate] (24.485 ms) : 0, 24485
Remote Config [baseline] (597.102 µs) : 0, 597
Remote Config [candidate] (657.588 µs) : 0, 658
Telemetry [baseline] (6.974 ms) : 0, 6974
Telemetry [candidate] (7.041 ms) : 0, 7041
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (793.45 ms) : 0, 793450
BytebuddyAgent [candidate] (795.37 ms) : 0, 795370
GlobalTracer [baseline] (299.967 ms) : 0, 299967
GlobalTracer [candidate] (300.435 ms) : 0, 300435
AppSec [baseline] (56.345 ms) : 0, 56345
AppSec [candidate] (55.316 ms) : 0, 55316
IAST [baseline] (21.981 ms) : 0, 21981
IAST [candidate] (22.7 ms) : 0, 22700
Remote Config [baseline] (612.919 µs) : 0, 613
Remote Config [candidate] (637.256 µs) : 0, 637
Telemetry [baseline] (7.05 ms) : 0, 7050
Telemetry [candidate] (7.055 ms) : 0, 7055
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (802.457 ms) : 0, 802457
BytebuddyAgent [candidate] (795.885 ms) : 0, 795885
GlobalTracer [baseline] (304.019 ms) : 0, 304019
GlobalTracer [candidate] (302.051 ms) : 0, 302051
AppSec [baseline] (57.239 ms) : 0, 57239
AppSec [candidate] (56.149 ms) : 0, 56149
IAST [baseline] (21.999 ms) : 0, 21999
IAST [candidate] (22.692 ms) : 0, 22692
Remote Config [baseline] (611.521 µs) : 0, 612
Remote Config [candidate] (611.767 µs) : 0, 612
Telemetry [baseline] (7.014 ms) : 0, 7014
Telemetry [candidate] (6.994 ms) : 0, 6994
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 18 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.40.0-SNAPSHOT~fca948a4bf, baseline=1.40.0-SNAPSHOT~aa1e54c87a
dateFormat X
axisFormat %s
section baseline
no_agent (1.331 ms) : 1312, 1350
. : milestone, 1331,
appsec (1.722 ms) : 1697, 1747
. : milestone, 1722,
appsec_no_iast (1.719 ms) : 1695, 1744
. : milestone, 1719,
iast (1.466 ms) : 1444, 1488
. : milestone, 1466,
profiling (1.519 ms) : 1493, 1544
. : milestone, 1519,
tracing (1.463 ms) : 1439, 1486
. : milestone, 1463,
section candidate
no_agent (1.335 ms) : 1316, 1355
. : milestone, 1335,
appsec (1.732 ms) : 1708, 1755
. : milestone, 1732,
appsec_no_iast (1.717 ms) : 1693, 1741
. : milestone, 1717,
iast (1.486 ms) : 1463, 1508
. : milestone, 1486,
profiling (1.485 ms) : 1460, 1510
. : milestone, 1485,
tracing (1.489 ms) : 1465, 1513
. : milestone, 1489,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.40.0-SNAPSHOT~fca948a4bf, baseline=1.40.0-SNAPSHOT~aa1e54c87a
dateFormat X
axisFormat %s
section baseline
no_agent (369.985 µs) : 350, 390
. : milestone, 370,
iast (479.752 µs) : 459, 501
. : milestone, 480,
iast_FULL (553.609 µs) : 532, 575
. : milestone, 554,
iast_GLOBAL (504.349 µs) : 483, 525
. : milestone, 504,
iast_HARDCODED_SECRET_DISABLED (481.78 µs) : 460, 503
. : milestone, 482,
iast_INACTIVE (442.318 µs) : 422, 463
. : milestone, 442,
iast_TELEMETRY_OFF (473.877 µs) : 451, 496
. : milestone, 474,
tracing (441.921 µs) : 422, 462
. : milestone, 442,
section candidate
no_agent (368.168 µs) : 348, 388
. : milestone, 368,
iast (483.275 µs) : 462, 505
. : milestone, 483,
iast_FULL (549.044 µs) : 528, 570
. : milestone, 549,
iast_GLOBAL (507.265 µs) : 486, 529
. : milestone, 507,
iast_HARDCODED_SECRET_DISABLED (492.538 µs) : 471, 515
. : milestone, 493,
iast_INACTIVE (451.422 µs) : 430, 473
. : milestone, 451,
iast_TELEMETRY_OFF (477.253 µs) : 454, 500
. : milestone, 477,
tracing (448.542 µs) : 428, 470
. : milestone, 449,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.40.0-SNAPSHOT~fca948a4bf, baseline=1.40.0-SNAPSHOT~aa1e54c87a
dateFormat X
axisFormat %s
section baseline
no_agent (1.469 ms) : 1458, 1481
. : milestone, 1469,
appsec (2.327 ms) : 2286, 2367
. : milestone, 2327,
iast (2.072 ms) : 2021, 2124
. : milestone, 2072,
iast_GLOBAL (2.111 ms) : 2060, 2162
. : milestone, 2111,
profiling (1.93 ms) : 1890, 1970
. : milestone, 1930,
tracing (1.907 ms) : 1869, 1945
. : milestone, 1907,
section candidate
no_agent (1.477 ms) : 1465, 1489
. : milestone, 1477,
appsec (2.321 ms) : 2281, 2362
. : milestone, 2321,
iast (2.057 ms) : 2007, 2107
. : milestone, 2057,
iast_GLOBAL (2.11 ms) : 2060, 2161
. : milestone, 2110,
profiling (1.925 ms) : 1885, 1964
. : milestone, 1925,
tracing (1.904 ms) : 1866, 1942
. : milestone, 1904,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.40.0-SNAPSHOT~fca948a4bf, baseline=1.40.0-SNAPSHOT~aa1e54c87a
dateFormat X
axisFormat %s
section baseline
no_agent (15.084 s) : 15084000, 15084000
. : milestone, 15084000,
appsec (15.314 s) : 15314000, 15314000
. : milestone, 15314000,
iast (18.941 s) : 18941000, 18941000
. : milestone, 18941000,
iast_GLOBAL (18.042 s) : 18042000, 18042000
. : milestone, 18042000,
profiling (15.32 s) : 15320000, 15320000
. : milestone, 15320000,
tracing (15.134 s) : 15134000, 15134000
. : milestone, 15134000,
section candidate
no_agent (15.121 s) : 15121000, 15121000
. : milestone, 15121000,
appsec (15.132 s) : 15132000, 15132000
. : milestone, 15132000,
iast (18.944 s) : 18944000, 18944000
. : milestone, 18944000,
iast_GLOBAL (18.122 s) : 18122000, 18122000
. : milestone, 18122000,
profiling (15.183 s) : 15183000, 15183000
. : milestone, 15183000,
tracing (15.129 s) : 15129000, 15129000
. : milestone, 15129000,
|
nikita-tkachenko-datadog
requested review from
anmarchenko and
nayeem-kamal
September 27, 2024 12:45
anmarchenko
approved these changes
Sep 27, 2024
nikita-tkachenko-datadog
deleted the
nikita-tkachenko/remote-ci-provider-environment
branch
September 27, 2024 19:48
This was referenced Oct 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What Does This Do
Adds logic that retrieves CI provider info (CI job name and URL, workspace path, commit and branch info, etc) from a remote service.
Normally this info is retrieved using environment variables, the remote service retrieval is only active when configured (i.e. when remote service URL is specified).
The data retrieved from the remote service has higher priority than the data retrieved from environment variables.
Motivation
When tracing tests that are executed with Bazel, all environment variables required by the tracer have to be defined as the inputs to the Bazel's test task.
Since these environment variables are different with every CI job run, this prevents Bazel from using its cache (since whether a task is cacheable or not depends on if its inputs have changed or not).
The solution is to not provide the env variables as inputs, and instead make them available via the remote service, thus "hiding" them from Bazel.
Additional Notes
This task also refactors some common logic: different components that use
OkhttpClient
are forced to use the same instance that is available inSharedCommunicationObjects
.This only affects CI Visibility agentless mode.
The motivation behind this is that there is supposed to be a single HTTP client instance per JVM, whereas with CI Visibility agentless mode enabled the tracer was creating up to 3 different clients.
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: LANGTOOLS-1771