Functions deploy: shipped package-lock.json pins the developer's registry, blocking private-registry environments
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 610
- Forks
- 62
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 3
Description
What happened?
rayfin functions init + rayfin up package rayfin/functions/ as a source-only zip (node_modules/ and dist/ excluded) and upload it to /__private/functions/deploy, where the build host runs its own npm install. The zip includes package-lock.json.
That lockfile is generated on the developer's machine, so every resolved URL points at whatever registry that developer installs from. In an enterprise environment where npm is proxied through a private registry (JFrog Artifactory in our case), all 31 entries resolve to https://<company>.jfrog.io/artifactory/api/npm/<repo>/... — a host the Fabric build host presumably has neither a route to nor credentials for.
To be upfront: I stopped before deploying rather than risk it, so I have not observed the remote failure. I would like to confirm whether this is the expected outcome and what the intended path is, rather than guess and build a workaround you may be about to obsolete.
Two things make this higher-stakes than a normal packaging wrinkle:
- A functions-deploy failure rethrows and fails the whole
rayfin up. So turning functions on couples an otherwise-healthy app deploy to this, which makes it hard to trial incrementally on a real app. @microsoft/fabric-user-data-functionsis declared as"experimental"— a floating dist-tag. It moved from1.35.0-alpha.1412to1.35.0-alpha.1541within a single working session. If the remote build runsnpm install, the shipped lockfile pin isn't authoritative; if it runsnpm ci, then an unpublished alpha would break previously-working deploys retroactively.
Questions
- What is the intended flow for private or proxied registries? Options I considered, none documented: rewriting
resolvedhosts at package time; a supported--registry/.npmrcpassthrough for the remote build; or vendoring tarballs as relativefile:./*.tgzdependencies. The packager's own validator hints at the last one (external-file-dep, and the message "Local packages must use relativefile:./*.tgzpaths") — is that route supported, and does it extend to transitive dependencies? - Does the remote build run
npm ciornpm install? The fact that a lockfile is generated when absent ("No package-lock.json on disk — generating one from package.json for deploy") suggestsci, but it isn't stated anywhere I could find. - Does the functions host permit arbitrary outbound HTTPS? There is no mail-capable
AudienceType, so a "notify by email" function has to call an external HTTP endpoint (a Power Automate trigger, for example). The bundledrayfin-functionsagent skill documentsfetchagainst OneLake with an OBO token, but that doesn't settle whether general egress is allowed. Documenting this either way would save people guessing.
Steps to reproduce
- Configure npm to install through a private registry (e.g.
npm config set registry https://<company>.jfrog.io/artifactory/api/npm/<repo>/). - In an existing Rayfin app:
npx rayfin functions init. - Inspect
rayfin/functions/package-lock.json— everyresolvedURL points at the private registry, notregistry.npmjs.org. - Set
services.functions.enabled: trueand runnpx rayfin up. The zip uploaded to the build host carries that lockfile.
Environment
- Rayfin CLI: 1.34.0
@microsoft/fabric-user-data-functions:experimental→ resolved to 1.35.0-alpha.1541- Node: 24.x
- OS: Windows 11
- npm proxied through a private registry (JFrog Artifactory)
Notes
Happy to test any suggested approach and report back — we have a scaffolded functions project ready and a concrete use case (invoke from the app, read a selected record, notify the signed-in user). The packages themselves resolve fine through our proxy; it is only the lockfile shipped to the remote build host that is the problem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the package produced by npx rayfin functions init at rayfin/functions/package-lock.json, then reproduce the private-registry setup and inspect the zip uploaded by npx rayfin up. Done means establishing how the remote build handles the lockfile, registry access, and outbound HTTPS, then documenting or implementing the supported deployment path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- build-system, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100