You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "essobedo (via GitHub)" <gi...@apache.org> on 2023/02/01 12:19:28 UTC

[GitHub] [camel-k] essobedo opened a new pull request, #4021: Ref #3023: Add native compilation with sources

essobedo opened a new pull request, #4021:
URL: https://github.com/apache/camel-k/pull/4021

   <!-- Description -->
   
   **Release Note**
   ```release-note
   NONE
   ```
   


-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1419098767

   > Have you rebased it? it seems there was some failure I've fixed in #4022 
   
   Yes I rebased it already
   
   


-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1108898554


##########
.github/workflows/native.yml:
##########
@@ -0,0 +1,118 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: native
+
+env:
+  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+on:
+  pull_request:
+    branches:
+      - main
+      - "release-*"
+    paths-ignore:
+      - 'docs/**'
+      - 'proposals/**'
+      - '**.adoc'
+      - '**.md'
+      - 'KEYS'
+      - 'LICENSE'
+      - 'NOTICE'
+  push:
+    branches:
+      - main
+      - "release-*"
+    paths-ignore:
+      - 'docs/**'
+      - 'proposals/**'
+      - '**.adoc'
+      - '**.md'
+      - 'KEYS'
+      - 'LICENSE'
+      - 'NOTICE'
+  workflow_dispatch:
+    inputs:
+      log-level:
+        description: 'Set the operator log level (info or debug)'
+        required: false
+      pre-built-kamel-image:
+        description: 'Kamel image url for skipping building of kamel stages. Used for debugging'
+        required: false
+      skip-problematic:
+        description: 'Whether tests marked as problematic should be skipped - false by default (sets CAMEL_K_TEST_SKIP_PROBLEMATIC)'
+        required: false
+        default: false
+      test-filters:
+        description: |
+          Filter the tests in this test suite by assigning the test pattern to TEST_NATIVE_RUN,
+          eg. TEST_NATIVE_RUN=TestBasic will only run tests prefixed with 'TestBasic'
+        required: false
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+  cancel-in-progress: true
+
+jobs:
+  install-native-high-memory:

Review Comment:
   Initially, it was to be able to launch the "lightest" tests on a Linux runner but they still need more than what a Linux runner can offer. Now, it is still interesting as they are launched in parallel so it allows having a duration that is equivalent to the duration of `common / common-it` which also means that the overall duration of a full build is not really affected.



-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1095691238


##########
pkg/client/camel/applyconfiguration/camel/v1/buildertask.go:
##########
@@ -96,3 +97,16 @@ func (b *BuilderTaskApplyConfiguration) WithBuildDir(value string) *BuilderTaskA
 	b.BuildDir = &value
 	return b
 }
