ArmoniK.TaskReRunner 0.1.0-SNAPSHOT.116.b04e6af

This is a prerelease version of ArmoniK.TaskReRunner.
dotnet tool install --global ArmoniK.TaskReRunner --version 0.1.0-SNAPSHOT.116.b04e6af                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local ArmoniK.TaskReRunner --version 0.1.0-SNAPSHOT.116.b04e6af                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=ArmoniK.TaskReRunner&version=0.1.0-SNAPSHOT.116.b04e6af&prerelease                
nuke :add-package ArmoniK.TaskReRunner --version 0.1.0-SNAPSHOT.116.b04e6af                

Armonik.TaskReRunner

This project is part of the ArmoniK project. Armonik.Task.ReRunner is designed to simplify debugging by allowing users to rerun previously submitted and processed tasks. By providing services to select and re-execute individual tasks, it helps users identify and fix issues, streamlining the overall debugging process.

You can use your favorite IDE debugger on you worker with the ArmoniK.TaskReRunner.

Key Features

  • Rerun Individual Tasks: Select and rerun individual ArmoniK tasks by providing their task IDs.

  • Logging and Monitoring: Detailed logs and monitoring for each rerun operation to ensure debugging and transparency.

Installation

  • Clone the repository and move into it.

    git clone git@github.com:aneoconsulting/ArmoniK.TaskReRunner.git
    cd ArmoniK.TaskReRunner
    

Prerequisites

To run the program, you need:

  • To have a task that you want to rerun with its TaskId.
  • To have a worker which failed.
  • To extract the data from the task you want to rerun in the correct JSON format.

N.B.: You don't need ArmoniK to rerun a task, but you can't rerun a task without having already run it through ArmoniK.

Obtain Data in Json

Use the TaskDumper to extract Data from ArmoniK.

Run the TaskDumper program with your ArmoniK running.

  • With the cloned repository :
dotnet run --project src/TaskDumper --endpoint <YOUR_ENDPOINT> --taskId <TASK_ID>

Replace <YOUR_ENDPOINT> with your control_plane_url.

Replace <TASK_ID> with TaskId of the task to retrieve.

Flags

  • --endpoint: Endpoint for the connection to ArmoniK control plane.
  • --taskId: TaskId of the task to retrieve.
  • --dataFolder: Absolute path to the folder that will contain the binary data required to rerun the task.

Default Flag Values

  • --endpoint: "http://localhost:5001".
  • --taskId: "none".
  • --dataFolder: The current directory + "ak_dumper_" + taskId. Example : " /mnt/c/Users/ereali/source/repos/ak_dumper_2bc1bd28-9082-45fd-9390-ac713682e038".

Debug Without Extracting Directly from ArmoniK

Create Your Own JSON

You can create a JSON yourself.

Here is a minimalist JSON with only the necessary variables for the HelloWorld Sample Example:

{
    "sessionId": "",
    "payloadId": "2bc1bd28-9082-45fd-9390-ac713682e038",
    "taskId": "",
    "taskOptions": {},
    "dataDependencies": [],
    "expectedOutputKeys": [
        "8cdc1510-2240-488e-bd5f-4df0969ef5e9"
    ],
    "dataFolder": "/mnt/c/Users/ereali/source/repos/ak_dumper_2bc1bd28-9082-45fd-9390-ac713682e038/Results",
    "configuration": {}
}

Put the values in files

  • The payload data needs to be in a file named after the <PAYLOAD_ID>. This <PAYLOAD_ID> will be put in the PayloadId section of your JSON.
  • The data dependencies need to be in files named after each <DATADEPENDENCIE_ID>. These <DATADEPENDENCIE_ID> will be put in the DataDependencies section of your JSON.

Create these files in the same folder and set its path in the dataFolder field of the JSON file.

Tree Example :

ak_dumper_2bc1bd28-9082-45fd-9390-ac713682e038
├── Results
    ├── PAYLOAD_ID
    └── DATADEPENDENCIE_ID

Start Your Worker

Create a directory with write access fot sockets.

