diff --git a/benchmarks/Benchmarks/packages.lock.json b/benchmarks/Benchmarks/packages.lock.json index 17371df6e33..1c79ed7d8bf 100644 --- a/benchmarks/Benchmarks/packages.lock.json +++ b/benchmarks/Benchmarks/packages.lock.json @@ -67,8 +67,12 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==" + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", + "dependencies": { + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0" + } }, "Elasticsearch.Net": { "type": "Transitive", @@ -442,8 +446,11 @@ }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "tCQTzPsGZh/A9LhhA6zrqCRV4hOHsK90/G7q3Khxmn6tnB1PuNU0cRaKANP2AWcF9bn0zsuOoZOSrHuJk6oNBA==" + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } }, "System.Diagnostics.FileVersionInfo": { "type": "Transitive", @@ -757,8 +764,8 @@ }, "System.Runtime.CompilerServices.Unsafe": { "type": "Transitive", - "resolved": "4.5.2", - "contentHash": "wprSFgext8cwqymChhrBLu62LMg/1u92bU+VOwyfBimSPVFXtsNqEWC92Pf9ofzJFlk4IHmJA75EDJn1b2goAQ==" + "resolved": "6.0.0", + "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" }, "System.Runtime.Extensions": { "type": "Transitive", @@ -1019,6 +1026,23 @@ "System.Text.Encoding": "4.3.0" } }, + "System.Text.Encodings.Web": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Text.Json": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Text.Encodings.Web": "8.0.0" + } + }, "System.Text.RegularExpressions": { "type": "Transitive", "resolved": "4.3.0", @@ -1172,7 +1196,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.17, )" + "Elastic.Transport": "[0.4.18, )" } } } diff --git a/benchmarks/Profiling/packages.lock.json b/benchmarks/Profiling/packages.lock.json index 5bea8f8f01d..76398130773 100644 --- a/benchmarks/Profiling/packages.lock.json +++ b/benchmarks/Profiling/packages.lock.json @@ -31,8 +31,12 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==" + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", + "dependencies": { + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0" + } }, "Microsoft.Build.Tasks.Git": { "type": "Transitive", @@ -85,10 +89,40 @@ "Microsoft.SourceLink.Common": "1.1.1" } }, + "System.Diagnostics.DiagnosticSource": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" + }, + "System.Text.Encodings.Web": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Text.Json": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Text.Encodings.Web": "8.0.0" + } + }, "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.17, )" + "Elastic.Transport": "[0.4.18, )" } } } diff --git a/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json b/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json index 803444f0037..209718c5510 100644 --- a/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json +++ b/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json @@ -37,20 +37,20 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==", + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", - "System.Diagnostics.DiagnosticSource": "6.0.1", - "System.Text.Json": "6.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==", + "resolved": "8.0.0", + "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==", "dependencies": { "System.Threading.Tasks.Extensions": "4.5.4" } @@ -118,17 +118,17 @@ }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", - "resolved": "6.0.1", - "contentHash": "KiLYDu2k2J82Q9BJpWiuQqCkFjRBWVq4jDzKKWawVi9KWzyD0XG3cmfX0vqTQlL14Wi9EufJrbL0+KCLTbqWiQ==", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", "dependencies": { - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Memory": { "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==", + "resolved": "4.5.5", + "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", "dependencies": { "System.Buffers": "4.5.1", "System.Numerics.Vectors": "4.5.0", @@ -147,25 +147,24 @@ }, "System.Text.Encodings.Web": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", "dependencies": { "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Text.Json": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "6.0.0", + "Microsoft.Bcl.AsyncInterfaces": "8.0.0", "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", - "System.Numerics.Vectors": "4.5.0", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "6.0.0", + "System.Text.Encodings.Web": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4", "System.ValueTuple": "4.5.0" } @@ -186,7 +185,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.17, )" + "Elastic.Transport": "[0.4.18, )" } } }, @@ -235,20 +234,20 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==", + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", - "System.Diagnostics.DiagnosticSource": "6.0.1", - "System.Text.Json": "6.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==", + "resolved": "8.0.0", + "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==", "dependencies": { "System.Threading.Tasks.Extensions": "4.5.4" } @@ -321,17 +320,17 @@ }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", - "resolved": "6.0.1", - "contentHash": "KiLYDu2k2J82Q9BJpWiuQqCkFjRBWVq4jDzKKWawVi9KWzyD0XG3cmfX0vqTQlL14Wi9EufJrbL0+KCLTbqWiQ==", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", "dependencies": { - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Memory": { "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==", + "resolved": "4.5.5", + "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", "dependencies": { "System.Buffers": "4.5.1", "System.Numerics.Vectors": "4.4.0", @@ -340,8 +339,8 @@ }, "System.Numerics.Vectors": { "type": "Transitive", - "resolved": "4.5.0", - "contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ==" + "resolved": "4.4.0", + "contentHash": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==" }, "System.Runtime.CompilerServices.Unsafe": { "type": "Transitive", @@ -350,25 +349,24 @@ }, "System.Text.Encodings.Web": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", "dependencies": { "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Text.Json": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "6.0.0", + "Microsoft.Bcl.AsyncInterfaces": "8.0.0", "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", - "System.Numerics.Vectors": "4.5.0", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "6.0.0", + "System.Text.Encodings.Web": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, @@ -383,7 +381,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.17, )" + "Elastic.Transport": "[0.4.18, )" } } }, @@ -423,20 +421,20 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==", + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", - "System.Diagnostics.DiagnosticSource": "6.0.1", - "System.Text.Json": "6.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==" + "resolved": "8.0.0", + "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==" }, "Microsoft.Build.Tasks.Git": { "type": "Transitive", @@ -501,17 +499,17 @@ }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", - "resolved": "6.0.1", - "contentHash": "KiLYDu2k2J82Q9BJpWiuQqCkFjRBWVq4jDzKKWawVi9KWzyD0XG3cmfX0vqTQlL14Wi9EufJrbL0+KCLTbqWiQ==", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", "dependencies": { - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Memory": { "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==", + "resolved": "4.5.5", + "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", "dependencies": { "System.Buffers": "4.5.1", "System.Numerics.Vectors": "4.4.0", @@ -520,8 +518,8 @@ }, "System.Numerics.Vectors": { "type": "Transitive", - "resolved": "4.5.0", - "contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ==" + "resolved": "4.4.0", + "contentHash": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==" }, "System.Runtime.CompilerServices.Unsafe": { "type": "Transitive", @@ -530,25 +528,24 @@ }, "System.Text.Encodings.Web": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", "dependencies": { "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Text.Json": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "6.0.0", + "Microsoft.Bcl.AsyncInterfaces": "8.0.0", "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", - "System.Numerics.Vectors": "4.5.0", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "6.0.0", + "System.Text.Encodings.Web": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, @@ -563,7 +560,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.17, )" + "Elastic.Transport": "[0.4.18, )" } } }, @@ -603,8 +600,12 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==" + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", + "dependencies": { + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0" + } }, "Microsoft.Build.Tasks.Git": { "type": "Transitive", @@ -657,10 +658,40 @@ "Microsoft.SourceLink.Common": "1.1.1" } }, + "System.Diagnostics.DiagnosticSource": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" + }, + "System.Text.Encodings.Web": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Text.Json": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Text.Encodings.Web": "8.0.0" + } + }, "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.17, )" + "Elastic.Transport": "[0.4.18, )" } } }, @@ -700,8 +731,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==" + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==" }, "Microsoft.Build.Tasks.Git": { "type": "Transitive", @@ -757,7 +788,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.17, )" + "Elastic.Transport": "[0.4.18, )" } } } diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/Client/ElasticsearchClient.cs b/src/Elastic.Clients.Elasticsearch.Serverless/Client/ElasticsearchClient.cs index d32e24670be..d5ace0ce48a 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/Client/ElasticsearchClient.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/Client/ElasticsearchClient.cs @@ -25,7 +25,7 @@ public partial class ElasticsearchClient // This should be updated if any of the code uses semantic conventions defined in newer schema versions. private const string OpenTelemetrySchemaVersion = "https://opentelemetry.io/schemas/1.21.0"; - private readonly HttpTransport _transport; + private readonly ITransport _transport; internal static ConditionalWeakTable SettingsTable { get; } = new(); /// @@ -59,28 +59,28 @@ public ElasticsearchClient(string cloudId, AuthorizationHeader credentials) : th /// /// The used to configure the client. public ElasticsearchClient(IElasticsearchClientSettings elasticsearchClientSettings) - : this(new DefaultHttpTransport(elasticsearchClientSettings)) + : this(new DistributedTransport(elasticsearchClientSettings)) { } - internal ElasticsearchClient(HttpTransport transport) + internal ElasticsearchClient(ITransport transport) { transport.ThrowIfNull(nameof(transport)); - transport.Settings.ThrowIfNull(nameof(transport.Settings)); - transport.Settings.RequestResponseSerializer.ThrowIfNull( - nameof(transport.Settings.RequestResponseSerializer)); - transport.Settings.Inferrer.ThrowIfNull(nameof(transport.Settings.Inferrer)); + transport.Configuration.ThrowIfNull(nameof(transport.Configuration)); + transport.Configuration.RequestResponseSerializer.ThrowIfNull( + nameof(transport.Configuration.RequestResponseSerializer)); + transport.Configuration.Inferrer.ThrowIfNull(nameof(transport.Configuration.Inferrer)); _transport = transport; SetupNamespaces(); } - public IElasticsearchClientSettings ElasticsearchClientSettings => _transport.Settings; - public Inferrer Infer => _transport.Settings.Inferrer; - public Serializer RequestResponseSerializer => _transport.Settings.RequestResponseSerializer; - public Serializer SourceSerializer => _transport.Settings.SourceSerializer; - public HttpTransport Transport => _transport; + public IElasticsearchClientSettings ElasticsearchClientSettings => _transport.Configuration; + public Inferrer Infer => _transport.Configuration.Inferrer; + public Serializer RequestResponseSerializer => _transport.Configuration.RequestResponseSerializer; + public Serializer SourceSerializer => _transport.Configuration.SourceSerializer; + public ITransport Transport => _transport; private ProductCheckStatus _productCheckStatus; diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/Elastic.Clients.Elasticsearch.Serverless.csproj b/src/Elastic.Clients.Elasticsearch.Serverless/Elastic.Clients.Elasticsearch.Serverless.csproj index 25fbc3e20ef..ff79f9cb24f 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/Elastic.Clients.Elasticsearch.Serverless.csproj +++ b/src/Elastic.Clients.Elasticsearch.Serverless/Elastic.Clients.Elasticsearch.Serverless.csproj @@ -21,7 +21,7 @@ annotations - + all runtime; build; native; contentfiles; analyzers diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/packages.lock.json b/src/Elastic.Clients.Elasticsearch.Serverless/packages.lock.json index 106cf2c584f..e3706268c0b 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/packages.lock.json +++ b/src/Elastic.Clients.Elasticsearch.Serverless/packages.lock.json @@ -22,14 +22,14 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.4.17, )", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==", + "requested": "[0.4.18, )", + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", - "System.Diagnostics.DiagnosticSource": "6.0.1", - "System.Text.Json": "6.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, @@ -50,8 +50,8 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==", + "resolved": "8.0.0", + "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==", "dependencies": { "System.Threading.Tasks.Extensions": "4.5.4" } @@ -119,17 +119,17 @@ }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", - "resolved": "6.0.1", - "contentHash": "KiLYDu2k2J82Q9BJpWiuQqCkFjRBWVq4jDzKKWawVi9KWzyD0XG3cmfX0vqTQlL14Wi9EufJrbL0+KCLTbqWiQ==", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", "dependencies": { - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Memory": { "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==", + "resolved": "4.5.5", + "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", "dependencies": { "System.Buffers": "4.5.1", "System.Numerics.Vectors": "4.5.0", @@ -148,25 +148,24 @@ }, "System.Text.Encodings.Web": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", "dependencies": { "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Text.Json": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "6.0.0", + "Microsoft.Bcl.AsyncInterfaces": "8.0.0", "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", - "System.Numerics.Vectors": "4.5.0", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "6.0.0", + "System.Text.Encodings.Web": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4", "System.ValueTuple": "4.5.0" } @@ -206,14 +205,14 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.4.17, )", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==", + "requested": "[0.4.18, )", + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", - "System.Diagnostics.DiagnosticSource": "6.0.1", - "System.Text.Json": "6.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, @@ -243,8 +242,8 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==", + "resolved": "8.0.0", + "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==", "dependencies": { "System.Threading.Tasks.Extensions": "4.5.4" } @@ -317,17 +316,17 @@ }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", - "resolved": "6.0.1", - "contentHash": "KiLYDu2k2J82Q9BJpWiuQqCkFjRBWVq4jDzKKWawVi9KWzyD0XG3cmfX0vqTQlL14Wi9EufJrbL0+KCLTbqWiQ==", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", "dependencies": { - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Memory": { "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==", + "resolved": "4.5.5", + "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", "dependencies": { "System.Buffers": "4.5.1", "System.Numerics.Vectors": "4.4.0", @@ -336,8 +335,8 @@ }, "System.Numerics.Vectors": { "type": "Transitive", - "resolved": "4.5.0", - "contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ==" + "resolved": "4.4.0", + "contentHash": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==" }, "System.Runtime.CompilerServices.Unsafe": { "type": "Transitive", @@ -346,25 +345,24 @@ }, "System.Text.Encodings.Web": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", "dependencies": { "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Text.Json": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "6.0.0", + "Microsoft.Bcl.AsyncInterfaces": "8.0.0", "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", - "System.Numerics.Vectors": "4.5.0", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "6.0.0", + "System.Text.Encodings.Web": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, @@ -398,14 +396,14 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.4.17, )", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==", + "requested": "[0.4.18, )", + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", - "System.Diagnostics.DiagnosticSource": "6.0.1", - "System.Text.Json": "6.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, @@ -426,8 +424,8 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==" + "resolved": "8.0.0", + "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==" }, "Microsoft.Build.Tasks.Git": { "type": "Transitive", @@ -492,17 +490,17 @@ }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", - "resolved": "6.0.1", - "contentHash": "KiLYDu2k2J82Q9BJpWiuQqCkFjRBWVq4jDzKKWawVi9KWzyD0XG3cmfX0vqTQlL14Wi9EufJrbL0+KCLTbqWiQ==", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", "dependencies": { - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Memory": { "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==", + "resolved": "4.5.5", + "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", "dependencies": { "System.Buffers": "4.5.1", "System.Numerics.Vectors": "4.4.0", @@ -511,8 +509,8 @@ }, "System.Numerics.Vectors": { "type": "Transitive", - "resolved": "4.5.0", - "contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ==" + "resolved": "4.4.0", + "contentHash": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==" }, "System.Runtime.CompilerServices.Unsafe": { "type": "Transitive", @@ -521,25 +519,24 @@ }, "System.Text.Encodings.Web": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", "dependencies": { "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Text.Json": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "6.0.0", + "Microsoft.Bcl.AsyncInterfaces": "8.0.0", "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", - "System.Numerics.Vectors": "4.5.0", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "6.0.0", + "System.Text.Encodings.Web": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, @@ -573,9 +570,13 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.4.17, )", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==" + "requested": "[0.4.18, )", + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", + "dependencies": { + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0" + } }, "Microsoft.NETFramework.ReferenceAssemblies": { "type": "Direct", @@ -642,6 +643,36 @@ "Microsoft.Build.Tasks.Git": "1.1.1", "Microsoft.SourceLink.Common": "1.1.1" } + }, + "System.Diagnostics.DiagnosticSource": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" + }, + "System.Text.Encodings.Web": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Text.Json": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Text.Encodings.Web": "8.0.0" + } } }, "net8.0": { @@ -665,9 +696,9 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.4.17, )", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==" + "requested": "[0.4.18, )", + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==" }, "Microsoft.NETFramework.ReferenceAssemblies": { "type": "Direct", diff --git a/src/Elastic.Clients.Elasticsearch.Shared/Core/Configuration/ElasticsearchClientSettings.cs b/src/Elastic.Clients.Elasticsearch.Shared/Core/Configuration/ElasticsearchClientSettings.cs index 455d5dfa569..9be4f8fb4c2 100644 --- a/src/Elastic.Clients.Elasticsearch.Shared/Core/Configuration/ElasticsearchClientSettings.cs +++ b/src/Elastic.Clients.Elasticsearch.Shared/Core/Configuration/ElasticsearchClientSettings.cs @@ -67,28 +67,28 @@ public ElasticsearchClientSettings(NodePool nodePool) : this(nodePool, null, nul public ElasticsearchClientSettings(NodePool nodePool, SourceSerializerFactory sourceSerializer) : this(nodePool, null, sourceSerializer) { } - public ElasticsearchClientSettings(NodePool nodePool, TransportClient connection) : this(nodePool, connection, null) { } + public ElasticsearchClientSettings(NodePool nodePool, IRequestInvoker requestInvoker) : this(nodePool, requestInvoker, null) { } - public ElasticsearchClientSettings(NodePool nodePool, TransportClient connection, SourceSerializerFactory sourceSerializer) : this( + public ElasticsearchClientSettings(NodePool nodePool, IRequestInvoker requestInvoker, SourceSerializerFactory sourceSerializer) : this( nodePool, - connection, sourceSerializer, null) + requestInvoker, sourceSerializer, null) { } /// /// Instantiate connection settings using a using the provided - /// that never uses any IO. + /// that never uses any IO. /// - public ElasticsearchClientSettings(InMemoryTransportClient inMemoryTransportClient) + public ElasticsearchClientSettings(InMemoryRequestInvoker inMemoryTransportClient) : this(new SingleNodePool(new Uri("http://localhost:9200")), inMemoryTransportClient) { } public ElasticsearchClientSettings( NodePool nodePool, - TransportClient connection, + IRequestInvoker requestInvoker, SourceSerializerFactory sourceSerializer, - IPropertyMappingProvider propertyMappingProvider) : base(nodePool, connection, sourceSerializer, propertyMappingProvider) + IPropertyMappingProvider propertyMappingProvider) : base(nodePool, requestInvoker, sourceSerializer, propertyMappingProvider) { } } @@ -121,10 +121,10 @@ public abstract class protected ElasticsearchClientSettingsBase( NodePool nodePool, - TransportClient connection, + IRequestInvoker requestInvoker, ElasticsearchClientSettings.SourceSerializerFactory? sourceSerializerFactory, IPropertyMappingProvider propertyMappingProvider) - : base(nodePool, connection, null, ElasticsearchClientProductRegistration.DefaultForElasticsearchClientsElasticsearch) + : base(nodePool, requestInvoker, null, ElasticsearchClientProductRegistration.DefaultForElasticsearchClientsElasticsearch) { var requestResponseSerializer = new DefaultRequestResponseSerializer(this); var sourceSerializer = new DefaultSourceSerializer(this); @@ -348,8 +348,8 @@ public ConnectionConfiguration(string cloudId, AuthorizationHeader credentials) public ConnectionConfiguration(NodePool nodePool) : this(nodePool, null, null) { } - public ConnectionConfiguration(NodePool nodePool, TransportClient connection) : this(nodePool, - connection, null) + public ConnectionConfiguration(NodePool nodePool, IRequestInvoker requestInvoker) : this(nodePool, + requestInvoker, null) { } @@ -358,9 +358,9 @@ public ConnectionConfiguration(NodePool nodePool, Serializer serializer) : this( { } - public ConnectionConfiguration(NodePool nodePool, TransportClient connection, + public ConnectionConfiguration(NodePool nodePool, IRequestInvoker requestInvoker, Serializer serializer) - : base(nodePool, connection, serializer) + : base(nodePool, requestInvoker, serializer) { } } @@ -376,10 +376,10 @@ public abstract class { private bool _includeServerStackTraceOnError; - protected ConnectionConfigurationBase(NodePool nodePool, TransportClient connection, + protected ConnectionConfigurationBase(NodePool nodePool, IRequestInvoker requestInvoker, Serializer? serializer, ProductRegistration registration = null) - : base(nodePool, connection, serializer, registration ?? new ElasticsearchProductRegistration(typeof(ElasticsearchClient))) => + : base(nodePool, requestInvoker, serializer, registration ?? new ElasticsearchProductRegistration(typeof(ElasticsearchClient))) => UserAgent(ConnectionConfiguration.DefaultUserAgent); bool TransportClientConfigurationValues.IncludeServerStackTraceOnError => _includeServerStackTraceOnError; diff --git a/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient.cs b/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient.cs index 9d3a7855b3c..aa9fcb10577 100644 --- a/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient.cs +++ b/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient.cs @@ -25,7 +25,7 @@ public partial class ElasticsearchClient // This should be updated if any of the code uses semantic conventions defined in newer schema versions. private const string OpenTelemetrySchemaVersion = "https://opentelemetry.io/schemas/1.21.0"; - private readonly HttpTransport _transport; + private readonly ITransport _transport; internal static ConditionalWeakTable SettingsTable { get; } = new(); /// @@ -59,28 +59,28 @@ public ElasticsearchClient(string cloudId, AuthorizationHeader credentials) : th /// /// The used to configure the client. public ElasticsearchClient(IElasticsearchClientSettings elasticsearchClientSettings) - : this(new DefaultHttpTransport(elasticsearchClientSettings)) + : this(new DistributedTransport(elasticsearchClientSettings)) { } - internal ElasticsearchClient(HttpTransport transport) + internal ElasticsearchClient(ITransport transport) { transport.ThrowIfNull(nameof(transport)); - transport.Settings.ThrowIfNull(nameof(transport.Settings)); - transport.Settings.RequestResponseSerializer.ThrowIfNull( - nameof(transport.Settings.RequestResponseSerializer)); - transport.Settings.Inferrer.ThrowIfNull(nameof(transport.Settings.Inferrer)); + transport.Configuration.ThrowIfNull(nameof(transport.Configuration)); + transport.Configuration.RequestResponseSerializer.ThrowIfNull( + nameof(transport.Configuration.RequestResponseSerializer)); + transport.Configuration.Inferrer.ThrowIfNull(nameof(transport.Configuration.Inferrer)); _transport = transport; SetupNamespaces(); } - public IElasticsearchClientSettings ElasticsearchClientSettings => _transport.Settings; - public Inferrer Infer => _transport.Settings.Inferrer; - public Serializer RequestResponseSerializer => _transport.Settings.RequestResponseSerializer; - public Serializer SourceSerializer => _transport.Settings.SourceSerializer; - public HttpTransport Transport => _transport; + public IElasticsearchClientSettings ElasticsearchClientSettings => _transport.Configuration; + public Inferrer Infer => _transport.Configuration.Inferrer; + public Serializer RequestResponseSerializer => _transport.Configuration.RequestResponseSerializer; + public Serializer SourceSerializer => _transport.Configuration.SourceSerializer; + public ITransport Transport => _transport; private ProductCheckStatus _productCheckStatus; diff --git a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj index 571e3cd6d49..793798f0a37 100644 --- a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj +++ b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj @@ -21,7 +21,7 @@ annotations - + all runtime; build; native; contentfiles; analyzers diff --git a/src/Elastic.Clients.Elasticsearch/packages.lock.json b/src/Elastic.Clients.Elasticsearch/packages.lock.json index 106cf2c584f..e3706268c0b 100644 --- a/src/Elastic.Clients.Elasticsearch/packages.lock.json +++ b/src/Elastic.Clients.Elasticsearch/packages.lock.json @@ -22,14 +22,14 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.4.17, )", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==", + "requested": "[0.4.18, )", + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", - "System.Diagnostics.DiagnosticSource": "6.0.1", - "System.Text.Json": "6.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, @@ -50,8 +50,8 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==", + "resolved": "8.0.0", + "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==", "dependencies": { "System.Threading.Tasks.Extensions": "4.5.4" } @@ -119,17 +119,17 @@ }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", - "resolved": "6.0.1", - "contentHash": "KiLYDu2k2J82Q9BJpWiuQqCkFjRBWVq4jDzKKWawVi9KWzyD0XG3cmfX0vqTQlL14Wi9EufJrbL0+KCLTbqWiQ==", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", "dependencies": { - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Memory": { "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==", + "resolved": "4.5.5", + "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", "dependencies": { "System.Buffers": "4.5.1", "System.Numerics.Vectors": "4.5.0", @@ -148,25 +148,24 @@ }, "System.Text.Encodings.Web": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", "dependencies": { "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Text.Json": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "6.0.0", + "Microsoft.Bcl.AsyncInterfaces": "8.0.0", "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", - "System.Numerics.Vectors": "4.5.0", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "6.0.0", + "System.Text.Encodings.Web": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4", "System.ValueTuple": "4.5.0" } @@ -206,14 +205,14 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.4.17, )", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==", + "requested": "[0.4.18, )", + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", - "System.Diagnostics.DiagnosticSource": "6.0.1", - "System.Text.Json": "6.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, @@ -243,8 +242,8 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==", + "resolved": "8.0.0", + "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==", "dependencies": { "System.Threading.Tasks.Extensions": "4.5.4" } @@ -317,17 +316,17 @@ }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", - "resolved": "6.0.1", - "contentHash": "KiLYDu2k2J82Q9BJpWiuQqCkFjRBWVq4jDzKKWawVi9KWzyD0XG3cmfX0vqTQlL14Wi9EufJrbL0+KCLTbqWiQ==", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", "dependencies": { - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Memory": { "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==", + "resolved": "4.5.5", + "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", "dependencies": { "System.Buffers": "4.5.1", "System.Numerics.Vectors": "4.4.0", @@ -336,8 +335,8 @@ }, "System.Numerics.Vectors": { "type": "Transitive", - "resolved": "4.5.0", - "contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ==" + "resolved": "4.4.0", + "contentHash": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==" }, "System.Runtime.CompilerServices.Unsafe": { "type": "Transitive", @@ -346,25 +345,24 @@ }, "System.Text.Encodings.Web": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", "dependencies": { "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Text.Json": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "6.0.0", + "Microsoft.Bcl.AsyncInterfaces": "8.0.0", "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", - "System.Numerics.Vectors": "4.5.0", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "6.0.0", + "System.Text.Encodings.Web": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, @@ -398,14 +396,14 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.4.17, )", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==", + "requested": "[0.4.18, )", + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", - "System.Diagnostics.DiagnosticSource": "6.0.1", - "System.Text.Json": "6.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, @@ -426,8 +424,8 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==" + "resolved": "8.0.0", + "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==" }, "Microsoft.Build.Tasks.Git": { "type": "Transitive", @@ -492,17 +490,17 @@ }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", - "resolved": "6.0.1", - "contentHash": "KiLYDu2k2J82Q9BJpWiuQqCkFjRBWVq4jDzKKWawVi9KWzyD0XG3cmfX0vqTQlL14Wi9EufJrbL0+KCLTbqWiQ==", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", "dependencies": { - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Memory": { "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==", + "resolved": "4.5.5", + "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", "dependencies": { "System.Buffers": "4.5.1", "System.Numerics.Vectors": "4.4.0", @@ -511,8 +509,8 @@ }, "System.Numerics.Vectors": { "type": "Transitive", - "resolved": "4.5.0", - "contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ==" + "resolved": "4.4.0", + "contentHash": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==" }, "System.Runtime.CompilerServices.Unsafe": { "type": "Transitive", @@ -521,25 +519,24 @@ }, "System.Text.Encodings.Web": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", "dependencies": { "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Text.Json": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "6.0.0", + "Microsoft.Bcl.AsyncInterfaces": "8.0.0", "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", - "System.Numerics.Vectors": "4.5.0", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "6.0.0", + "System.Text.Encodings.Web": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, @@ -573,9 +570,13 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.4.17, )", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==" + "requested": "[0.4.18, )", + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", + "dependencies": { + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0" + } }, "Microsoft.NETFramework.ReferenceAssemblies": { "type": "Direct", @@ -642,6 +643,36 @@ "Microsoft.Build.Tasks.Git": "1.1.1", "Microsoft.SourceLink.Common": "1.1.1" } + }, + "System.Diagnostics.DiagnosticSource": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" + }, + "System.Text.Encodings.Web": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Text.Json": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Text.Encodings.Web": "8.0.0" + } } }, "net8.0": { @@ -665,9 +696,9 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.4.17, )", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==" + "requested": "[0.4.18, )", + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==" }, "Microsoft.NETFramework.ReferenceAssemblies": { "type": "Direct", diff --git a/src/Playground/Playground.csproj b/src/Playground/Playground.csproj index 77c920359d4..1ff9866ee30 100644 --- a/src/Playground/Playground.csproj +++ b/src/Playground/Playground.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/Playground/Program.cs b/src/Playground/Program.cs index 9131ef1bba7..9e748025d9e 100644 --- a/src/Playground/Program.cs +++ b/src/Playground/Program.cs @@ -9,315 +9,15 @@ using Elastic.Transport; using Moq; using Playground; -using CreateIndexResponse = Elastic.Clients.Elasticsearch.IndexManagement.CreateIndexResponse; -// const string IndexName = "stock-demo-v1"; +var client = new ElasticsearchClient(); -var createResponse = new CreateIndexResponse { Acknowledged = true, Index = "testing", ShardsAcknowledged = true }; -var mockedResponse = TestableResponseFactory.CreateSuccessfulResponse(createResponse, 201); +var resp = client.Search(); -var mockedClient = Mock.Of(e => - e.Indices.Create() == mockedResponse); +var adj = resp.Aggregations!.GetAdjacencyMatrix("test"); +var firstAdj = adj!.Buckets.First(); +var firstAdjSub = firstAdj.GetBoxplot("sub"); -var testResponse = mockedClient.Indices.Create(); +var mis = resp.Aggregations!.GetMissing("test"); +var misSub = mis!.GetBoxplot("sub"); -if (testResponse.IsValidResponse) - Console.WriteLine("SUCCESS"); - -// ALTERNATIVE - -var stubbedClient = new TestableElasticsearchClient(); -var stubbedResponse = stubbedClient.Indices.Create(); - -Console.ReadKey(); - -#region Hidden -Aggregation a = new TermsAggregation("test"); - -var settings = new ElasticsearchClientSettings(new InMemoryTransportClient()) - .DefaultIndex("default-index") - .DefaultMappingFor(m => m - .DisableIdInference() - .IndexName("people") - .IdProperty(id => id.SecondaryId) - .RoutingProperty(id => id.SecondaryId) - .RelationName("relation")) - //.DefaultFieldNameInferrer(s => $"{s}_2") - .EnableDebugMode(); - -var client = new ElasticsearchClient(settings); - -var myTemplate = new DynamicTemplate -{ - PathMatch = "testPathMatch", - Mapping = new KeywordProperty() -}; - -var createIndexRequest = new CreateIndexRequest("testing") -{ - Mappings = new TypeMapping - { - DynamicTemplates = new[] - { - new Dictionary - { - { "testTemplateName", myTemplate } - } - } - } -}; - -var indexCreateResponse = await client.Indices.CreateAsync(createIndexRequest); - -var createIndexResponse = await client.Indices.CreateAsync("my-index-name", i => i - .Mappings(m => m.Properties(p => p - .Boolean(p => p.IsDeleted, b => b.NullValue(true).Store(false).Fielddata(f => f.Format(NumericFielddataFormat.Array))) - .Scalar(p => p.Id) - .Boolean("not-on-type") - ))); - -var filterResponse = await client.SearchAsync(s => s - .Query(q => q - .Bool(b => b - .Filter( - f => f.Term(t => t.Field(f => f.Age).Value(37)), - f => f.Term(t => t.Field(f => f.FirstName).Value("Steve")) - )))); - -var person = new Person { Id = 101, FirstName = "Steve", LastName = "Gordon", Age = 37, Email = "sgordon@example.com" }; - -var propertyName = (IUrlParameter)Infer.Property(p => p.SecondaryId); -var propertyName2 = (IUrlParameter)Infer.Property(p => p.SecondaryId); - -//var a = new PropertyMapping(); -//var b = PropertyMapping.Default; - -//var equal = a.Equals(b); - -var propertyNameString = propertyName.GetString(settings); -propertyNameString = propertyName.GetString(settings); -propertyNameString = propertyName2.GetString(settings); - -var response = await client.IndexAsync(person); - -//var serializedPerson = JsonSerializer.Serialize(person); - -Console.WriteLine("DONE"); -Console.ReadKey(); - -//var existsResponse = await client.Indices.ExistsAsync(IndexName); - -//if (!existsResponse.Exists) -//{ -// var newIndexResponse = await client.Indices.CreateAsync(IndexName, i => i -// .Mappings(m => m -// .Properties(new Elastic.Clients.Elasticsearch.Mapping.Properties -// { -// { "symbol", new KeywordProperty() }, -// { "high", new FloatNumberProperty() }, -// { "low", new FloatNumberProperty() }, -// { "open", new FloatNumberProperty() }, -// { "close", new FloatNumberProperty() }, -// })) -// //.Map(m => m -// // .AutoMap() -// // .Properties(p => p.Keyword(k => k.Name(n => n.Symbol)))) -// .Settings(s => s.NumberOfShards(1).NumberOfReplicas(0))); - -// if (!newIndexResponse.IsValid || newIndexResponse.Acknowledged is false) -// throw new Exception("Oh no!"); - -// var bulkAll = client.BulkAll(ReadStockData(), r => r -// .Index(IndexName) -// .BackOffRetries(20) -// .BackOffTime(TimeSpan.FromSeconds(10)) -// .ContinueAfterDroppedDocuments() -// .DroppedDocumentCallback((r, d) => -// { -// Console.WriteLine(r.Error?.Reason ?? "NO REASON"); -// }) -// .MaxDegreeOfParallelism(4) -// .Size(1000)); - -// bulkAll.Wait(TimeSpan.FromMinutes(10), r => Console.WriteLine("Data indexed")); -//} - -//var aggExampleResponse = await client.SearchAsync(s => s -// .Index(IndexName) -// .Size(0) -// .Query(q => q -// .Bool(b => b -// .Filter(new[] { new Query(new TermQuery { Field = "symbol", Value = "MSFT" }) }))) -// .Aggregations(a => a -// .DateHistogram("by-month", dh => dh -// .CalendarInterval(CalendarInterval.Month) -// .Field(fld => fld.Date) -// .Order(HistogramOrder.KeyDescending) -// .Aggregations(agg => agg -// .Sum("trade-volumes", sum => sum.Field(fld => fld.Volume)))))); - -//if (!aggExampleResponse.IsValid) throw new Exception("Oh no"); - -//var monthlyBuckets = aggExampleResponse.Aggregations?.GetDateHistogram("by-month")?.Buckets ?? Array.Empty(); - -//foreach (var monthlyBucket in monthlyBuckets) -//{ -// var volume = monthlyBucket.GetSum("trade-volumes"); -// Console.WriteLine($"{monthlyBucket.Key.DateTimeOffset:d} : {volume:n0}"); -//} - -//Console.WriteLine("Press any key to exit."); -//Console.ReadKey(); - -//static IEnumerable ReadStockData() -//{ -// var file = new StreamReader("c:\\stock-data\\all_stocks_5yr.csv"); - -// string? line; -// while ((line = file.ReadLine()) is not null) -// { -// yield return new StockData(line); -// } -//} - -public class StockData -{ - private static readonly Dictionary CompanyLookup = new() - { - { "AAL", "American Airlines Group Inc" }, - { "MSFT", "Microsoft Corporation" }, - { "AME", "AMETEK, Inc." }, - { "M", "Macy's inc" } - }; - - public StockData(string dataLine) - { - var columns = dataLine.Split(',', StringSplitOptions.TrimEntries); - - if (DateTime.TryParse(columns[0], out var date)) - Date = date; - - if (double.TryParse(columns[1], out var open)) - Open = open; - - if (double.TryParse(columns[2], out var high)) - High = high; - - if (double.TryParse(columns[3], out var low)) - Low = low; - - if (double.TryParse(columns[4], out var close)) - Close = close; - - if (uint.TryParse(columns[5], out var volume)) - Volume = volume; - - Symbol = columns[6]; - - if (CompanyLookup.TryGetValue(Symbol, out var name)) - Name = name; - } - - public DateTime Date { get; init; } - public double Open { get; init; } - public double Close { get; init; } - public double High { get; init; } - public double Low { get; init; } - public uint Volume { get; init; } - public string Symbol { get; init; } - public string? Name { get; init; } -} - -//using System.Text; -//using Elastic.Clients.Elasticsearch; -//using Elastic.Clients.Elasticsearch.IndexManagement; -//using Elastic.Clients.Elasticsearch.Mapping; -//using Elastic.Transport; -//using Playground; - - - - -//var settings = new ElasticsearchClientSettings(new InMemoryTransportClient()) -// .EnableDebugMode() -// .DefaultMappingFor(p => p -// .PropertyName(pn => pn.Age, "custom-name") -// .Ignore(pn => pn.Email)); - -//var client = new ElasticsearchClient(settings); - -//var response = await client.IndexAsync(new Person { FirstName = "Steve", LastName = "Gordon", Age = 37, Email = "test@example.com", Id = 1000 }, "test-index"); - - - -//var putTemplateRequest = new PutIndexTemplateRequest("my-template") -//{ -// Template = new IndexTemplateMapping -// { -// Mappings = new TypeMapping -// { -// Properties = new Properties -// { -// { "field1", new KeywordProperty { Boost = 2.0, Store = false } } -// } -// }, -// Settings = new IndexSettings -// { -// Index = new IndexSettings -// { -// NumberOfReplicas = 1, -// Priority = 2, -// } -// } -// } -//}; - -////var putMappingRequest = new PutMappingRequest("test-index") -////{ -//// Properties = new Properties -//// { -//// { "field1", new TextProperty { Boost = 2.0, Store = false } } -//// } -////}; - -//var stream = new MemoryStream(); - -//client.RequestResponseSerializer.Serialize(putTemplateRequest, stream); - -//stream.Position = 0; - -//var sr = new StreamReader(stream); - -//var json = sr.ReadToEnd(); - -//Console.WriteLine(json); - -//Console.ReadKey(); - -////const string propertiesJson = @"{""field1"":{""boost"":2,""type"":""text"",""store"":false},""field2"":{""type"":""ip""},""name"":{""properties"":{""first"":{""type"":""text"",""fields"":{""keyword"":{""type"":""keyword"",""ignore_above"":256}}},""last"":{""type"":""text"",""fields"":{""keyword"":{""type"":""keyword"",""ignore_above"":256}}}}}}"; - -////stream = new MemoryStream(Encoding.UTF8.GetBytes(propertiesJson)); - -////var properties = client.RequestResponseSerializer.Deserialize(stream); - -////if (properties.TryGetProperty("field1", out var textProperty)) -////{ -//// Console.WriteLine($"Found field1 with boost: {textProperty.Boost}"); -////} - -//Console.WriteLine("DONE"); - -//Console.ReadKey(); - -#endregion - -public class TestableElasticsearchClient : ElasticsearchClient -{ - public override IndicesNamespacedClient Indices => new TestIndicesNamespace(); -} - -public class TestIndicesNamespace : IndicesNamespacedClient -{ - public override CreateIndexResponse Create() => - TestableResponseFactory.CreateSuccessfulResponse(new CreateIndexResponse { Acknowledged = true, Index = "testing", ShardsAcknowledged = true }, 201); -} diff --git a/src/Playground/packages.lock.json b/src/Playground/packages.lock.json index 02d45981f37..7b36df182cc 100644 --- a/src/Playground/packages.lock.json +++ b/src/Playground/packages.lock.json @@ -16,9 +16,13 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.4.17, )", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==" + "requested": "[0.4.18, )", + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", + "dependencies": { + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0" + } }, "Microsoft.NETFramework.ReferenceAssemblies": { "type": "Direct", @@ -103,15 +107,45 @@ "Microsoft.SourceLink.Common": "1.1.1" } }, + "System.Diagnostics.DiagnosticSource": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, "System.Diagnostics.EventLog": { "type": "Transitive", "resolved": "6.0.0", "contentHash": "lcyUiXTsETK2ALsZrX+nWuHSIQeazhqPphLfaRxzdGaG93+0kELqpgEHtwWOlQe7+jSFnKwaCAgL4kjeZCQJnw==" }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" + }, + "System.Text.Encodings.Web": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Text.Json": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Text.Encodings.Web": "8.0.0" + } + }, "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.17, )" + "Elastic.Transport": "[0.4.18, )" } }, "elastic.clients.elasticsearch.jsonnetserializer": { @@ -124,7 +158,7 @@ "elastic.clients.elasticsearch.serverless": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.17, )" + "Elastic.Transport": "[0.4.18, )" } } } diff --git a/tests/Tests.ClusterLauncher/packages.lock.json b/tests/Tests.ClusterLauncher/packages.lock.json index dfe5785b485..36e9a2b494e 100644 --- a/tests/Tests.ClusterLauncher/packages.lock.json +++ b/tests/Tests.ClusterLauncher/packages.lock.json @@ -75,8 +75,12 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==" + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", + "dependencies": { + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0" + } }, "FluentAssertions": { "type": "Transitive", @@ -494,14 +498,10 @@ }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "tD6kosZnTAGdrEa0tZSuFyunMbt/5KYDnHdndJYGqZoNy00XVXyACd5d6KnE1YgYv3ne2CjtAfNXo/fwEhnKUA==", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" + "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Diagnostics.Process": { @@ -865,6 +865,11 @@ "Microsoft.NETCore.Targets": "1.1.0" } }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" + }, "System.Runtime.Extensions": { "type": "Transitive", "resolved": "4.3.0", @@ -1093,10 +1098,22 @@ "System.Text.Encoding": "4.3.0" } }, + "System.Text.Encodings.Web": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, "System.Text.Json": { "type": "Transitive", - "resolved": "4.6.0", - "contentHash": "4F8Xe+JIkVoDJ8hDAZ7HqLkjctN/6WItJIzQaifBwClC7wmoLSda/Sv2i6i1kycqDb3hWF4JCVbpAweyOKHEUA==" + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Text.Encodings.Web": "8.0.0" + } }, "System.Text.RegularExpressions": { "type": "Transitive", @@ -1261,7 +1278,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.17, )" + "Elastic.Transport": "[0.4.18, )" } }, "elastic.clients.elasticsearch.jsonnetserializer": { @@ -1378,8 +1395,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==" + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==" }, "FluentAssertions": { "type": "Transitive", @@ -2564,7 +2581,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.17, )" + "Elastic.Transport": "[0.4.18, )" } }, "elastic.clients.elasticsearch.jsonnetserializer": { diff --git a/tests/Tests.Core/Client/FixedResponseClient.cs b/tests/Tests.Core/Client/FixedResponseClient.cs index 466c0889e6b..8a33f59ed50 100644 --- a/tests/Tests.Core/Client/FixedResponseClient.cs +++ b/tests/Tests.Core/Client/FixedResponseClient.cs @@ -56,7 +56,7 @@ public static ElasticsearchClientSettings CreateConnectionSettings( var headers = new Dictionary> { { "x-elastic-product", new[] { "Elasticsearch" } } }; - var connection = new InMemoryTransportClient(responseBytes, statusCode, exception, contentType, headers); + var connection = new InMemoryRequestInvoker(responseBytes, statusCode, exception, contentType, headers); var nodePool = new SingleNodePool(new Uri("http://localhost:9200")); var defaultSettings = new ElasticsearchClientSettings(nodePool, connection) .DefaultIndex("default-index"); diff --git a/tests/Tests.Core/Extensions/TestConfigurationExtensions.cs b/tests/Tests.Core/Extensions/TestConfigurationExtensions.cs index ca1756d0f5f..ca8828d0d70 100644 --- a/tests/Tests.Core/Extensions/TestConfigurationExtensions.cs +++ b/tests/Tests.Core/Extensions/TestConfigurationExtensions.cs @@ -10,15 +10,15 @@ namespace Tests.Core.Extensions { public static class TestConfigurationExtensions { - public static TransportClient CreateConnection(this TestConfigurationBase configuration, bool forceInMemory = false, byte[] response = null) + public static IRequestInvoker CreateConnection(this TestConfigurationBase configuration, bool forceInMemory = false, byte[] response = null) { var headers = new Dictionary> { { "x-elastic-product", new[] { "Elasticsearch" } } }; return forceInMemory - ? new InMemoryTransportClient(response, headers: headers) + ? new InMemoryRequestInvoker(response, headers: headers) : configuration.RunIntegrationTests - ? new HttpTransportClient() - : new InMemoryTransportClient(response, headers: headers); + ? new HttpRequestInvoker() + : new InMemoryRequestInvoker(response, headers: headers); } public static bool InRange(this TestConfigurationBase configuration, string range) => diff --git a/tests/Tests.Core/Serialization/SerializationTester.cs b/tests/Tests.Core/Serialization/SerializationTester.cs index 22965149cb5..e88b766dd64 100644 --- a/tests/Tests.Core/Serialization/SerializationTester.cs +++ b/tests/Tests.Core/Serialization/SerializationTester.cs @@ -189,7 +189,7 @@ private string SerializeUsingClientDefault(T @object) => { string s => s, byte[] b => Encoding.UTF8.GetString(b), - _ => Serializer.SerializeToString(@object) + _ => Serializer.SerializeToString(@object, SerializationFormatting.None) }; private T Deserialize(string json) diff --git a/tests/Tests.Core/packages.lock.json b/tests/Tests.Core/packages.lock.json index ed519522e08..723e1f1c7ef 100644 --- a/tests/Tests.Core/packages.lock.json +++ b/tests/Tests.Core/packages.lock.json @@ -137,20 +137,20 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==", + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", - "System.Diagnostics.DiagnosticSource": "6.0.1", - "System.Text.Json": "6.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==" + "resolved": "8.0.0", + "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==" }, "Microsoft.Build.Tasks.Git": { "type": "Transitive", @@ -613,10 +613,10 @@ }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", - "resolved": "6.0.1", - "contentHash": "KiLYDu2k2J82Q9BJpWiuQqCkFjRBWVq4jDzKKWawVi9KWzyD0XG3cmfX0vqTQlL14Wi9EufJrbL0+KCLTbqWiQ==", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", "dependencies": { - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, @@ -842,8 +842,8 @@ }, "System.Memory": { "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==", + "resolved": "4.5.5", + "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", "dependencies": { "System.Buffers": "4.5.1", "System.Numerics.Vectors": "4.4.0", @@ -909,8 +909,8 @@ }, "System.Numerics.Vectors": { "type": "Transitive", - "resolved": "4.5.0", - "contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ==" + "resolved": "4.4.0", + "contentHash": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==" }, "System.ObjectModel": { "type": "Transitive", @@ -1337,25 +1337,24 @@ }, "System.Text.Encodings.Web": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", "dependencies": { "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Text.Json": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "6.0.0", + "Microsoft.Bcl.AsyncInterfaces": "8.0.0", "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", - "System.Numerics.Vectors": "4.5.0", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "6.0.0", + "System.Text.Encodings.Web": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, @@ -1589,7 +1588,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.17, )" + "Elastic.Transport": "[0.4.18, )" } }, "elastic.clients.elasticsearch.jsonnetserializer": { diff --git a/tests/Tests.Domain/Project.cs b/tests/Tests.Domain/Project.cs index 3e3a52a9e56..4a11e882352 100644 --- a/tests/Tests.Domain/Project.cs +++ b/tests/Tests.Domain/Project.cs @@ -171,7 +171,7 @@ public class Project public static class AnonymizerExtensions { - private static readonly Inferrer Infer = new(new ElasticsearchClientSettings(new InMemoryTransportClient()).ApplyDomainSettings()); + private static readonly Inferrer Infer = new(new ElasticsearchClientSettings(new InMemoryRequestInvoker()).ApplyDomainSettings()); public static object ToAnonymousObject(this JoinField field) => field.Match(p => Infer.RelationName(p.Name), c => new diff --git a/tests/Tests.Domain/packages.lock.json b/tests/Tests.Domain/packages.lock.json index 2218b4c8269..ea9eb19b24f 100644 --- a/tests/Tests.Domain/packages.lock.json +++ b/tests/Tests.Domain/packages.lock.json @@ -57,20 +57,20 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==", + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", - "System.Diagnostics.DiagnosticSource": "6.0.1", - "System.Text.Json": "6.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==" + "resolved": "8.0.0", + "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==" }, "Microsoft.Build.Tasks.Git": { "type": "Transitive", @@ -402,10 +402,10 @@ }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", - "resolved": "6.0.1", - "contentHash": "KiLYDu2k2J82Q9BJpWiuQqCkFjRBWVq4jDzKKWawVi9KWzyD0XG3cmfX0vqTQlL14Wi9EufJrbL0+KCLTbqWiQ==", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", "dependencies": { - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, @@ -601,8 +601,8 @@ }, "System.Memory": { "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==", + "resolved": "4.5.5", + "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", "dependencies": { "System.Buffers": "4.5.1", "System.Numerics.Vectors": "4.4.0", @@ -668,8 +668,8 @@ }, "System.Numerics.Vectors": { "type": "Transitive", - "resolved": "4.5.0", - "contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ==" + "resolved": "4.4.0", + "contentHash": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==" }, "System.ObjectModel": { "type": "Transitive", @@ -1009,25 +1009,24 @@ }, "System.Text.Encodings.Web": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", "dependencies": { "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Text.Json": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "6.0.0", + "Microsoft.Bcl.AsyncInterfaces": "8.0.0", "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", - "System.Numerics.Vectors": "4.5.0", + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "6.0.0", + "System.Text.Encodings.Web": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, @@ -1142,7 +1141,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.17, )" + "Elastic.Transport": "[0.4.18, )" } }, "tests.configuration": { diff --git a/tests/Tests/ClientConcepts/HighLevel/Indexing/IndexingDocuments.doc.cs b/tests/Tests/ClientConcepts/HighLevel/Indexing/IndexingDocuments.doc.cs index d18b117ce76..e3c7eab334c 100644 --- a/tests/Tests/ClientConcepts/HighLevel/Indexing/IndexingDocuments.doc.cs +++ b/tests/Tests/ClientConcepts/HighLevel/Indexing/IndexingDocuments.doc.cs @@ -18,7 +18,7 @@ namespace Tests.ClientConcepts.HighLevel.Indexing public class Indexing : DocumentationTestBase { private readonly ElasticsearchClient _client = new(new ElasticsearchClientSettings( - new SingleNodePool(new Uri("http://localhost:9200")), new InMemoryTransportClient())); + new SingleNodePool(new Uri("http://localhost:9200")), new InMemoryRequestInvoker())); /// hide public class Person @@ -180,7 +180,7 @@ public void BulkIndexDocumentsWithDescriptor() * Multiple documents can be indexed using the `BulkAll` method and `Wait()` extension method. * * This helper exposes functionality to automatically retry / backoff in the event of an indexing failure, - * and to control the number of documents indexed in a single HTTP request. In the example below each request will contain 1000 documents, + * and to control the number of documents indexed in a single HTTP request. In the example below each request will contain 1000 documents, * chunked from the original input. In the event of a large number of documents this could result in many HTTP requests, each containing * 1000 documents (the last request may contain less, depending on the total number). * @@ -241,8 +241,8 @@ public void BulkDocumentsWithObservableHelper() //* * `BufferToBulk` to customize individual operations within the bulk request before it is dispatched to the server //* * `RetryDocumentPredicate` to decide if a document that failed to be indexed should be retried //* * `DroppedDocumentCallback` to determine what to do in the event a document is not indexed, even after retrying - // * - // * The following example demonstrates some of these methods, in addition to using a `BulkAllObserver` to subscribe to + // * + // * The following example demonstrates some of these methods, in addition to using a `BulkAllObserver` to subscribe to //* the bulk indexing process and take some action on each successful bulk response, when an error occurs, and when //* the process has finished. //* diff --git a/tests/Tests/ClientConcepts/HighLevel/Inference/IndexNameInference.doc.cs b/tests/Tests/ClientConcepts/HighLevel/Inference/IndexNameInference.doc.cs index c36beda0f5e..16ef823034d 100644 --- a/tests/Tests/ClientConcepts/HighLevel/Inference/IndexNameInference.doc.cs +++ b/tests/Tests/ClientConcepts/HighLevel/Inference/IndexNameInference.doc.cs @@ -24,7 +24,7 @@ public class IndexNameInference : DocumentationTestBase //hide private class ConnectionSettings : ElasticsearchClientSettings { - public ConnectionSettings() : base(new InMemoryTransportClient()) + public ConnectionSettings() : base(new InMemoryRequestInvoker()) { } } diff --git a/tests/Tests/ClientConcepts/HighLevel/Serialization/CustomSerialization.doc.cs b/tests/Tests/ClientConcepts/HighLevel/Serialization/CustomSerialization.doc.cs index 3c53da440b9..59b7b92ef2c 100644 --- a/tests/Tests/ClientConcepts/HighLevel/Serialization/CustomSerialization.doc.cs +++ b/tests/Tests/ClientConcepts/HighLevel/Serialization/CustomSerialization.doc.cs @@ -218,7 +218,7 @@ [U] public void UsingJsonNetSerializer() var pool = new SingleNodePool(new Uri("http://localhost:9200")); var connectionSettings = new ElasticsearchClientSettings( pool, - connection: new InMemoryTransportClient(), // <1> an _in-memory_ connection is used here for example purposes. In your production application, you would use an `TransportClient` implementation that actually sends a request. + requestInvoker: new InMemoryRequestInvoker(), // <1> an _in-memory_ connection is used here for example purposes. In your production application, you would use an `TransportClient` implementation that actually sends a request. sourceSerializer: (builtin, settings) => new MyFirstCustomJsonNetSerializer(builtin, settings)) .DefaultIndex("my-index"); diff --git a/tests/Tests/Document/Multiple/Bulk/BulkResponseParstingTests.cs b/tests/Tests/Document/Multiple/Bulk/BulkResponseParstingTests.cs index 6f027c81901..8c88a5435f1 100644 --- a/tests/Tests/Document/Multiple/Bulk/BulkResponseParstingTests.cs +++ b/tests/Tests/Document/Multiple/Bulk/BulkResponseParstingTests.cs @@ -18,7 +18,7 @@ public void CanDeserialize() { var client = TestClient.DefaultInMemoryClient; var count = 100000; - var bytes = client.RequestResponseSerializer.SerializeToBytes(ReturnBulkResponse(count)); + var bytes = client.RequestResponseSerializer.SerializeToBytes(ReturnBulkResponse(count), SerializationFormatting.None); var x = Deserialize(bytes, client); x.Items.Should().HaveCount(count).And.NotContain(i => i == null); } @@ -29,32 +29,33 @@ private static BulkResponse Deserialize(byte[] response, ElasticsearchClient cli return client.RequestResponseSerializer.Deserialize(ms); } - private static object BulkItemResponse() => new + private static object BulkItemResponse() { - index = new + return new { - _index = "nest-52cfd7aa", - _type = "project", - _id = "Kuhn LLC", - _version = 1, - _shards = new + index = new { - total = 2, - successful = 1, - failed = 0 - }, - created = true, - status = 201 - } - }; + _index = "nest-52cfd7aa", + _type = "project", + _id = "Kuhn LLC", + _version = 1, + _shards = new { total = 2, successful = 1, failed = 0 }, + created = true, + status = 201 + } + }; + } - private static object ReturnBulkResponse(int numberOfItems) => new + private static object ReturnBulkResponse(int numberOfItems) { - took = 276, - errors = false, - items = Enumerable.Range(0, numberOfItems) - .Select(i => BulkItemResponse()) - .ToArray() - }; + return new + { + took = 276, + errors = false, + items = Enumerable.Range(0, numberOfItems) + .Select(i => BulkItemResponse()) + .ToArray() + }; + } } diff --git a/tests/Tests/Document/Multiple/Bulk/BulkSourceDeserialize.cs b/tests/Tests/Document/Multiple/Bulk/BulkSourceDeserialize.cs index 5227f2ced40..189b09ff773 100644 --- a/tests/Tests/Document/Multiple/Bulk/BulkSourceDeserialize.cs +++ b/tests/Tests/Document/Multiple/Bulk/BulkSourceDeserialize.cs @@ -46,7 +46,7 @@ public void CanDeserialize() var pool = new SingleNodePool(new Uri("http://localhost:9200")); - var connection = new InMemoryTransportClient(Encoding.UTF8.GetBytes(json)); + var connection = new InMemoryRequestInvoker(Encoding.UTF8.GetBytes(json)); var settings = new ElasticsearchClientSettings(pool, connection); var client = new ElasticsearchClient(settings); diff --git a/tests/Tests/Document/Multiple/BulkAll/BulkAllRetryTests.cs b/tests/Tests/Document/Multiple/BulkAll/BulkAllRetryTests.cs index 9fbacbaf9f7..4d127fa4180 100644 --- a/tests/Tests/Document/Multiple/BulkAll/BulkAllRetryTests.cs +++ b/tests/Tests/Document/Multiple/BulkAll/BulkAllRetryTests.cs @@ -16,7 +16,7 @@ public void RetriedButFailedDocuments_InvokeDroppedDocumentsCallback() var response = @"{""took"":30,""errors"":true,""items"":[{""index"":{""_index"":""thing"",""_id"":""1"",""status"":429}}]}"; var responseBytes = Encoding.UTF8.GetBytes(response); - var connection = new InMemoryTransportClient(responseBytes, 200); + var connection = new InMemoryRequestInvoker(responseBytes, 200); var connectionPool = new SingleNodePool(new Uri("http://localhost:9200")); var settings = new ElasticsearchClientSettings(connectionPool, connection).DefaultIndex("thing"); var client = new ElasticsearchClient(settings); diff --git a/tests/Tests/Documentation/ClientConcepts/Serialization/CustomSerializationTests.cs b/tests/Tests/Documentation/ClientConcepts/Serialization/CustomSerializationTests.cs index e7f08f16161..06faf3e1c6d 100644 --- a/tests/Tests/Documentation/ClientConcepts/Serialization/CustomSerializationTests.cs +++ b/tests/Tests/Documentation/ClientConcepts/Serialization/CustomSerializationTests.cs @@ -77,7 +77,7 @@ static void ConfigureOptions(JsonSerializerOptions o) => // <1> // Any changes to the documentation code needs to be applied here also. settings = new ElasticsearchClientSettings( nodePool, - new InMemoryTransportClient(), + new InMemoryRequestInvoker(), sourceSerializer: (defaultSerializer, settings) => new DefaultSourceSerializer(settings, ConfigureOptions)) .DisableDirectStreaming(); @@ -311,7 +311,7 @@ public async Task DerivingFromSystemTextJsonSerializer_ToRegisterACustomEnumConv // Any changes to the documentation code needs to be applied here also. settings = new ElasticsearchClientSettings( nodePool, - new InMemoryTransportClient(), + new InMemoryRequestInvoker(), sourceSerializer: (defaultSerializer, settings) => new MyCustomSerializer(settings)) .DisableDirectStreaming(); diff --git a/tests/Tests/Documentation/DocumentationTestBase.cs b/tests/Tests/Documentation/DocumentationTestBase.cs index 99f4bc3570d..8858b3bdc83 100644 --- a/tests/Tests/Documentation/DocumentationTestBase.cs +++ b/tests/Tests/Documentation/DocumentationTestBase.cs @@ -6,5 +6,5 @@ namespace Tests.Documentation; public abstract class DocumentationTestBase { - public static readonly ElasticsearchClient Client = new(new ElasticsearchClientSettings(new InMemoryTransportClient()).DisableDirectStreaming()); + public static readonly ElasticsearchClient Client = new(new ElasticsearchClientSettings(new InMemoryRequestInvoker()).DisableDirectStreaming()); } diff --git a/tests/Tests/Documentation/Usage/CrudExamplesTests.cs b/tests/Tests/Documentation/Usage/CrudExamplesTests.cs index 787435ec4d2..032882c4c6b 100644 --- a/tests/Tests/Documentation/Usage/CrudExamplesTests.cs +++ b/tests/Tests/Documentation/Usage/CrudExamplesTests.cs @@ -44,7 +44,7 @@ public async Task IndexingADocument() // Needed for the test assertion as we should use the in memory connection and disable direct streaming. // We don't want to include those in the docs as it may mislead or confuse developers. // Any changes to the documentation code needs to be applied here also. - client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryTransportClient(responseBytes, 201))); + client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryRequestInvoker(responseBytes, 201))); #pragma warning disable format //tag::create-tweet[] @@ -74,7 +74,7 @@ public async Task GettingADocument() var jsonResponse = @"{""_index"":""my-tweet-index"",""_id"":""1"",""_version"":1,""_seq_no"":0,""_primary_term"":1,""found"":true,""_source"":{""id"":1,""user"":""stevejgordon"",""postDate"":""2023-01-01T10:00:00"",""message"":""Test message""}}"; var responseBytes = Encoding.UTF8.GetBytes(jsonResponse); - var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryTransportClient(responseBytes, 200))); + var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryRequestInvoker(responseBytes, 200))); #pragma warning disable format //tag::get-tweet[] @@ -97,7 +97,7 @@ public async Task SearchingForDocumentsFluent() var jsonResponse = @"{""took"":9,""timed_out"":false,""_shards"":{""total"":1,""successful"":1,""skipped"":0,""failed"":0},""hits"":{""total"":{""value"":1,""relation"":""eq""},""max_score"":0.2876821,""hits"":[{""_index"":""my-tweet-index"",""_id"":""1"",""_score"":0.2876821,""_source"":{""id"":1,""user"":""stevejgordon"",""postDate"":""2023-01-01T10:00:00"",""message"":""Test message""}}]}}"; var responseBytes = Encoding.UTF8.GetBytes(jsonResponse); - var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryTransportClient(responseBytes, 200)).EnableDebugMode()); + var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryRequestInvoker(responseBytes, 200)).EnableDebugMode()); #pragma warning disable format //tag::search-tweet-fluent[] @@ -126,7 +126,7 @@ public async Task SearchingForDocumentsObject() var jsonResponse = @"{""took"":9,""timed_out"":false,""_shards"":{""total"":1,""successful"":1,""skipped"":0,""failed"":0},""hits"":{""total"":{""value"":1,""relation"":""eq""},""max_score"":0.2876821,""hits"":[{""_index"":""my-tweet-index"",""_id"":""1"",""_score"":0.2876821,""_source"":{""id"":1,""user"":""stevejgordon"",""postDate"":""2023-01-01T10:00:00"",""message"":""Test message""}}]}}"; var responseBytes = Encoding.UTF8.GetBytes(jsonResponse); - var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryTransportClient(responseBytes, 200))); + var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryRequestInvoker(responseBytes, 200))); #pragma warning disable format //tag::search-tweet-object-initializer[] @@ -155,7 +155,7 @@ public async Task UpdatingADocument() var jsonResponse = @"{""_index"":""my-tweet-index"",""_id"":""1"",""_version"":2,""result"":""updated"",""_shards"":{""total"":2,""successful"":1,""failed"":0},""_seq_no"":1,""_primary_term"":1}"; var responseBytes = Encoding.UTF8.GetBytes(jsonResponse); - var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryTransportClient(responseBytes, 200))); + var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryRequestInvoker(responseBytes, 200))); var tweet = new Tweet { @@ -188,7 +188,7 @@ public async Task DeletingADocument() var jsonResponse = @"{""_index"":""my-tweet-index"",""_id"":""1"",""_version"":3,""result"":""deleted"",""_shards"":{""total"":2,""successful"":1,""failed"":0},""_seq_no"":2,""_primary_term"":1}"; var responseBytes = Encoding.UTF8.GetBytes(jsonResponse); - var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryTransportClient(responseBytes, 200))); + var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryRequestInvoker(responseBytes, 200))); #pragma warning disable format //tag::delete-tweet[] diff --git a/tests/Tests/Serialization/DefaultSourceSerializerTests.cs b/tests/Tests/Serialization/DefaultSourceSerializerTests.cs index d9ea73f26d2..adc99d102d1 100644 --- a/tests/Tests/Serialization/DefaultSourceSerializerTests.cs +++ b/tests/Tests/Serialization/DefaultSourceSerializerTests.cs @@ -17,7 +17,7 @@ namespace Tests.Serialization; public class DefaultSourceSerializerTests : SerializerTestBase { private readonly ElasticsearchClient _client = new( - new ElasticsearchClientSettings(new InMemoryTransportClient()) + new ElasticsearchClientSettings(new InMemoryRequestInvoker()) .DefaultMappingFor(m => m.IndexName("index")) .DefaultMappingFor(m => m.IndexName("index")) .DefaultMappingFor(m => m.IndexName("index").RelationName("my_parent")) @@ -78,7 +78,7 @@ public async Task SourceSerialization_WithCustomSerializer_CorrectlySerializes_T var settings = new ElasticsearchClientSettings( nodePool, - new InMemoryTransportClient(), + new InMemoryRequestInvoker(), sourceSerializer: (defaultSerializer, settings) => new MyCustomSerializer(settings)) .DisableDirectStreaming() @@ -158,6 +158,9 @@ public MyCustomSerializer(IElasticsearchClientSettings settings) : base(settings _options = DefaultSourceSerializer.AddDefaultConverters(options); } - protected override JsonSerializerOptions CreateJsonSerializerOptions() => _options; + protected override JsonSerializerOptions CreateJsonSerializerOptions() + { + return _options; + } } } diff --git a/tests/Tests/Tests.csproj b/tests/Tests/Tests.csproj index 685de384e82..c8670f09133 100644 --- a/tests/Tests/Tests.csproj +++ b/tests/Tests/Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/tests/Tests/packages.lock.json b/tests/Tests/packages.lock.json index 40c2452581e..3a59794efda 100644 --- a/tests/Tests/packages.lock.json +++ b/tests/Tests/packages.lock.json @@ -31,11 +31,11 @@ }, "Elastic.Transport.VirtualizedCluster": { "type": "Direct", - "requested": "[0.4.17, )", - "resolved": "0.4.17", - "contentHash": "YWuHBnbs6n3ogOFe73uqhcsoeQMAPaiosfGkb5MTK4wA/5XyGsM7g7kYdi7XmFw2oq80UhQYBwZk+436h0EhLQ==", + "requested": "[0.4.18, )", + "resolved": "0.4.18", + "contentHash": "6npE4EqcMxbHlnviAvYcQyIAXQzAJUsaY8jvoQEQ1wERJkTi6jjKnLUmv+0Xdr8MjHHOtBhRlQ93IFlHQldaAA==", "dependencies": { - "Elastic.Transport": "0.4.17" + "Elastic.Transport": "0.4.18" } }, "FSharp.Core": { @@ -195,8 +195,12 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==" + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==", + "dependencies": { + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Text.Json": "8.0.0" + } }, "EmptyFiles": { "type": "Transitive", @@ -617,14 +621,10 @@ }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "tD6kosZnTAGdrEa0tZSuFyunMbt/5KYDnHdndJYGqZoNy00XVXyACd5d6KnE1YgYv3ne2CjtAfNXo/fwEhnKUA==", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" + "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, "System.Diagnostics.Process": { @@ -1058,6 +1058,11 @@ "Microsoft.NETCore.Targets": "1.1.0" } }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" + }, "System.Runtime.Extensions": { "type": "Transitive", "resolved": "4.3.0", @@ -1308,10 +1313,22 @@ "System.Text.Encoding": "4.3.0" } }, + "System.Text.Encodings.Web": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, "System.Text.Json": { "type": "Transitive", - "resolved": "4.6.0", - "contentHash": "4F8Xe+JIkVoDJ8hDAZ7HqLkjctN/6WItJIzQaifBwClC7wmoLSda/Sv2i6i1kycqDb3hWF4JCVbpAweyOKHEUA==" + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Text.Encodings.Web": "8.0.0" + } }, "System.Text.RegularExpressions": { "type": "Transitive", @@ -1478,7 +1495,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.17, )" + "Elastic.Transport": "[0.4.18, )" } }, "elastic.clients.elasticsearch.jsonnetserializer": { @@ -1557,11 +1574,11 @@ }, "Elastic.Transport.VirtualizedCluster": { "type": "Direct", - "requested": "[0.4.17, )", - "resolved": "0.4.17", - "contentHash": "YWuHBnbs6n3ogOFe73uqhcsoeQMAPaiosfGkb5MTK4wA/5XyGsM7g7kYdi7XmFw2oq80UhQYBwZk+436h0EhLQ==", + "requested": "[0.4.18, )", + "resolved": "0.4.18", + "contentHash": "6npE4EqcMxbHlnviAvYcQyIAXQzAJUsaY8jvoQEQ1wERJkTi6jjKnLUmv+0Xdr8MjHHOtBhRlQ93IFlHQldaAA==", "dependencies": { - "Elastic.Transport": "0.4.17" + "Elastic.Transport": "0.4.18" } }, "FSharp.Core": { @@ -1721,8 +1738,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.4.17", - "contentHash": "T8QGwTt3E+5b3YCkctyp+aUzJRZKiKZbbngCvell9tqhqfN4Po+Fbsw2ilX5Qm0JFnoIUzpIFJyTK6mCVf4rkg==" + "resolved": "0.4.18", + "contentHash": "Q9nGgYxB0r1jTkUf8zWbFKLk5JHliZhVU6vukdMLHLH/1EBKQvHzPahkrnV8KsvGOPFFqFAVOhQvaxpjXuS3TA==" }, "EmptyFiles": { "type": "Transitive", @@ -3004,7 +3021,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "[0.4.17, )" + "Elastic.Transport": "[0.4.18, )" } }, "elastic.clients.elasticsearch.jsonnetserializer": {