Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WX-1566 Special Docker build for debugging #7417

Merged
merged 10 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/chart_update_on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
run: |
set -e
cd cromwell
sbt -Dproject.isSnapshot=false -Dproject.isRelease=false dockerBuildAndPush
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously we needed both options to get a Standard build, it was a real head-scratcher to figure out. I'm still claiming the interface is unchanged because it's backwards compatible 😄

sbt -Dproject.isSnapshot=false dockerBuildAndPush
- name: Deploy to dev and board release train (Cromwell)
uses: broadinstitute/repository-dispatch@master
with:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/docker_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@ jobs:
run: |
set -e
cd cromwell
sbt -Dproject.isSnapshot=false -Dproject.isRelease=false docker
sbt -Dproject.isSnapshot=false docker
# Rarely used but we really want it always working for emergencies
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding this!

- name: Build Cromwell Debug Docker
run: |
set -e
cd cromwell
sbt -Dproject.isDebug=true docker
1 change: 0 additions & 1 deletion .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
project:
- cromiam
- cromwell-drs-localizer
- perf
- server
- womtool

Expand Down
6 changes: 0 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -387,11 +387,6 @@ lazy val `cloud-nio-impl-drs` = (project in cloudNio / "cloud-nio-impl-drs")
.dependsOn(common)
.dependsOn(common % "test->test")

lazy val perf = project
.withExecutableSettings("perf", dependencies = perfDependencies, pushDocker = false)
.dependsOn(common)
.dependsOn(common % "test->test")
Comment on lines -390 to -393
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This project has been unused for a few years but was still diligently building its Docker image every time I did a global sbt docker.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

best way to optimize build times


lazy val `cromwell-drs-localizer` = project
.withExecutableSettings("cromwell-drs-localizer", drsLocalizerDependencies, drsLocalizerSettings)
.dependsOn(`cloud-nio-impl-drs`)
Expand Down Expand Up @@ -453,7 +448,6 @@ lazy val root = (project in file("."))
.aggregate(googleBatch)
.aggregate(httpFileSystem)
.aggregate(languageFactoryCore)
.aggregate(perf)
.aggregate(server)
.aggregate(services)
.aggregate(sfsBackend)
Expand Down
23 changes: 8 additions & 15 deletions docs/developers/Building.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ features or fixes, the following are required to build Cromwell from source:
* [AdoptOpenJDK 11 HotSpot](https://adoptopenjdk.net/)
* [Git](https://git-scm.com/)

You can also use the [development image](https://github.com/broadinstitute/cromwell/tree/develop/scripts/docker-develop), and build a development container to work inside:

```bash
$ docker build -t cromwell-dev .
$ docker run -it cromwell-dev bash
```

Comment on lines -11 to -17
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not heard of anyone using this in many years

First start by cloning the Cromwell repository from GitHub:

```bash
Expand All @@ -35,15 +28,15 @@ Finally build the Cromwell jar:
$ sbt assembly
```

NOTE: This command will run for a long time the first time.
NOTE: Compiling will not succeed on directories encrypted with ecryptfs (ubuntu encrypted home dirs for example), due to long file paths.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This encryption package has been removed from modern Ubuntu


`sbt assembly` will build the runnable Cromwell JAR in `server/target/scala-2.13/` with a name like `cromwell-<VERSION>.jar`. It will also build a runnable Womtool JAR in `womtool/target/scala-2.13/` with a name like `womtool-<VERSION>.jar`.

To build a [Docker](https://www.docker.com/) image, run:
## Docker

```bash
$ sbt server/docker
```
The following Docker build configurations are supported. Most users will want Snapshot, resulting in an image like `broadinstitute/cromwell:<VERSION>-SNAP`.

This will build and tag a Docker image with a name like `broadinstitute/cromwell:<VERSION>-SNAP`.
| Command | Build Type | Debug Tools | Description |
|------------------------------------------------|------------|-------------|--------------------------------------|
| `sbt server/docker` | Snapshot | No | Most common local build |
| `sbt -Dproject.isDebug=true server/docker` | Debug | Yes | Local build with debugging/profiling |
| `sbt -Dproject.isSnapshot=false server/docker` | Standard | No | Reserved for CI: commit on `develop` |
| `sbt -Dproject.isRelease=true server/docker` | Release | No | Reserved for CI: numbered release |
29 changes: 0 additions & 29 deletions perf/src/main/resources/logback.xml

This file was deleted.

90 changes: 0 additions & 90 deletions perf/src/main/scala/cromwell/perf/Call.scala

This file was deleted.

153 changes: 0 additions & 153 deletions perf/src/main/scala/cromwell/perf/CompareMetadata.scala

This file was deleted.

Loading
Loading