mkdir /tmp/sockets
chmod 777 /tmp/sockets

Linux with the sockets path ComputePlane__WorkerChannel__Address=/tmp/sockets/worker.sock and ComputePlane__AgentChannel__Address=/tmp/sockets/agent.sock.

Here is a command line example to run a C# worker with the correct sockets:

ComputePlane__WorkerChannel__Address=/tmp/sockets/worker.sock \
ComputePlane__AgentChannel__Address=/tmp/sockets/agent.sock \
dotnet run --project <PATH_TO_PROJECT.CSPROJ>

Replace <PATH_TO_PROJECT.CSPROJ> with the path to your .csproj file.

Docker Htcmock through docker:

docker run --rm -d --name htcmock -u $(id -u) \
-e ComputePlane__WorkerChannel__Address=/cache/worker.sock \
-e ComputePlane__AgentChannel__Address=/cache/agent.sock \
-v /tmp/sockets:/cache -v <PATH_TO_BINARIES>:<PATH_TO_BINARIES> \
dockerhubaneo/armonik_core_htcmock_test_worker:<ARMONIK_VERSION_CORE>

Replace <PATH_TO_BINARIES> with the path to the extracted binary files.

Replace <ARMONIK_VERSION> with the current core version.

Usage

Rerun a Single Task

To rerun a single task, use the dotnet run command and provide the path of the JSON file containing task data as an argument:

dotnet run --path <DATA.JSON> --project src/TaskReRunner/

Replace <DATA.JSON> with the path to your JSON file.

Replace <PATH_TO_FOLDER> with the absolute path to your folder containing PayloadId and DataDependencies files.

Flags

  • --path: Path to the JSON file containing the data needed to rerun the task.
  • --force: Allow the previous output deletion.

Default Flag Values

  • --path: "task.json".
  • --force: false.