+
+// WithSources adds the given value to the Sources field in the declarative configuration
+// and returns the receiver, so that objects can be build by chaining "With" function invocations.
+// If called multiple times, values provided by each call will be appended to the Sources field.
+func (b *BuilderTaskApplyConfiguration) WithSources(values ...*SourceSpecApplyConfiguration) *BuilderTaskApplyConfiguration {
+	for i := range values {
+		if values[i] == nil {
+			panic("nil value passed to WithSources")

Review Comment:
   We have the same behavior in the [integration spec](https://github.com/apache/camel-k/blob/main/pkg/client/camel/applyconfiguration/camel/v1/integrationspec.go#L63), so in practice, it would fail before. So if it is an issue, IMHO, it should be addressed in a dedicated ticket, don't you agree? 



-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1422847031

   Depends on https://github.com/container-tools/kind-action/pull/11


-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1418679580

   Infortunatelly the native E2E test cannot pass on the GitHub CI because it requires more than 6 Go of RAM, so I need to remove 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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1108911693


##########
.github/workflows/native.yml:
##########
@@ -0,0 +1,118 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: native
+
+env:
+  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+on:

Review Comment:
   Ok, as you like but I did my best to avoid increasing the overall duration of a full build as explained in this comment https://github.com/apache/camel-k/pull/4021#discussion_r1108898554



-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1419101180

   I added some unit tests


-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1093348398


##########
pkg/builder/types.go:
##########
@@ -80,6 +80,7 @@ type builderContext struct {
 	Build             v1.BuilderTask
 	BaseImage         string
 	Namespace         string
+	Integration       string

Review Comment:
   You need to have the sources, but I am not sure where it does make sense to have them. The Build should probably know the entire project as a whole (including the sources, if required). That means that probably we need to split the generation of the project from the pure building in 2 separate concerns. Following this idea, once the project was generated (with source if it is a native build), the Build would takeover and proceed (natively or not). In any case, @astefanutti can give you some more detail as he had run some experiment when Joor dependency was not yet supported in native. Hopefully he can give some more concrete advice.



-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1095519595


##########
pkg/trait/trait_test.go:
##########
@@ -267,22 +267,23 @@ func TestConfigureVolumesAndMountsSources(t *testing.T) {
 				Sources: []v1.SourceSpec{
 					{
 						DataSpec: v1.DataSpec{
-							Name:       "source1.java",
+							Name:       "source1.xml",

Review Comment:
   Good catch, it is no more needed



-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1432769232

   Sounds good to be reviewed now, the build `native / install-native` only failed during the cleanup phase, the tests pass


-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1108899719


##########
e2e/support/test_support.go:
##########
@@ -93,10 +93,10 @@ const kubeConfigEnvVar = "KUBECONFIG"
 
 var TestTimeoutShort = 1 * time.Minute
 var TestTimeoutMedium = 5 * time.Minute
-var TestTimeoutLong = 10 * time.Minute
+var TestTimeoutLong = 15 * time.Minute
 
 // TestTimeoutVeryLong should be used only for testing native builds.
-var TestTimeoutVeryLong = 90 * time.Minute
+var TestTimeoutVeryLong = 60 * time.Minute

Review Comment:
   Hum, actually it is the opposite, I reduced the duration of the timeout by 30 minutes.



-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1419395648

   FYI, the build is not failing because of these changes since the same errors occur on a different PR


-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1095718347


##########
pkg/trait/quarkus.go:
##########
@@ -47,6 +47,57 @@ type quarkusTrait struct {
 	BaseTrait
 	traitv1.QuarkusTrait `property:",squash"`
 }
+type languageSettings struct {

Review Comment:
   It is addressed now, I also added the support of legacy camel catalog



-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1095905083


##########
pkg/trait/trait_test.go:
##########
@@ -403,10 +404,10 @@ func createTestEnv(t *testing.T, cluster v1.IntegrationPlatformCluster, script s
 				Sources: []v1.SourceSpec{
 					{
 						DataSpec: v1.DataSpec{
-							Name:    "file.groovy",
+							Name:    "file.js",

Review Comment:
   No more used either



-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1421335897

   Depends on https://github.com/container-tools/kind-action/pull/10


-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1095848494


##########
pkg/trait/trait_test.go:
##########
@@ -403,10 +404,10 @@ func createTestEnv(t *testing.T, cluster v1.IntegrationPlatformCluster, script s
 				Sources: []v1.SourceSpec{
 					{
 						DataSpec: v1.DataSpec{
-							Name:    "file.groovy",
+							Name:    "file.js",

Review Comment:
   Also here, any reason to change 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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1413913816

   Your idea is great however it is scoped to Camel K 2.0 while I would expect a solution for Camel K 1.17, don't you believe that it could be an acceptable approach for 1.17?


-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1108572047


##########
.github/workflows/native.yml:
##########
@@ -0,0 +1,118 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: native
+
+env:
+  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+on:
+  pull_request:
+    branches:
+      - main
+      - "release-*"
+    paths-ignore:
+      - 'docs/**'
+      - 'proposals/**'
+      - '**.adoc'
+      - '**.md'
+      - 'KEYS'
+      - 'LICENSE'
+      - 'NOTICE'
+  push:
+    branches:
+      - main
+      - "release-*"
+    paths-ignore:
+      - 'docs/**'
+      - 'proposals/**'
+      - '**.adoc'
+      - '**.md'
+      - 'KEYS'
+      - 'LICENSE'
+      - 'NOTICE'
+  workflow_dispatch:
+    inputs:
+      log-level:
+        description: 'Set the operator log level (info or debug)'
+        required: false
+      pre-built-kamel-image:
+        description: 'Kamel image url for skipping building of kamel stages. Used for debugging'
+        required: false
+      skip-problematic:
+        description: 'Whether tests marked as problematic should be skipped - false by default (sets CAMEL_K_TEST_SKIP_PROBLEMATIC)'
+        required: false
+        default: false
+      test-filters:
+        description: |
+          Filter the tests in this test suite by assigning the test pattern to TEST_NATIVE_RUN,
+          eg. TEST_NATIVE_RUN=TestBasic will only run tests prefixed with 'TestBasic'
+        required: false
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+  cancel-in-progress: true
+
+jobs:
+  install-native-high-memory:

Review Comment:
   Why 2 different jobs?



##########
.github/workflows/native.yml:
##########
@@ -0,0 +1,118 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: native
+
+env:
+  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+on:

Review Comment:
   Once we have verified for this release, let's change this to run only on a nightly schedule to avoid such a high resource consumption process for every PR or merge.



##########
.github/actions/kamel-config-cluster-kind/action.yml:
##########
@@ -23,11 +23,12 @@ runs:
   steps:
     - id: install-cluster
       name: Install Cluster
-      uses: container-tools/kind-action@v1
+      uses: container-tools/kind-action@61f1afd4807b0dac84f3232ec99e45c63701d220

Review Comment:
   We can merge with this commit id, but, please, create a follow up issue to release the kind-action and update here accordingly.



##########
e2e/support/test_support.go:
##########
@@ -93,10 +93,10 @@ const kubeConfigEnvVar = "KUBECONFIG"
 
 var TestTimeoutShort = 1 * time.Minute
 var TestTimeoutMedium = 5 * time.Minute
-var TestTimeoutLong = 10 * time.Minute
+var TestTimeoutLong = 15 * time.Minute
 
 // TestTimeoutVeryLong should be used only for testing native builds.
-var TestTimeoutVeryLong = 90 * time.Minute
+var TestTimeoutVeryLong = 60 * time.Minute

Review Comment:
   We better provide a specific timeout for the native test, no needs to use global variables. With this change we are slowing down also any other test that would expect those previous values.



-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1109418097


##########
.github/workflows/native.yml:
##########
@@ -0,0 +1,118 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: native
+
+env:
+  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+on:

Review Comment:
   Yes, and it's a great effort indeed. However, native workflow is too much resource consuming and we don't have enough capacity to run at every github action. We still have a daily view of what's going on, though.



-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1415777497

   @squakez your remarks have been addressed. 
   What remains:
   * The test `TestOLMAutomaticUpgrade` fails and it is not clear to me why. I see this [test fails in another build](https://github.com/apache/camel-k/actions/runs/4082998545/jobs/7038002404) so I guess it is not related to these changes.
   * There are some tests failing due to what you fixed in this PR https://github.com/apache/camel-k/pull/4029
   * Some tests that I have added for native mode due to a lack of memory, maybe I should only keep the less greedy, WDYT?


-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1412185420

   BTW, if you want to run the native test suite as well, you need to call the native workflow directly on the branch as we have moved them into nightly releases (they used to eat up a lot of memory).


-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1415372113

   > Your idea is great however it is scoped to Camel K 2.0 while I would expect a solution for Camel K 1.17, don't you believe that it could be an acceptable approach for 1.17?
   
   I guess you mean `1.12.0` (1.17 is the runtime). It could work, but mind that we could apply an heavy refactoring when moving to 2.0.


-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1108898554


##########
.github/workflows/native.yml:
##########
@@ -0,0 +1,118 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: native
+
+env:
+  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+on:
+  pull_request:
+    branches:
+      - main
+      - "release-*"
+    paths-ignore:
+      - 'docs/**'
+      - 'proposals/**'
+      - '**.adoc'
+      - '**.md'
+      - 'KEYS'
+      - 'LICENSE'
+      - 'NOTICE'
+  push:
+    branches:
+      - main
+      - "release-*"
+    paths-ignore:
+      - 'docs/**'
+      - 'proposals/**'
+      - '**.adoc'
+      - '**.md'
+      - 'KEYS'
+      - 'LICENSE'
+      - 'NOTICE'
+  workflow_dispatch:
+    inputs:
+      log-level:
+        description: 'Set the operator log level (info or debug)'
+        required: false
+      pre-built-kamel-image:
+        description: 'Kamel image url for skipping building of kamel stages. Used for debugging'
+        required: false
+      skip-problematic:
+        description: 'Whether tests marked as problematic should be skipped - false by default (sets CAMEL_K_TEST_SKIP_PROBLEMATIC)'
+        required: false
+        default: false
+      test-filters:
+        description: |
+          Filter the tests in this test suite by assigning the test pattern to TEST_NATIVE_RUN,
+          eg. TEST_NATIVE_RUN=TestBasic will only run tests prefixed with 'TestBasic'
+        required: false
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+  cancel-in-progress: true
+
+jobs:
+  install-native-high-memory:

Review Comment:
   Initially, it was to be able to launch the "lightest" tests on a Linux runner but they still need more than what a Linux runner can offer. Now, it is still interesting as they are launched in parallel so it allows having a duration that is equivalent to the duration of `common / common-it` which also means that the overall duration of afull build is not really affected.



-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez merged pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez merged PR #4021:
URL: https://github.com/apache/camel-k/pull/4021


-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1424427236

   Depends on https://github.com/container-tools/kind-action/pull/12 (memory allocated to Colima by default is too low)


-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1425396687

   knative check failure because of #4044 - if the rest of checks pass we can merge :crossed_fingers: 


-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1434281128

   Good for me. As it's all green let's merge this :) - we will understand if moving the `native` workflow to a daily basis if we see it start becoming too much resource consuming.


-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1413418078

   As I'm working on some ideas around Camel K 2.0 (gitops, being able to build _any_ Camel application, ...), let me share with you something I've been thinking lately. I may probably create an issue with some visual support, but hopefully can help you in the work you're doing.
   
   I think that instead of passing the whole content of a source along the different CRs, we should have the concept of a "generated Maven project" (it may even come from `camel export` - Camel JBang instead of our own logic). This is a standard Maven project that could be even stored in a Git repository. The project should be generated by the Operator when an Integration is submitted (here we can think to provide the Source or the Git repo URL). In the first case a _project generation_ is triggered (ie, via Camel JBang)  and we should store temporary the result in a workspace directory. The project generation may be controlled via a new Custom Resource and a reconciliation loop.
   
   Once the Project is `ready`, the Build can kick off. The Build has to be fed with the workspace directory and the rest should be proceeding more or less the same way it is now (in order to be able to reuse the incremental image kit logic).


-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1095714247


##########
pkg/client/camel/applyconfiguration/camel/v1/buildertask.go:
##########
@@ -96,3 +97,16 @@ func (b *BuilderTaskApplyConfiguration) WithBuildDir(value string) *BuilderTaskA
 	b.BuildDir = &value
 	return b
 }
+
+// WithSources adds the given value to the Sources field in the declarative configuration
+// and returns the receiver, so that objects can be build by chaining "With" function invocations.
+// If called multiple times, values provided by each call will be appended to the Sources field.
+func (b *BuilderTaskApplyConfiguration) WithSources(values ...*SourceSpecApplyConfiguration) *BuilderTaskApplyConfiguration {
+	for i := range values {
+		if values[i] == nil {
+			panic("nil value passed to WithSources")

Review Comment:
   okey, then likely it's something that should never happen. Please, feel free to proceed.



-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1095563892


##########
pkg/trait/quarkus.go:
##########
@@ -47,6 +47,57 @@ type quarkusTrait struct {
 	BaseTrait
 	traitv1.QuarkusTrait `property:",squash"`
 }
+type languageSettings struct {

Review Comment:
   Whatever work best for you. Ideally it should be done before merging the PR to make sure we get this dynamically from the Catalog. Feel free to push a further commit to solve this at the very end of your development.



-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1413681087

   Details of the proposal defined in the previous comment exposed in #4024 


-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1095510849


##########
pkg/client/camel/applyconfiguration/camel/v1/buildertask.go:
##########
@@ -96,3 +97,16 @@ func (b *BuilderTaskApplyConfiguration) WithBuildDir(value string) *BuilderTaskA
 	b.BuildDir = &value
 	return b
 }
+
+// WithSources adds the given value to the Sources field in the declarative configuration
+// and returns the receiver, so that objects can be build by chaining "With" function invocations.
+// If called multiple times, values provided by each call will be appended to the Sources field.
+func (b *BuilderTaskApplyConfiguration) WithSources(values ...*SourceSpecApplyConfiguration) *BuilderTaskApplyConfiguration {
+	for i := range values {
+		if values[i] == nil {
+			panic("nil value passed to WithSources")

Review Comment:
   This code has been generated, I have no idea how I can change its behavior but I will try to figure out



-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1415915022

   Cool, I still need to have a deeper look, but in the while, about the native test I suggest you move them into a separate workflow (similar of what we used to have before) so that they won't timeout because the rest of the `common` already takes almost 3 hours and I bet, native only now may take a few more hours.


-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1095516265


##########
pkg/trait/quarkus.go:
##########
@@ -47,6 +47,57 @@ type quarkusTrait struct {
 	BaseTrait
 	traitv1.QuarkusTrait `property:",squash"`
 }
+type languageSettings struct {

Review Comment:
   I wanted initially to do that in a second step to keep it small and simple. But if you really want, I can make it dynamic right now?



-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1418694157

   > Infortunatelly the native E2E test cannot pass on the GitHub CI because it requires more than 6 Go of RAM, so I need to remove it.
   
   Have you rebased it? it seems there was some failure I've fixed in #4022 - we need to find a way to run the native check smoothly anyhow, maybe we can run it as an additional nightly task right after the release task (to avoid resource consumption conflict).


-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1422221639

   > Depends on [container-tools/kind-action#10](https://github.com/container-tools/kind-action/pull/10)
   
   Great finding. If we manage to run with more resources we may have a more complete test for native!


-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1108898554


##########
.github/workflows/native.yml:
##########
@@ -0,0 +1,118 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: native
+
+env:
+  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+on:
+  pull_request:
+    branches:
+      - main
+      - "release-*"
+    paths-ignore:
+      - 'docs/**'
+      - 'proposals/**'
+      - '**.adoc'
+      - '**.md'
+      - 'KEYS'
+      - 'LICENSE'
+      - 'NOTICE'
+  push:
+    branches:
+      - main
+      - "release-*"
+    paths-ignore:
+      - 'docs/**'
+      - 'proposals/**'
+      - '**.adoc'
+      - '**.md'
+      - 'KEYS'
+      - 'LICENSE'
+      - 'NOTICE'
+  workflow_dispatch:
+    inputs:
+      log-level:
+        description: 'Set the operator log level (info or debug)'
+        required: false
+      pre-built-kamel-image:
+        description: 'Kamel image url for skipping building of kamel stages. Used for debugging'
+        required: false
+      skip-problematic:
+        description: 'Whether tests marked as problematic should be skipped - false by default (sets CAMEL_K_TEST_SKIP_PROBLEMATIC)'
+        required: false
+        default: false
+      test-filters:
+        description: |
+          Filter the tests in this test suite by assigning the test pattern to TEST_NATIVE_RUN,
+          eg. TEST_NATIVE_RUN=TestBasic will only run tests prefixed with 'TestBasic'
+        required: false
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+  cancel-in-progress: true
+
+jobs:
+  install-native-high-memory:

Review Comment:
   Initially, it was to be able to launch the "lightest" tests on a Linux runner but they still need more than what a Linux runner can offer. Now, it is still interesting as they are launched in parallel so it allows having a duration that is equivalent to the duration of `common / common-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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1093325234


##########
pkg/builder/types.go:
##########
@@ -80,6 +80,7 @@ type builderContext struct {
 	Build             v1.BuilderTask
 	BaseImage         string
 	Namespace         string
+	Integration       string

Review Comment:
   I think this is breaking the original design that wants an IntegrationKit (and the related build) to be Integration agnostic in order to be reused. If you need the source at build time (which I suspect is the reason why you want to provide an Integration here), probably we need to think an alternative way of generating the project to be given to the builder and let also the runtime to manage that situation.



-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1093335237


##########
pkg/builder/types.go:
##########
@@ -80,6 +80,7 @@ type builderContext struct {
 	Build             v1.BuilderTask
 	BaseImage         string
 	Namespace         string
+	Integration       string

Review Comment:
   If so it means that I need to have the sources in the Build model, do you confirm?



-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1095691840


##########
pkg/trait/quarkus.go:
##########
@@ -47,6 +47,57 @@ type quarkusTrait struct {
 	BaseTrait
 	traitv1.QuarkusTrait `property:",squash"`
 }
+type languageSettings struct {

Review Comment:
   ok I included it in my PR



-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1095489402


##########
pkg/client/camel/applyconfiguration/camel/v1/integrationkitspec.go:
##########
@@ -96,3 +97,16 @@ func (b *IntegrationKitSpecApplyConfiguration) WithRepositories(values ...string
 	}
 	return b
 }
+
+// WithSources adds the given value to the Sources field in the declarative configuration
+// and returns the receiver, so that objects can be build by chaining "With" function invocations.
+// If called multiple times, values provided by each call will be appended to the Sources field.
+func (b *IntegrationKitSpecApplyConfiguration) WithSources(values ...*SourceSpecApplyConfiguration) *IntegrationKitSpecApplyConfiguration {
+	for i := range values {
+		if values[i] == nil {
+			panic("nil value passed to WithSources")

Review Comment:
   ditto



##########
pkg/client/camel/applyconfiguration/camel/v1/buildertask.go:
##########
@@ -96,3 +97,16 @@ func (b *BuilderTaskApplyConfiguration) WithBuildDir(value string) *BuilderTaskA
 	b.BuildDir = &value
 	return b
 }
+
+// WithSources adds the given value to the Sources field in the declarative configuration
+// and returns the receiver, so that objects can be build by chaining "With" function invocations.
+// If called multiple times, values provided by each call will be appended to the Sources field.
+func (b *BuilderTaskApplyConfiguration) WithSources(values ...*SourceSpecApplyConfiguration) *BuilderTaskApplyConfiguration {
+	for i := range values {
+		if values[i] == nil {
+			panic("nil value passed to WithSources")

Review Comment:
   We should not panic but report the error and set the related CR status to error.



##########
pkg/trait/quarkus.go:
##########
@@ -47,6 +47,57 @@ type quarkusTrait struct {
 	BaseTrait
 	traitv1.QuarkusTrait `property:",squash"`
 }
+type languageSettings struct {

Review Comment:
   This information would depend on the catalog. We should parse the catalog and use those values accordingly.



##########
pkg/trait/quarkus.go:
##########
@@ -216,6 +265,9 @@ func (t *quarkusTrait) newIntegrationKit(e *Environment, packageType traitv1.Qua
 		Traits:       propagateKitTraits(e),
 	}
 
+	if packageType == traitv1.NativePackageType {
+		kit.Spec.Sources = propagateSourcesRequiredAtBuildTime(e)

Review Comment:
   +1 good to include only when native



##########
pkg/trait/trait_test.go:
##########
@@ -267,22 +267,23 @@ func TestConfigureVolumesAndMountsSources(t *testing.T) {
 				Sources: []v1.SourceSpec{
 					{
 						DataSpec: v1.DataSpec{
-							Name:       "source1.java",
+							Name:       "source1.xml",

Review Comment:
   why changing this test?



-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1109420702


##########
e2e/support/test_support.go:
##########
@@ -93,10 +93,10 @@ const kubeConfigEnvVar = "KUBECONFIG"
 
 var TestTimeoutShort = 1 * time.Minute
 var TestTimeoutMedium = 5 * time.Minute
-var TestTimeoutLong = 10 * time.Minute
+var TestTimeoutLong = 15 * time.Minute
 
 // TestTimeoutVeryLong should be used only for testing native builds.
-var TestTimeoutVeryLong = 90 * time.Minute
+var TestTimeoutVeryLong = 60 * time.Minute

Review Comment:
   I was more concerned about `TestTimeoutLong` which is increased a little bit. I wonder if we could instead introduce a different timeout variables for native (ie, `NativeTestTimeoutLong`) or either just use the quantity of minutes. But we refine this in a following iteration, not a blocker for this PR.



-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1108893636


##########
.github/actions/kamel-config-cluster-kind/action.yml:
##########
@@ -23,11 +23,12 @@ runs:
   steps:
     - id: install-cluster
       name: Install Cluster
-      uses: container-tools/kind-action@v1
+      uses: container-tools/kind-action@61f1afd4807b0dac84f3232ec99e45c63701d220

Review Comment:
   Here it is https://github.com/apache/camel-k/issues/4063



-- 
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@camel.apache.org

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


[GitHub] [camel-k] squakez commented on pull request #4021: Ref #3023: Add native compilation with sources

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#issuecomment-1434281962

   Excellent work. Great feature to promote for 1.12.0 release!


-- 
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@camel.apache.org

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


[GitHub] [camel-k] essobedo commented on a diff in pull request #4021: Ref #3023: Add native compilation with sources

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1109516206


##########
e2e/support/test_support.go:
##########
@@ -93,10 +93,10 @@ const kubeConfigEnvVar = "KUBECONFIG"
 
 var TestTimeoutShort = 1 * time.Minute
 var TestTimeoutMedium = 5 * time.Minute
-var TestTimeoutLong = 10 * time.Minute
+var TestTimeoutLong = 15 * time.Minute
 
 // TestTimeoutVeryLong should be used only for testing native builds.
-var TestTimeoutVeryLong = 90 * time.Minute
+var TestTimeoutVeryLong = 60 * time.Minute

Review Comment:
   Yeah, I had to change a bit the timeout because, on MacOS runners, everything is much slower probably because it needs a container runtime which is not the case with Linux. However in the end, If a test works as expected the timeout set should not have any effect on the duration of the test, it is only when something goes wrong the state is not the expected one. 



-- 
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@camel.apache.org

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