Skip to content

Miscellaneous

Blair L Murri edited this page Jul 12, 2023 · 3 revisions

Abridged Anatomy of the Repo

The Tes project contains the object model derived directly from the original Tes API, along with the "repository" used to store them in the database.

The TesApi.Web project has the following structure:

  • The Controllers and ContractResolvers folders contain the actual implementation of the API linked above.
  • Management contains the code that splits out the azure management plane operations from everything else, and thus includes the Terra-specific implementations.
  • Most everything else is outside of any folders. For example, AzureProxy.cs has most of the calls into Azure, and BatchScheduler.cs (with its friends BatchScheduler.BatchPool.cs and BatchPool.cs) contain almost all the logic that deals with using Azure Batch to actually run the executors on our behalf for each and every TesTask. The rest end up being ancillary to the work done in these few files.

The TesApi.Tests project has unit and integration tests covering both Tes and TesApi.Web projects.

Debugging TesApi.Web

There are a couple manual build steps you need to take before you try to debug the TesApi.Web project, in order to stage the Node Task Runner where TES can find it.

  1. From the command line (dotnet) build the PublishTesRunnerToTesApiArtifacts project (note that project is not included in the solution file because that breaks several parts of the build).
  2. Copy the files tRunner and TRunnerMD5Hash.txt from the TesApi.Web's publish output folder's scripts folder (i.e. bin\$(Configuration\net7.0\publish\scripts)) to the TesApi.Web's build output folder's scripts folder (i.e. bin\$(Configuration\net7.0\scripts).

Repeat both steps if you make any changes to Tes.RunnerCLI or any of its dependencies.