Skip to content

feat(cli): log bindings.json and resource overwrites at INFO#1681

Merged
cotovanu-cristian merged 3 commits into
mainfrom
feat/increase-bindings-logging
May 25, 2026
Merged

feat(cli): log bindings.json and resource overwrites at INFO#1681
cotovanu-cristian merged 3 commits into
mainfrom
feat/increase-bindings-logging

Conversation

@cotovanu-cristian

@cotovanu-cristian cotovanu-cristian commented May 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Log raw resourceOverwrites dict from uipath.json at INFO when uipath run starts (_common.py:read_resource_overwrites_from_file).
  • Log raw bindings.json content + raw Studio binding-overwrites response at INFO during uipath debug (_studio_project.py:get_resource_overwrites).
  • No new flags or env vars; standard logging.getLogger("uipath") channel.

Motivation: diagnosing binding/overwrite mismatches from production telemetry currently requires re-running with extra instrumentation. With these logs, you can correlate what the agent actually saw against what Studio sent / what the bundled package declared.

Test plan

  • uipath run <agent> '{}' against a project with a populated uipath.json — verify INFO line "Resource overwrites read from …" shows the full JSON dict.
  • uipath run <agent> '{}' with empty/missing overwrites — verify the empty/{} log fires, and the "config file not found" branch logs at INFO.
  • uipath debug against a Studio project — verify the two INFO blocks (bindings content + Studio response) fire before the run.
  • uipath debug without UIPATH_PROJECT_ID — verify the existing "executing without resource overwrites" message still fires and nothing else changed.

🤖 Generated with Claude Code

Surface the bindings.json content sent to Studio (debug) and the raw
resource overwrites loaded from uipath.json (run) and received from
the Studio API (debug). Makes it possible to diagnose binding/overwrite
mismatches from logs alone without re-running with extra instrumentation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 25, 2026 11:53
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels May 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR increases CLI observability around resource binding/overwrite resolution by logging the raw bindings.json, the raw Studio binding-overwrites response, and the raw resourceOverwrites section from uipath.json at INFO level to aid production debugging.

Changes:

  • Log resourceOverwrites read from uipath.json at INFO during uipath run startup.
  • Log bindings.json contents and the Studio API binding-overwrites response at INFO during uipath debug.
  • Bump uipath package version to 2.10.71 and update uv.lock.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/uipath/src/uipath/_cli/_utils/_studio_project.py Adds INFO logging for bindings.json content and Studio overwrite response prior to parsing.
packages/uipath/src/uipath/_cli/_utils/_common.py Adds INFO logging of file-based resourceOverwrites and promotes missing-file log from DEBUG to INFO.
packages/uipath/pyproject.toml Version bump to 2.10.71.
packages/uipath/uv.lock Lock metadata/version update corresponding to the release bump.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

logger.info(
"Resource bindings (%s):\n%s",
UiPathConfig.bindings_file_path,
file_content.decode(),

@radu-mocanu radu-mocanu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please add some tests

cotovanu-cristian and others added 2 commits May 25, 2026 15:39
Add unit tests for the diagnostic logging added in cf928e4:
read_resource_overwrites_from_file (raw overwrites, missing config,
malformed JSON, unrecognized keys) and StudioClient.get_resource_overwrites
(missing bindings file, bindings + received payload logging, parsing,
tenant id header forwarding).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When CLI tests run first in the session, `setup_logging` sets
`propagate = False` on the `uipath` logger (and intermediate loggers in
the chain end up the same way via other test setups), so pytest's
`caplog` — whose handler lives on root — silently captured nothing.
Attach `caplog.handler` directly to the specific module loggers under
test for the duration of each test, and restore prior state on teardown.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@cotovanu-cristian cotovanu-cristian merged commit 3ff1078 into main May 25, 2026
161 checks passed
@cotovanu-cristian cotovanu-cristian deleted the feat/increase-bindings-logging branch May 25, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants