kz930 opened a new issue, #6755: URL: https://github.com/apache/texera/issues/6755
### What happened? When a URL fetch fails, `URLFetcherOpExec` emits a fallback message that is supposed to include the failed URL, but a broken string interpolation makes it print the descriptor object's `toString` instead. `common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/source/fetcher/URLFetcherOpExec.scala:38` ```scala case None => IOUtils.toInputStream(s"Fetch failed for URL: $desc.url", "UTF-8") ``` In an `s"..."` interpolator, `$desc` expands only the identifier `desc` (the `URLFetcherOpDesc` instance), and `.url` is appended as literal text. So on fetch failure the output `URL content` cell contains something like: ``` Fetch failed for URL: org.apache.texera.amber.operator.source.fetcher.urlfetcheropd...@1a2b3c.url ``` instead of the intended: ``` Fetch failed for URL: https://example.com/whatever ``` This makes the failure output unhelpful — the user can't tell which URL failed. **Fix:** wrap the member access in braces: ```scala case None => IOUtils.toInputStream(s"Fetch failed for URL: ${desc.url}", "UTF-8") ``` Notes: - Only reachable on the failure path (all retries in `URLFetchUtil.getInputStreamFromURL` return `None`). - Present on `main`. ### How to reproduce? **Option A — user-facing (workflow):** 1. Add a **URL Fetcher** operator to a workflow. 2. Set its URL to something that will fail to resolve/fetch, e.g. `https://this-host-does-not-exist.invalid/x`. 3. Set decoding to `UTF-8` and run. 4. Inspect the `URL content` output cell. Observed: `Fetch failed for URL: <object-hash>.url`. Expected: `Fetch failed for URL: https://this-host-does-not-exist.invalid/x`. **Option B — minimal (confirms the interpolation directly), via `sbt WorkflowOperator/console`:** ```scala class Foo { var url: String = "https://example.com/data.json" } val desc = new Foo println("A: Fetch failed for URL: " + s"$desc.url") println("B: Fetch failed for URL: " + s"${desc.url}") ``` Output: ``` A: Fetch failed for URL: [email protected] B: Fetch failed for URL: https://example.com/data.json ``` Line A mirrors the current code; line B is the intended output. ### Version/Branch 1.3.0-incubating-SNAPSHOT (main) ### Commit Hash (Optional) _No response_ ### What browsers are you seeing the problem on? _No response_ ### Relevant log output ```shell ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
