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

Fix code format and missing dep on "writing a dev service" page #45703

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ibethus
Copy link

@ibethus ibethus commented Jan 19, 2025

  • Fix code formatting in code blocks
  • Add a section about the required dependency for writing a dev service

Any comment is welcome 😃

This comment was marked as resolved.

Copy link

github-actions bot commented Jan 19, 2025

🎊 PR Preview 9104473 has been successfully built and deployed to https://quarkus-pr-main-45703-preview.surge.sh/version/main/guides/

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

This comment has been minimized.

@ibethus ibethus force-pushed the fix-doc-writing-dev-service branch 2 times, most recently from 6102ddc to b455c92 Compare January 19, 2025 16:36
* Fix code formating in code blocks
* Add a section about the required dependency for writing a dev service
@ibethus ibethus force-pushed the fix-doc-writing-dev-service branch from b455c92 to e8728fe Compare January 19, 2025 16:51
@ibethus ibethus changed the title doc : fix code format and missing dep on "writing a dev service" page Fix code format and missing dep on "writing a dev service" page Jan 19, 2025
Copy link

quarkus-bot bot commented Jan 19, 2025

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit e8728fe.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

@geoand geoand requested a review from holly-cummins January 20, 2025 08:42
Copy link
Contributor

@holly-cummins holly-cummins left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Thanks for this. I added a few suggestions. The first one for sure requires a fix.

@@ -5,118 +5,149 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
////
[id="extension-writing-dev-service"]
= Writing a Dev Service

Copy link
Member

Choose a reason for hiding this comment

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

Please don't do that, I know it's not pretty but you can't have nice new lines or these attributes won't be considered document attributes.

Copy link
Author

Choose a reason for hiding this comment

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

Suggested change

If your extension provides APIs for connecting to an external service, it's a good idea to provide a xref:dev-services.adoc[Dev Service] implementation.
If your extension provides APIs for connecting to an external service, it's a good idea to provide a dev service implementation.

First, you must add the following dependency to your build file :
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to be more precise here. It has to be added to the build part of the deployment module.

Copy link
Author

Choose a reason for hiding this comment

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

Suggested change
First, you must add the following dependency to your build file :
First, you must add the following dependency to the build file, in your xref:writing-extensions.adoc#project-setup[deployement] module :

Comment on lines -30 to -36
@BuildStep(onlyIfNot = IsNormal.class, onlyIf = GlobalDevServicesConfig.Enabled.class)
public DevServicesResultBuildItem createContainer() {
DockerImageName dockerImageName = DockerImageName.parse("hello-world");
GenericContainer container = new GenericContainer<>(dockerImageName)
.withExposedPorts(SERVICE_PORT, OTHER_SERVICE_PORT)
.waitingFor(Wait.forLogMessage(".*" + "Started" + ".*", 1))
.withReuse(true);
Copy link
Member

Choose a reason for hiding this comment

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

I think it was done this way to be clear it was a method of a class.

I'm not sure what's best really so I'm not asking you to change it, just stating the why.

Comment on lines -80 to +109
.waitingFor(Wait.forLogMessage(".*" + "Started" + ".*", 1))
.waitingFor(Wait.forLogMessage(".*Started.*", 1))
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should cite the whole constructor call instead so that's it's extra clear? With this on a new line. WDYT?

Copy link
Author

Choose a reason for hiding this comment

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

What about just reusing the containervariable we defined earlier ?
Something like container.waitingFor(Wait.forLogMessage(".*Started.*", 1)); for instance ?

I would also change the withReuse() example accordingly.

Comment on lines -113 to +145
.withReuse(true)
.withReuse(true)
Copy link
Member

Choose a reason for hiding this comment

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

Here I would also add a bit more context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code format broken on page "Writing a Dev Service"
3 participants