From 885bc749cfdbf15e8c3bc52abb8b8a592aafd0e4 Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Fri, 6 Dec 2024 10:42:02 -0500 Subject: [PATCH] docs(external): add notice for 'to_float' (#21973) * docs(external): add notice for 'to_float' * fix typo --- website/cue/reference/remap/functions/to_float.cue | 2 +- website/cue/reference/urls.cue | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/website/cue/reference/remap/functions/to_float.cue b/website/cue/reference/remap/functions/to_float.cue index 367d1cacccf89..b0e484c1c8e2c 100644 --- a/website/cue/reference/remap/functions/to_float.cue +++ b/website/cue/reference/remap/functions/to_float.cue @@ -5,7 +5,7 @@ remap: functions: to_float: { description: """ Coerces the `value` into a float. """ - + notices: ["Since [VRL v0.20.0](\(urls.vrl_changelog)#0200-2024-11-27) which is used since Vector v0.43.0, this function behaves differently than [parse_float](\(urls.vrl_functions)#parse_float). Notably, `to_float` will return an error for [non-normal](\(urls.is_normal)) floats whereas [parse_float](\(urls.vrl_functions)#parse_float) can return `inf` which might result in unsafe arithmetic operations that panic. This will be addressed in the future."] arguments: [ { name: "value" diff --git a/website/cue/reference/urls.cue b/website/cue/reference/urls.cue index dccffe6a010d4..3c846432eec6a 100644 --- a/website/cue/reference/urls.cue +++ b/website/cue/reference/urls.cue @@ -279,6 +279,7 @@ urls: { ip_ntoa: "https://linux.die.net/man/3/inet_ntoa" ip_ntop: "https://linux.die.net/man/3/inet_ntop" ip_pton: "https://linux.die.net/man/3/inet_pton" + is_normal: "https://doc.rust-lang.org/std/primitive.f64.html#method.is_normal" iso_8601: "\(wikipedia)/wiki/ISO_8601" iso3166_2: "\(wikipedia)/wiki/ISO_3166-2" issue_1694: "\(vector_repo)/issues/1694" @@ -654,6 +655,8 @@ urls: { vrl_runtime_errors: "\(vrl_errors_reference)#runtime-errors" vrl_safety: "\(vrl_reference)#safety" vrl_type_safety: "\(vrl_reference)#type-safety" + vrl_repo: "\(github)/vectordotdev/vrl" + vrl_changelog: "\(vrl_repo)/blob/main/CHANGELOG.md" vote_feature: "\(vector_repo)/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3A%22Type%3A+New+Feature%22" wasm: "https://webassembly.org/" wasm_languages: "\(github)/appcypher/awesome-wasm-langs"