You can recover your results in <CURRRENT_DIRECTORY>/ak_dumper_<TASK_ID> or it will be printed on your console as: Notified result0 Data: <DATA_IN_BYTE>.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
0.1.0-SNAPSHOT.116.b04e6af 44 10/17/2024
0.1.0-SNAPSHOT.114.535fbf1 63 9/18/2024
0.1.0-SNAPSHOT.108.7086acb 51 8/28/2024
0.1.0-SNAPSHOT.106.1458dcf 70 8/27/2024
0.1.0-SNAPSHOT.103.734a5bc 52 8/26/2024
0.1.0-SNAPSHOT.100.b24d216 68 8/23/2024
0.1.0-SNAPSHOT.78.6af41b7 72 8/13/2024
0.1.0-SNAPSHOT.74.9e1a9b9 68 8/13/2024
0.1.0-SNAPSHOT.72.2f4b2d1 57 8/9/2024
0.1.0-ertreestructureonread... 60 8/26/2024
0.1.0-ertesttaskrerunner.77... 76 8/13/2024
0.1.0-ertesttaskrerunner.74... 65 8/12/2024
0.1.0-ertesttaskrerunner.74... 66 8/12/2024
0.1.0-ertesttaskrerunner.74... 65 8/12/2024
0.1.0-ertesttaskrerunner.73... 66 8/9/2024
0.1.0-ertesttaskrerunner.73... 65 8/12/2024
0.1.0-ertesttaskdumper.73... 72 8/9/2024
0.1.0-erpublishnuget.110... 60 9/11/2024
0.1.0-erpublishnuget.69... 65 8/9/2024
0.1.0-ernewreadme.102.3dd5110 69 8/23/2024
0.1.0-ernewreadme.80.b1c6b2d 71 8/23/2024
0.1.0-ernewreadme.79.78a6797 73 8/14/2024
0.1.0-ernewreadme.73.dc9ac76 62 8/12/2024
0.1.0-ernewreadme.73.74949a9 67 8/9/2024
0.1.0-ermodifytreestructure... 64 8/26/2024
0.1.0-ermodifytreestructure... 56 8/26/2024
0.1.0-ermodifytreestructure... 55 8/26/2024
0.1.0-ermodifytreestructure... 56 8/26/2024
0.1.0-erintegrationtaskreru... 79 8/22/2024
0.1.0-erintegrationtaskreru... 75 8/22/2024
0.1.0-erintegrationtaskreru... 75 8/22/2024
0.1.0-erintegrationtaskreru... 75 8/22/2024
0.1.0-erintegrationtaskreru... 75 8/22/2024
0.1.0-erintegrationtaskreru... 78 8/22/2024
0.1.0-erintegrationtaskreru... 78 8/22/2024
0.1.0-erintegrationtaskreru... 68 8/22/2024
0.1.0-erintegrationtaskreru... 68 8/21/2024
0.1.0-erintegrationtaskreru... 72 8/21/2024
0.1.0-erintegrationtaskreru... 71 8/21/2024
0.1.0-erintegrationtaskreru... 81 8/21/2024
0.1.0-erintegrationtaskreru... 73 8/21/2024
0.1.0-erintegrationtaskreru... 71 8/21/2024
0.1.0-erintegrationtaskreru... 69 8/21/2024
0.1.0-erintegrationtaskreru... 74 8/21/2024
0.1.0-erintegrationtaskreru... 74 8/20/2024
0.1.0-erintegrationtaskreru... 70 8/20/2024
0.1.0-erintegrationtaskreru... 63 8/20/2024
0.1.0-erintegrationtaskreru... 64 8/20/2024
0.1.0-erintegrationtaskreru... 60 8/20/2024
0.1.0-erintegrationtaskreru... 64 8/20/2024
0.1.0-erintegrationtaskreru... 59 8/20/2024
0.1.0-erintegrationtaskreru... 57 8/20/2024
0.1.0-erintegrationtaskreru... 57 8/20/2024
0.1.0-erintegrationtaskreru... 61 8/20/2024
0.1.0-erintegrationtaskreru... 64 8/20/2024
0.1.0-erintegrationtaskreru... 80 8/19/2024
0.1.0-erealiremovefalurepre... 47 10/17/2024
0.1.0-ercreatejsonifarent... 35 1/3/2025
0.1.0-ercreatejsonifarent... 35 1/3/2025
0.1.0-ercreatejsonifarent... 33 1/3/2025
0.1.0-ercreatejsonifarent... 33 1/3/2025
0.1.0-ercreatejsonifarent... 32 1/3/2025
0.1.0-ercreatejsonifarent... 35 1/3/2025
0.1.0-ercreatejsonifarent... 36 1/3/2025
0.1.0-ercreatejsonifarent... 34 1/3/2025
0.1.0-ercreatejsonifarent... 30 1/3/2025
0.1.0-ercreatejsonifarent... 33 1/3/2025
0.1.0-ercompareoutputs.113... 56 9/12/2024
0.1.0-ercompareoutputs.113... 53 9/16/2024
0.1.0-ercompareoutputs.113... 56 9/12/2024
0.1.0-ercompareoutputs.113... 53 9/12/2024
0.1.0-ercompareoutputs.112... 65 9/11/2024
0.1.0-ercompareoutputs.112... 57 9/11/2024
0.1.0-ercompareoutputs.112... 53 9/12/2024
0.1.0-ercompareoutputs.111... 54 9/10/2024
0.1.0-ercompareoutputs.111... 59 9/11/2024
0.1.0-ercompareoutputs.111... 59 9/11/2024
0.1.0-ercompareoutputs.111... 56 9/11/2024
0.1.0-ercompareoutputs.111... 63 9/11/2024
0.1.0-ercompareoutputs.110... 50 9/2/2024
0.1.0-ercompareoutputs.110... 54 9/3/2024
0.1.0-ercompareoutputs.110... 49 9/2/2024
0.1.0-ercompareoutputs.109... 50 9/2/2024
0.1.0-ercitaskdumper.73... 66 8/12/2024
0.1.0-eraddoutputtoreadme... 59 9/18/2024
0.1.0-eraddoutputtoreadme... 57 9/18/2024