You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "gansheer (via GitHub)" <gi...@apache.org> on 2023/08/04 14:14:27 UTC

[GitHub] [camel-k] gansheer opened a new pull request, #4649: feat(trait): Fail IntegrationKit when custom task defined with build strategy routine

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

   Ref #4558
   
   ## Motivation
   
   Adding a custom task with the `builder` trait result in an unclear error message and cause.
   
   ## Description
   
   * Add an IntegrationKit Status Condition Error when a custom builder task is specified on a integration platform defined with `routine` build strategy
   * Some refactoring to avoid adding tasks to the pipeline when the error fires (else it results in a panic error later)
   
   
   **Release Note**
   ```release-note
   feat(trait): Fail IntegrationKit when custom task defined with build strategy routine
   ```
   


-- 
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] github-actions[bot] commented on pull request #4649: feat(trait): Fail IntegrationKit when custom task defined with build strategy routine

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4649:
URL: https://github.com/apache/camel-k/pull/4649#issuecomment-1669633818

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage changed: 39.1% --> 39.2% (Coverage difference: **+.1%**)


-- 
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 #4649: feat(trait): Fail IntegrationKit when custom task defined with build strategy routine

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


-- 
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 #4649: feat(trait): Fail IntegrationKit when custom task defined with build strategy routine

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


##########
pkg/trait/builder.go:
##########
@@ -78,17 +80,34 @@ func (t *builderTrait) Apply(e *Environment) error {
 		}
 		return nil
 	}
-	e.Pipeline = append(e.Pipeline, v1.Task{Builder: builderTask})
+
+	pipelineTasks = append(pipelineTasks, v1.Task{Builder: builderTask})
 
 	// Custom tasks
 	if t.Tasks != nil {
-		e.Pipeline = append(e.Pipeline, t.customTasks()...)
+		if len(t.Tasks) > 0 && e.Platform.Status.Build.BuildConfiguration.Strategy != v1.BuildStrategyPod {
+			t.L.Info(string(e.Platform.Status.Build.BuildConfiguration.Strategy))
+			t.L.Info(string(v1.BuildStrategyPod))
+			e.IntegrationKit.Status.Phase = v1.IntegrationKitPhaseError
+			e.IntegrationKit.Status.SetCondition("IntegrationKitTasksValid",
+				corev1.ConditionFalse,
+				"IntegrationKitTasksValid",
+				fmt.Sprintf("User customizable task unavailable when using `%s` platform build strategy: use `%s` instead.",

Review Comment:
   ```suggestion
   				fmt.Sprintf("Pipeline tasks unavailable when using `%s` platform build strategy: use `%s` instead.",
   ```



-- 
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] github-actions[bot] commented on pull request #4649: feat(trait): Fail IntegrationKit when custom task defined with build strategy routine

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4649:
URL: https://github.com/apache/camel-k/pull/4649#issuecomment-1668196581

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage unchanged.


-- 
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] github-actions[bot] commented on pull request #4649: feat(trait): Fail IntegrationKit when custom task defined with build strategy routine

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4649:
URL: https://github.com/apache/camel-k/pull/4649#issuecomment-1667374733

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage unchanged.


-- 
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] github-actions[bot] commented on pull request #4649: feat(trait): Fail IntegrationKit when custom task defined with build strategy routine

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4649:
URL: https://github.com/apache/camel-k/pull/4649#issuecomment-1665696475

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage unchanged.


-- 
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