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

KOGITO-10042: Migrate Dev UI Java module from kogito-apps to kie-tools #2167

Conversation

fantonangeli
Copy link
Contributor

@fantonangeli fantonangeli commented Feb 20, 2024

Jira: https://issues.redhat.com/browse/KOGITO-10042

Description:
The kogito-quarkus-serverless-workflow-devui-parent module should be migrated to apache/incubator-kie-tools while being renamed to sonataflow-serverless-workflow-devui. Its children modules can have the parent module name removed from its prefix, resulting in the deployment and runtime modules.

Important:

  • It seems not possible to remove the prefix from the sub-modules as the deployment module cannot find the runtime module during the quarkus execution, because quarkus composes the name in the way "{runtime}-deployment".
  • This PR already gets the commits from kie-issues#960: Upgrade kie-tools to Java 17, Maven 3.9.6, and Quarkus 3 #2182 to compile with Java 17, Maven 3.9.6, and Quarkus 3
  • This PR uses the new GAV org.apache.kie.sonataflow:sonataflow-serverless-workflow-devui

How to test:

    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>sonataflow-quarkus-devui</artifactId>
    </dependency>

with:

    <dependency>
      <groupId>org.apache.kie.sonataflow</groupId>
      <artifactId>sonataflow-quarkus-devui-extension</artifactId>
      <version>0.0.0</version>
    </dependency>

and add:

  <repositories>
    <repository>
      <!-- Duplicating the Maven Central repository here (as it is already coming from Super POM) makes the build much faster,
           as the Maven Central is now treated as the first (default) repository (because it is before the Apache Nexus one).
           Artifacts with release (fixed) versions are being downloaded primarily from there. Without the central being the
           first repository the Apache Nexus would be contacted first and since it is quite slow it slows down the build.
           We use Apache repo only to download our SNAPSHOTs. -->
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
      <layout>default</layout>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>apache-public-repository-group</id>
      <name>Apache Public Repository Group</name>
      <url>https://repository.apache.org/content/groups/public/</url>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
      </snapshots>
    </repository>
  </repositories>

Preview:
KOGITO-10042-devui.webm
KOGITO-10042-devui-v1.webm

@paulovmr
Copy link
Member

paulovmr commented Mar 8, 2024

Tested locally and it is working, great job @fantonangeli !

Just to confirm, we probably need @tiagobento or @rodrigonull input here (sorry if you talked about this already), what groupId should we use for these artifacts? Currently it is org.apache.kie.sonataflow.

@tiagobento
Copy link
Contributor

I guess @pefernan could help answer that...

@pefernan
Copy link
Contributor

pefernan commented Mar 8, 2024

It should be org.apache.kie.sonataflow. I already sent the prs to update the groupId in all sonataflow extensions, hopefully will be merged next week.

Make sure you also use it in the extension capability! take a look at my PR's.

@fantonangeli
Copy link
Contributor Author

Hi @paulovmr and @tiagobento , can we proceed with the reviews of this PR?

@paulovmr
Copy link
Member

Hi @fantonangeli , I sent one PR to your branch earlier, I think after that is merged, this LGTM

kie-issues#1009: Remove check for data index availability on legacy Quarkus Dev UI extensions
@fantonangeli
Copy link
Contributor Author

Thanks a lot @paulovmr, your PR is merged.

@paulovmr paulovmr removed the pr: DO NOT MERGE Draft PR, not ready for merging label Mar 15, 2024
Copy link
Contributor

@pefernan pefernan left a comment

Choose a reason for hiding this comment

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

@fantonangeli @paulovmr Added a few comments that, considering we'll upgrade to Quarkus 3.8, I'd fix before merging.

public class DevConsoleProcessor {

private static final String STATIC_RESOURCES_PATH = "dev-static/";
private static final String BASE_RELATIVE_URL = "/q/dev-v1/org.apache.kie.sonataflow.sonataflow-quarkus-devui-extension";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
private static final String BASE_RELATIVE_URL = "/q/dev-v1/org.apache.kie.sonataflow.sonataflow-quarkus-devui-extension";
private static final String BASE_RELATIVE_URL = "/q/dev-ui/org.apache.kie.sonataflow.sonataflow-quarkus-devui-extension";

private static final String BASE_RELATIVE_URL = "/q/dev-v1/org.apache.kie.sonataflow.sonataflow-quarkus-devui-extension";

@BuildStep(onlyIf = IsDevelopment.class)
public CardPageBuildItem pages(NonApplicationRootPathBuildItem nonApplicationRootPathBuildItem,
Copy link
Contributor

Choose a reason for hiding this comment

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

You may need to add the List<SystemPropertyBuildItem> as done here in order to get the data-index.url if it's not available in the configurationBuildItem


@BuildStep(onlyIf = IsDevelopment.class)
@Record(ExecutionTime.RUNTIME_INIT)
public void deployStaticResources(final DevConsoleRecorder recorder,
Copy link
Contributor

Choose a reason for hiding this comment

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

This DevConsoleRecorder will be removed in 3.8 LTS you may need to create one as apache/incubator-kie-kogito-apps@e7680b4#diff-ac1ccd3eb1c4080808ebca25bf08032999d51511479f4219801b1e46a1562293R32

under the License.

-->
<a href="{urlbase}/workflowInstances" class="badge badge-light">
Copy link
Contributor

Choose a reason for hiding this comment

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

Quarkus 3.8 completelly removes the DevUI v1, this isn't needed anymore

under the License.

-->
{#include main fluid=true} {#style} .main-container { margin: 0; padding: 0; } #envelope-app { width: 100vw; height:
Copy link
Contributor

Choose a reason for hiding this comment

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

Quarkus 3.8 completelly removes the DevUI v1, this isn't needed anymore

-->
{#include main fluid=true} {#style} .main-container { margin: 0; padding: 0; } #envelope-app { width: 100vw; height:
calc(100vh - 98px); } {/style} {#title}Runtime UI{/title} {#body}
<div id="envelope-app"></div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Quarkus 3.8 completelly removes the DevUI v1, this isn't needed anymore

@tomasdavidorg tomasdavidorg removed their assignment Mar 22, 2024
@paulovmr
Copy link
Member

Hi @pefernan , I'm working on those Quarkus 3.8 changes for a different PR that will go in after this is merged.

@pefernan
Copy link
Contributor

@paulovmr in this case just forget my comments :)

Copy link
Member

@paulovmr paulovmr left a comment

Choose a reason for hiding this comment

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

Could you please rename the package (just the directory name and name in package.json, not the pom.xml) from sonataflow-quarkus-devui-extension-parent to sonataflow-quarkus-devui-extension?

@fantonangeli
Copy link
Contributor Author

Could you please rename the package (just the directory name and name in package.json, not the pom.xml) from sonataflow-quarkus-devui-extension-parent to sonataflow-quarkus-devui-extension?

@paulovmr renamed, thank you

@tiagobento tiagobento merged commit 3daeaf2 into apache:main Mar 25, 2024
8 checks passed
paulovmr added a commit to kiegroup/kie-tools that referenced this pull request Mar 28, 2024
…tools (apache#2167)

Co-authored-by: Yeser Amer <[email protected]>
Co-authored-by: Thiago Lugli <[email protected]>
Co-authored-by: Paulo Martins <[email protected]>
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.

7 participants