You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "treblereel (via GitHub)" <gi...@apache.org> on 2024/03/26 08:37:10 UTC

[PR] restore of e2e tests in kn workflow cli [incubator-kie-tools]

treblereel opened a new pull request, #2209:
URL: https://github.com/apache/incubator-kie-tools/pull/2209

   #2208 
   
   Since I couldn't find a way to pass the repository url to maven, the best solution is probably to add the repository declaration to the generated pom.xml.
   
   Are there any better ideas?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#1053: restore of e2e tests in kn workflow cli [incubator-kie-tools]

Posted by "tomasdavidorg (via GitHub)" <gi...@apache.org>.
tomasdavidorg commented on code in PR #2209:
URL: https://github.com/apache/incubator-kie-tools/pull/2209#discussion_r1559245494


##########
packages/kn-plugin-workflow/e2e-tests/helper_test.go:
##########
@@ -172,3 +172,46 @@ func CleanUpAndChdirTemp(t *testing.T) {
 		os.Exit(1)
 	}
 }
+
+func AddSnapshotRepositoryDeclarationToPom(t *testing.T, projectDir string) {
+	VerifyFilesExist(t, projectDir, []string{"pom.xml"})
+	pomFilePath := filepath.Join(projectDir, "pom.xml")
+
+	file, err := os.Open(pomFilePath)
+	require.NoErrorf(t, err, "Expected nil error, got: %v", err)
+	defer file.Close()

Review Comment:
   This defers the calling of the `file.Close()` at the end of this function but we rewrite the `pom.xml` file before the end. I think this might cause some issues.



##########
packages/kn-plugin-workflow/e2e-tests/helper_test.go:
##########
@@ -39,7 +39,7 @@ import (
 
 // ExecuteCommand executes a command with the given arguments and returns an error if the command fails.
 func ExecuteCommand(command string, args ...string) error {
-	cmd := exec.Command(command, args...)
+	cmd := exec.Command("MAVEN_ARGS=\"-B\""+command, args...)

Review Comment:
   For `mvn` as `command` and `clean`, `install` as `args...`, this will create command:
    ```
   MAVEN_ARGS="-B"mvn clean install
   ```
   so I think this should not work.
   
   Also the `ExecuteCommand` function is not used for maven execution, see https://github.com/apache/incubator-kie-tools/blob/main/packages/kn-plugin-workflow/e2e-tests/main_test.go#L180



##########
packages/kn-plugin-workflow/pkg/command/quarkus/build.go:
##########
@@ -232,7 +232,7 @@ func runBuildImage(cfg BuildCmdConfig) (out string, err error) {
 	builderConfig := getBuilderConfig(cfg)
 	executableName := getExecutableNameConfig(cfg)
 
-	build := common.ExecCommand("mvn", "package",
+	build := common.ExecCommand("mvn", "-B","package",

Review Comment:
   ```suggestion
   	build := common.ExecCommand("mvn", "-B", "package",
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#2208: restore of e2e tests in kn workflow cli [incubator-kie-tools]

Posted by "treblereel (via GitHub)" <gi...@apache.org>.
treblereel commented on PR #2209:
URL: https://github.com/apache/incubator-kie-tools/pull/2209#issuecomment-2027899807

   Looks like the apache repo is very slow. Here is my download speed:
   
   ```
   Saving to: ‘kogito-quarkus-serverless-workflow-devui-deployment-999-20240218-20240218.073833-1.jar’
   
   kogito-quarkus-serverless-workflow-devui-depl 100%[=======================================================================>]  70.37M   401KB/s    in 2m 43s  
   ```
   I don't like it, but it seems we should increase the timeout
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#1053: restore of e2e tests in kn workflow cli [incubator-kie-tools]

Posted by "treblereel (via GitHub)" <gi...@apache.org>.
treblereel commented on PR #2209:
URL: https://github.com/apache/incubator-kie-tools/pull/2209#issuecomment-2040053627

   retest this please


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#1053: restore of e2e tests in kn workflow cli [incubator-kie-tools]

Posted by "tomasdavidorg (via GitHub)" <gi...@apache.org>.
tomasdavidorg commented on code in PR #2209:
URL: https://github.com/apache/incubator-kie-tools/pull/2209#discussion_r1560709593


##########
packages/kn-plugin-workflow/e2e-tests/helper_test.go:
##########
@@ -172,3 +172,45 @@ func CleanUpAndChdirTemp(t *testing.T) {
 		os.Exit(1)
 	}
 }
+
+func AddSnapshotRepositoryDeclarationToPom(t *testing.T, projectDir string) {
+	VerifyFilesExist(t, projectDir, []string{"pom.xml"})
+	pomFilePath := filepath.Join(projectDir, "pom.xml")
+
+	file, err := os.Open(pomFilePath)
+	require.NoErrorf(t, err, "Expected nil error, got: %v", err)
+
+	content, err := io.ReadAll(file)
+	require.NoErrorf(t, err, "Expected nil error, got: %v", err)
+

Review Comment:
   ```suggestion
   
   	err = file.Close()
   	require.NoErrorf(t, err, "Expected nil error, got: %v", err)
   	
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] restore of e2e tests in kn workflow cli [incubator-kie-tools]

Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento commented on PR #2209:
URL: https://github.com/apache/incubator-kie-tools/pull/2209#issuecomment-2020783631

   @treblereel I think listing the Apache repo is making the tests considerably slower. Please do list Maven Central as the first repo, and Apache snapshots in second. I guess this will speed things up a little bit. Also, might be worth running Maven with the `-B` flag on these tests not to pollute the build logs with the artifact download progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#1053: restore of e2e tests in kn workflow cli [incubator-kie-tools]

Posted by "treblereel (via GitHub)" <gi...@apache.org>.
treblereel commented on PR #2209:
URL: https://github.com/apache/incubator-kie-tools/pull/2209#issuecomment-2045748506

   Since the kogito dependencies are not available for version `999-20240331-SNAPSHOT`, I switched to Apache.
   
   For example:
   org.kie.kogito:kogito-quarkus-serverless-workflow-devui -> org.apache.kie.sonataflow:sonataflow-quarkus-devui
   
   I was planning to do this as a separate task, but this way it's even more convenient.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#1053: restore of e2e tests in kn workflow cli [incubator-kie-tools]

Posted by "treblereel (via GitHub)" <gi...@apache.org>.
treblereel commented on PR #2209:
URL: https://github.com/apache/incubator-kie-tools/pull/2209#issuecomment-2039203343

   atm `999-20240218-SNAPSHOT` is hardcoded, but it must be received from  index.js as env var. As i can see, this part in plugin was started but not finished, I'm going to fix it as separate commit.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#1053: restore of e2e tests in kn workflow cli [incubator-kie-tools]

Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento commented on PR #2209:
URL: https://github.com/apache/incubator-kie-tools/pull/2209#issuecomment-2052229450

   So we have #2237, but this PR passed, even with it. Are we not using the QUARKUS_VERSION env var?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#1053: restore of e2e tests in kn workflow cli [incubator-kie-tools]

Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento merged PR #2209:
URL: https://github.com/apache/incubator-kie-tools/pull/2209


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#1053: restore of e2e tests in kn workflow cli [incubator-kie-tools]

Posted by "treblereel (via GitHub)" <gi...@apache.org>.
treblereel commented on code in PR #2209:
URL: https://github.com/apache/incubator-kie-tools/pull/2209#discussion_r1560763947


##########
packages/kn-plugin-workflow/e2e-tests/helper_test.go:
##########
@@ -172,3 +172,45 @@ func CleanUpAndChdirTemp(t *testing.T) {
 		os.Exit(1)
 	}
 }
+
+func AddSnapshotRepositoryDeclarationToPom(t *testing.T, projectDir string) {
+	VerifyFilesExist(t, projectDir, []string{"pom.xml"})
+	pomFilePath := filepath.Join(projectDir, "pom.xml")
+
+	file, err := os.Open(pomFilePath)
+	require.NoErrorf(t, err, "Expected nil error, got: %v", err)
+
+	content, err := io.ReadAll(file)
+	require.NoErrorf(t, err, "Expected nil error, got: %v", err)
+

Review Comment:
   @tomasdavidorg updated



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#1053: restore of e2e tests in kn workflow cli [incubator-kie-tools]

Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento commented on PR #2209:
URL: https://github.com/apache/incubator-kie-tools/pull/2209#issuecomment-2052236336

   Ok, so I think what happens is:
   1. The typo was only on Windows scripts.
   2. The build succeedded, but running the binaries on Windows would be broken, as QuarkusVersion would be `nil`.
   3. Since we don't run E2E tests on Windows, we this PR didn't catch it!
   
   Other than enabling the E2E tests on Windows, I'm not sure how we could've caught this. I found it by chance in logs.. Anyway, all good for now, despite the gap in correctness we have...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#1053: restore of e2e tests in kn workflow cli [incubator-kie-tools]

Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento commented on PR #2209:
URL: https://github.com/apache/incubator-kie-tools/pull/2209#issuecomment-2052611150

   @treblereel I'm afraid this is much more complicated, as we skip E2E tests for all packages on Windows. We could have `kn-plugin-workflow` ignore the flag that makes this skipping, but then it would hurt the consistency of not running E2E tests on Windows altogether... What are your thoughts?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#2208: restore of e2e tests in kn workflow cli [incubator-kie-tools]

Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento commented on PR #2209:
URL: https://github.com/apache/incubator-kie-tools/pull/2209#issuecomment-2028354522

   @treblereel What about pre-fetching the dependencies during the `install` script? We can create a pom.xml that contains the dependencies needed for testing and run a `mvn dependency:tree` to fetch everything.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#2208: restore of e2e tests in kn workflow cli [incubator-kie-tools]

Posted by "treblereel (via GitHub)" <gi...@apache.org>.
treblereel commented on PR #2209:
URL: https://github.com/apache/incubator-kie-tools/pull/2209#issuecomment-2028471751

   @tiagobento yeap, think the same way, maybe we can fetch jar in parallel (or make maven that). I'm investigation the possible options
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#1053: restore of e2e tests in kn workflow cli [incubator-kie-tools]

Posted by "treblereel (via GitHub)" <gi...@apache.org>.
treblereel commented on PR #2209:
URL: https://github.com/apache/incubator-kie-tools/pull/2209#issuecomment-2052280965

   > Ok, so I think what happens is:
   > 
   > 1. The typo was only on Windows scripts.
   > 2. The build succeedded, but running the binaries on Windows would be broken, as QuarkusVersion would be `nil`.
   > 3. Since we don't run E2E tests on Windows, we this PR didn't catch it!
   > 
   > Other than enabling the E2E tests on Windows, I'm not sure how we could've caught this. I found it by chance in logs.. Anyway, all good for now, despite the gap in correctness we have...
   
   Do we have an issue for this bug? If yes, I can take care of it


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org