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

Switch over developer prepareCompose workflow to jetty #2941

Merged
merged 3 commits into from
Oct 4, 2022

Conversation

devinrsmith
Copy link
Member

@devinrsmith devinrsmith commented Oct 3, 2022

Tested w/ ./gradlew prepareCompose; docker compose up -d

@devinrsmith devinrsmith force-pushed the developer-jetty-switch branch from e84c4ed to d462002 Compare October 3, 2022 19:32
Copy link
Member

@niloc132 niloc132 left a comment

Choose a reason for hiding this comment

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

Main feedback is that i think we might want to also rename/alias server to server-netty, and consider making server instead point to server-jetty (or leave it for one more version to avoid breaking anyone using deephaven/server and expecting netty). In theory there should be no difference, since the current server-jetty-app only does more than server-netty-app, but perhaps worth doing this work to be clear about the transition period?

@devinrsmith
Copy link
Member Author

The big noticable different is port 8080 vs port 10000.

@devinrsmith
Copy link
Member Author

Instead of disabling some and leaving others, it was easiest to rename all of the relevant server images w/ the -netty suffix.

Copy link
Member

@rcaudy rcaudy left a comment

Choose a reason for hiding this comment

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

At a cargo-cult review quality level, this seems fine. If I understand correctly, for now we're using jetty for local development and the most simple images we'll publish, and using netty for build/CI/complex images.

into context
}

def buildDockerClosure = { String base, String server ->
Copy link
Member

Choose a reason for hiding this comment

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

The netty build has:

// TODO(deephaven-core#1596): Remove extra dependencies for build-ci.yml
// Currently, GH build-ci.yml calls prepareDockerAll, and relies on buildx; so we need to
// make sure that dockerCreateDockerfile has the proper dependencies.
// If we change how our build works in the future (so that gradle is responsible for pushing the
// image), we can remove this extra dependency.
project.tasks.register('prepareDockerAll') {
    dependsOn prepareDocker, baseMap.keySet().collect { base -> Docker.registryTask(project, base) }
}

Why don't we need this, just because we're still using netty for CI?

Copy link
Member Author

Choose a reason for hiding this comment

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

This was mostly a copy-paste from the netty logic; I'm not sure if this specific block is still necessary since we don't have an CI artifacts for docker + jetty in deephaven-core.

There are non-trivial dependencies beyond for other build related things that depend on server-netty. For example, sphinx. I'm betting these will be "easy" to fix over to server-jetty; but it doesn't serve the purpose of the release IMO so I tried to limit the scope as much as possible.

Technically, there are a bunch of folder renaming that I didn't need to do - but I did anyways, just to keep things clearer w/ the universal -netty suffix.

The build logic in server-jetty is meant to serve local development purposes for ./gradlew prepareCompose; docker compose up -d workflows.

it.dependsOn project(':docker-server-slim').tasks.findByName('buildDocker-server-slim'),
project(':docker-server').tasks.findByName('buildDocker-server'),
project(':docker-web').tasks.findByName('buildDocker'),
project(':envoy').tasks.findByName('buildDocker'),
Copy link
Member

Choose a reason for hiding this comment

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

to confirm, CI will still build and publish these, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct.

@@ -45,7 +45,7 @@ public abstract class DeephavenInDockerExtension {
// irritating configuration order of operations to work out here, so just leaving
// these as constants until we decide they aren't any more
deephavenServerProject = ':docker-server'
serverTask = 'buildDocker-server'
Copy link
Member

Choose a reason for hiding this comment

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

we should switch over to jetty for this too, but happy to defer. sphinx also would be fine to move over, the fewer things leaning on netty the better.

i'll fill something to that effect.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed.

Copy link
Member

Choose a reason for hiding this comment

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

@devinrsmith devinrsmith requested a review from niloc132 October 4, 2022 13:56
@devinrsmith devinrsmith added the release blocker A bug/behavior that puts is below the "good enough" threshold to release. label Oct 4, 2022
@devinrsmith devinrsmith merged commit 24ea523 into deephaven:main Oct 4, 2022
@devinrsmith devinrsmith deleted the developer-jetty-switch branch October 4, 2022 14:28
@github-actions github-actions bot locked and limited conversation to collaborators Oct 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
docker DocumentationNeeded jetty release blocker A bug/behavior that puts is below the "good enough" threshold to release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants