Skip to content

uipath init: every run writes new uniqueId values to entry-points.json, so an unchanged entry point gets a new identity #2011

Open

Description

@danmunteanu1

Short version: Each uipath init (uip codedagent init, uip function init) generates a fresh uuid4 for every entry point, so a second run on an unchanged project changes entry-points.json. The id is copied into the solution's process resource spec (entryPointUniqueId) by uip solution resources refresh and by pack, so each run also rewrites the solution's resource file. init should keep the id of an entry point that already exists in entry-points.json.

Evidence

  1. Versions: uipath 2.15.5, uipath-langchain as installed with it, uip 1.208.0-dev.10025.
  2. A Python function project (uip function new -l py, uip function init), then uip function init again. The only change in entry-points.json:
    7c7
    <             "uniqueId": "770cf74d-b7b5-4ff2-a895-b5423da0a9d3",
    ---
    >             "uniqueId": "22bb2a47-93f5-4ad1-b524-b0d7f99ab8f4",
    
  3. A LangGraph agent, uip codedagent init twice: the same one-line change (output/entry-points-diff.txt). bindings.json is byte-identical between the runs and holds no entry-point id.
  4. In a solution, uip solution resources refresh writes the id into resources/solution_folder/process/function/<project>.json as spec.entryPointUniqueId (and inside the embedded entryPoints string). After a further init that file differs from the project; the next refresh reports ReconciledSpecs: 1 and rewrites it. uip solution pack refreshes the resource files first, so a package carries the new id: every init changes the entry point's identity in the project and in the solution, with no change to the code.

Code path

  • UiPath/uipath-python packages/uipath/src/uipath/_cli/cli_init.py:184-209 (bbd3f2b), write_entry_points_file: dumps the schemas the runtime factory returned, with no read of the existing file.
  • uipath/functions/runtime.py:289 and uipath_langchain/runtime/runtime.py:326: uniqueId=str(uuid.uuid4()) on every schema build.

Fix

  • In write_entry_points_file, read the existing entry-points.json and reuse the uniqueId of the entry point with the same filePath; this covers every framework in one place.
  • Or derive the id deterministically from the project id and the entry point's file path.
Repro files

output/entry-points-diff.txt

7c7
<             "uniqueId": "44df3feb-f2e2-48ab-8b06-11d31b49a8ce",
---
>             "uniqueId": "aa3d8311-ebb0-40d8-a711-78183b438b82",

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions