Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion manifests/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,10 @@ manifest:
tests/auto_inject/test_auto_inject_install.py::TestContainerAutoInjectInstallScriptAppsec: v2.19.0
tests/auto_inject/test_auto_inject_install.py::TestHostAutoInjectInstallScriptAppsec: v2.19.0
tests/auto_inject/test_auto_inject_install.py::TestSimpleInstallerAutoInjectManualAppsec: v2.19.0
tests/cws/test_thread_context_sharing.py::Test_ThreadContextSharing: missing_feature (missing /security/thread_context_sharing endpoint on weblog)
tests/cws/test_thread_context_sharing.py::Test_ThreadContextSharing:
- weblog_declaration:
"*": irrelevant (only tested in one framework)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Mark missing Ruby endpoints as incomplete test applications

For Ruby weblogs other than rails80, the limitation is a missing /security/thread_context_sharing endpoint, not an inapplicable tracer feature: searching the committed Ruby weblog tree finds the endpoint only in rails80. The wildcard now reports those incomplete applications as irrelevant, obscuring the actual coverage gap. Per META-003 and META-006, retain the single-framework activation but use incomplete_test_app (missing /security/thread_context_sharing endpoint) for the wildcard.

AGENTS.md reference: AGENTS.md:L48-L48

Useful? React with 👍 / 👎.

rails80: v2.47.0
tests/debugger/test_debugger_capture_expressions.py::Test_Debugger_Line_Capture_Expressions:
- weblog_declaration:
"*": irrelevant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ def read_file
render plain: File.read(params[:file])
end

def thread_context_sharing
span = Datadog::Tracing.active_span
return render plain: 'No active span', status: :internal_server_error if span.nil?

File.write(params.fetch(:path), 'system-tests thread context sharing')

render json: { trace_id: span.trace_id.to_s, span_id: span.id.to_s }
end

def trace_manual_keep_drop
decision = params[:decision]
return render plain: 'decision must be keep or drop', status: 400 unless %w[keep drop].include?(decision)
Expand Down
1 change: 1 addition & 0 deletions utils/build/docker/ruby/rails80/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def call(_env)
get '/spans' => 'system_test#generate_spans'
get '/status' => 'system_test#status'
get '/read_file' => 'system_test#read_file'
get '/security/thread_context_sharing' => 'system_test#thread_context_sharing'
get '/trace/manual_keep_drop' => 'system_test#trace_manual_keep_drop'
get '/make_distant_call' => 'system_test#make_distant_call'

Expand Down
Loading