hcengineering / hcengineering/platform

hardcoreeng/import-tool:latest Docker image is outdated and broken against huly.app

Open
#10,621 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
27.7k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

## Summary

The published `hardcoreeng/import-tool:latest` Docker image is incompatible with the current Huly cloud (`huly.app`). The **source code in the repo is already correct**, but the Docker image was never rebuilt after the account API was refactored.

## Steps to Reproduce

Follow the documented import command:

```bash
docker run \
-e FRONT_URL="https://huly.app" \
-v /path/to/export:/data \
hardcoreeng/import-tool:latest \
-- bundle.js import-clickup-tasks /data/tasks.csv \
--user your.email@company.com \
--password yourpassword \
--workspace your-workspace-id
```

**Result:** `Login failed for user: your.email@company.com`

## Root Cause

The Docker image bundle was built before the account API was refactored. There are **6 incompatibilities** between the bundle and the current server API:

| # | Location in bundle | Old (broken) | New (correct, already in source) |
|---|---|---|---|
| 1 | `login2()` params | `params: [user, password, workspace]` | `params: { email, password }` |
| 2 | `login2()` return | returns only `token` | must return full result `{ token, socialId, account }` |
| 3 | `getUserWorkspaces` result field | `ws.workspaceUrl` | `ws.url` |
| 4 | `selectWorkspace()` call | passes `workspaces[0].workspace` (UUID) | must pass `workspaces[0].url` (workspace URL string) |
| 5 | `selectWorkspace()` params | `params: [workspace, "external"]` | `params: { workspaceUrl, kind }` |
| 6 | Account identity | `connection.getModel().getAccountByEmail()` + `PersonAccount` class | `socialId` from login response (`TxOperations(connection, socialId)`) |

The current `dev/import-tool/src/index.ts` already has all these fixed correctly — the Docker image just hasn't been rebuilt.

## Expected Behavior

The import tool Docker image should successfully authenticate, find the workspace, and import data.

## Workaround

The image can be patched at runtime by extracting the bundle and applying fixes manually, but this is not a reasonable ask for end users.

## Fix Required

**Rebuild and republish `hardcoreeng/import-tool:latest`** from the current source. The source code needs no changes.

It would also help to publish versioned tags (e.g. `hardcoreeng/import-tool:0.7.382`) so users can pin to a version that matches their workspace.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.