Skip to content

Add nodes for Perforce P4#39

Merged
sebastianrath merged 10 commits intomainfrom
p4
Apr 10, 2026
Merged

Add nodes for Perforce P4#39
sebastianrath merged 10 commits intomainfrom
p4

Conversation

@sebastianrath
Copy link
Copy Markdown
Member

This PR adds Perforce nodesx.

Four new nodes (p4-credentials, p4-sync, p4-print, p4-run) let workflows interact with Perforce servers, backed by a shared helper using p4go (behind the p4 build tag). The agent now passes P4CLIENT and BUILD_REF into the subprocess environment so graph nodes reuse the checked-out workspace.

On the agent side, UUID management switches from a single shared file to numbered slot locking (flock/LockFileEx), so multiple agents on the same machine get stable, non-colliding identities. A new --labels flag lets agents advertise themselves for server-side job routing.

Includes an e2e test that runs p4 files against the public demo server

- Add P4Client field to CheckoutResult so the worker can pass the
  workspace name to graph execution
- Set P4CLIENT and BUILD_REF in the subprocess env
- Add CredentialTypeP4 to core credential types
All nodes use the p4go library (requires -tags p4 build flag).
Credentials are resolved from node inputs with fallback to P4PORT,
P4USER, P4PASSWD, P4TRUST, P4CLIENT environment variables.
SSL trust is handled automatically via p4go before each operation.
The worker must run in the workspace root so p4 sync in graph nodes
can resolve paths correctly. Without Persistent: true, the worker
copies the script to a separate work/ dir and deletes the checkout.
@sebastianrath sebastianrath changed the title P4 Nodes Add nodes for Perforce P4 Apr 9, 2026
- Add --labels CLI flag for agent runtime label declaration
- Send labels in heartbeat for server-side seeding
- Cap slot acquisition at 256 with ephemeral UUID fallback
- Fix p4_connect.act type from 'orchestrator' to 'generic'
Each agent process acquires a unique file-locked slot with a persistent
UUID. The client sends X-Agent-UUID on all runner API calls so the
server can distinguish multiple instances sharing the same token.
@sebastianrath sebastianrath merged commit 071b288 into main Apr 10, 2026
10 checks passed
@sebastianrath sebastianrath deleted the p4 branch April 10, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant