Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Refactor camel k crd #694

Merged
merged 11 commits into from
Jun 21, 2023
Merged

Conversation

Delawen
Copy link
Collaborator

@Delawen Delawen commented Jun 13, 2023

First iteration to get Camel K CRD in place to reuse as much as possible from Camel model when parsing back and forth.

The idea is to use for parsing and writing the yaml files the official classes that Camel K uses, so we go along with changes and updates.

@Delawen Delawen requested a review from a team June 13, 2023 13:32
@Delawen Delawen force-pushed the refactor-camel-k-crd branch from 8dd9f3b to 18c6485 Compare June 13, 2023 13:53
@Delawen
Copy link
Collaborator Author

Delawen commented Jun 13, 2023

Some yaml test resources have been changed because now that we are using other classes the order of the attributes changed.

@Delawen Delawen linked an issue Jun 13, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jun 13, 2023

Codecov Report

Merging #694 (5a7806d) into main (a8c5908) will decrease coverage by 2.50%.
The diff coverage is 56.95%.

@@             Coverage Diff              @@
##               main     #694      +/-   ##
============================================
- Coverage     80.10%   77.60%   -2.50%     
- Complexity      154      155       +1     
============================================
  Files            53       53              
  Lines          2709     2831     +122     
  Branches        432      466      +34     
============================================
+ Hits           2170     2197      +27     
- Misses          360      453      +93     
- Partials        179      181       +2     
Impacted Files Coverage Δ
...ployment/generator/kamelet/KameletRepresenter.java 51.11% <27.65%> (-31.04%) ⬇️
...elroute/IntegrationDeploymentGeneratorService.java 62.31% <33.33%> (-0.54%) ⬇️
...tor/kamelet/KameletDeploymentGeneratorService.java 71.42% <40.00%> (-5.17%) ⬇️
.../step/parser/kamelet/KameletStepParserService.java 75.82% <60.60%> (-2.03%) ⬇️
...data/parser/step/kamelet/KameletFileProcessor.java 83.13% <66.66%> (ø)
...elet/KameletBindingDeploymentGeneratorService.java 70.24% <80.00%> (+0.34%) ⬆️
...arser/camelroute/IntegrationStepParserService.java 90.24% <83.33%> (-2.07%) ⬇️
...src/main/java/io/kaoto/backend/KamelPopulator.java 91.19% <90.32%> (-0.38%) ⬇️
...melroute/CamelRouteDeploymentGeneratorService.java 35.71% <100.00%> (+3.21%) ⬆️
...t/generator/camelroute/IntegrationRepresenter.java 100.00% <100.00%> (ø)
... and 1 more

... and 1 file with indirect coverage changes

@Delawen
Copy link
Collaborator Author

Delawen commented Jun 14, 2023

I know this is a classic, but I swear native build works on my machine :/

========================================================================================================================
GraalVM Native Image: Generating 'api-1.0.1-SNAPSHOT-runner' (executable)...
========================================================================================================================
[1/7] Initializing...                                                                                   (18.4s @ 0.39GB)
 Version info: 'GraalVM 22.3.2.1-Final Java 17 Mandrel Distribution'
 Java version info: '17.0.7+7'
 C compiler: gcc (redhat, x86_64, 8.5.0)
 Garbage collector: Serial GC

@apupier
Copy link
Contributor

apupier commented Jun 14, 2023

'GraalVM 22.3.2.1-Final

First difference which jumps to me is that you are not using the same version of Graalvm: https://github.com/KaotoIO/kaoto-backend/blob/a8c5908c0f3adc74ddbab67299fac55f1bdf5413/.github/workflows/analysis.yml#L62

native build works on my machine

native build and native tests?

@Delawen
Copy link
Collaborator Author

Delawen commented Jun 14, 2023

First difference which jumps to me is that you are not using the same version of Graalvm:

Yes, I am trying with this other version of graalvm

native build and native tests?

Yes, sure. Same command

mvn install -Pnative -Dquarkus.log.category.\"io.kaoto.backend.model.deployment.kamelet.step.FlowStepDeserializer\".level=OFF

@Delawen
Copy link
Collaborator Author

Delawen commented Jun 14, 2023

Same version locally it works. Trying to update graalvm here instead... just in case :/

@Delawen Delawen force-pushed the refactor-camel-k-crd branch 3 times, most recently from 57dfc72 to af275f1 Compare June 14, 2023 09:42
@Delawen Delawen force-pushed the refactor-camel-k-crd branch from af275f1 to d2aa9de Compare June 14, 2023 10:11
Delawen added 2 commits June 14, 2023 13:04
This was no longer relevant as we are using Camel CRD classes now, which
don't contain Kaoto related properties. Plus the frontend shouldn't care
about it.
@Delawen
Copy link
Collaborator Author

Delawen commented Jun 14, 2023

🤞 🤞

@Delawen Delawen requested a review from apupier June 14, 2023 13:28
Copy link
Contributor

@apupier apupier left a comment

Choose a reason for hiding this comment

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

  • there are a lot of new lines reported as not covered by tests in KameletRepresenter

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 31 Code Smells

No Coverage information No Coverage information
2.6% 2.6% Duplication

@Delawen Delawen merged commit 93105b8 into kaoto-archive:main Jun 21, 2023
@Delawen Delawen deleted the refactor-camel-k-crd branch July 10, 2023 13:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use the Camel K CRD maven package
2 participants