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

Gateway/microservice (or microfrontend) generation from JDL did not work #17957

Closed
1 task
DanielFran opened this issue Feb 23, 2022 · 12 comments · Fixed by #17966
Closed
1 task

Gateway/microservice (or microfrontend) generation from JDL did not work #17957

DanielFran opened this issue Feb 23, 2022 · 12 comments · Fixed by #17966
Labels
area: bug 🐛 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ theme: front theme: microfrontend theme: microservice $100 https://www.jhipster.tech/bug-bounties/
Milestone

Comments

@DanielFran
Copy link
Member

DanielFran commented Feb 23, 2022

Overview of the issue

Using this JDL with the main branch, the applications did not pass integration tests (both gateway and microservice/frontend)

NOTE: Update gateway to use jwt also

// command used: jhipster jdl .\test.jdl --skip-jhipster-dependencies

application {
  config {
    baseName gateway
    packageName io.test.gateway
    applicationType gateway
    clientFramework angular
    authenticationType jwt
    prodDatabaseType postgresql
    buildTool maven,
    enableTranslation true,
    nativeLanguage en,
    languages [en, fr],
    testFrameworks [cypress],
    jhiPrefix custom
  }
  entities *
}

application {
  config {
    baseName establishment
    packageName io.test.establishment
    applicationType microservice
    clientFramework angular
    authenticationType jwt
    prodDatabaseType postgresql
    cacheProvider caffeine
    enableHibernateCache true
    serverPort 8081
    buildTool maven,
    enableTranslation true,
    nativeLanguage en,
    languages [en, fr],
    testFrameworks  [cypress],
    jhiPrefix custom
  }
  entities Schema, Organization, OrganizationType, Establishment, EstablishmentType, SpecialityType, Address, Contact
}

microservice Schema, Organization, OrganizationType, Establishment, EstablishmentType, SpecialityType, Address, Contact with establishment

filter *
paginate * with pagination
dto * with mapstruct

entity Schema {
	externalId Integer,
    name String required maxlength(50),
    description String maxlength(255),
    status Status required
}

entity Organization {
	externalId Integer,
    name String required maxlength(50),
    description String maxlength(255),
    logo String maxlength(50),
    website String maxlength(3000),
    status Status required
}

entity OrganizationType {
	externalId Integer,
    name String required maxlength(50),
    description String maxlength(255),
    icon String maxlength(50),
    status Status required
}

entity Establishment {
	externalId Integer,
    code String maxlength(50),
    name String required maxlength(50),
    description String maxlength(255),
    logo String maxlength(255),
    website String maxlength(255),
    vatNumber String maxlength(20),
    country String maxlength(30),
    openDate Instant,
    closeDate Instant,
    status Status required
}

entity EstablishmentType {
	externalId Integer,
    name String required maxlength(50),
    description String maxlength(255),
    icon String maxlength(50),
    status Status required
}

entity SpecialityType {
	externalId Integer,
    name String required maxlength(50),
    description String maxlength(255),
    icon String maxlength(50),
    status Status required
}

entity Address {
	externalId Integer,
    name String required maxlength(50),
    description String maxlength(255),
    address1 String maxlength(255),
    street String maxlength(255),
    door String maxlength(255),
    floor String maxlength(255),
    zipCode String maxlength(10),
    city String maxlength(255),
    region String maxlength(255),
    country String maxlength(30),
    status Status required
}

entity Contact {
	externalId Integer,
    isDefault Boolean,
    name String required maxlength(50),
    description String maxlength(255),
    contactType ContactType,
    contact String maxlength(255),
    status Status required
}

enum Status {
    Active, Inactive, Deleted
}

enum ContactType {
    Mobile, Phone, Fax, Email
}

relationship ManyToOne {
	Organization{schema} to Schema
}

relationship ManyToOne {
	Organization{organizationType} to OrganizationType
}

relationship ManyToMany {
	Organization{establishment} to Establishment{organization}
}

relationship ManyToOne {
	Establishment{establishmentType} to EstablishmentType
}

relationship ManyToMany {
	Establishment{specialityType} to SpecialityType{establishment}
}

relationship OneToOne {
	Establishment{address} to Address{establishment}
}

relationship OneToMany {
	Establishment{contact} to Contact{establishment}
}
Browsers and Operating System
  • Checking this box is mandatory (this is just to show you read everything)
@DanielFran
Copy link
Member Author

DanielFran commented Feb 23, 2022

@mshima Defining microfrontend or microservice (removing the client framework) I have exactly the same issue, error creating beans in integration tests.
On gateway the same, but for user...

@mraible
Copy link
Contributor

mraible commented Feb 23, 2022

This seems important, so I'm adding a bug bounty.

@mraible mraible added $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $100 https://www.jhipster.tech/bug-bounties/ labels Feb 23, 2022
@mshima mshima mentioned this issue Feb 23, 2022
6 tasks
@mshima
Copy link
Member

mshima commented Feb 24, 2022

Following #17958 (comment).
This error happens at daily-builds at windows.
I saw the stack trace at macOS, but it don’t fails the command.

Last success build uses:
E26C4603-67D2-4EF3-BE1F-E4059173B787

First with errors uses:
FD2E28D4-1DD6-4C9B-B193-F3EC262EDA3D

There are only 3 merges in the mean time.
Most likely caused by #17925.

@DanielFran
Copy link
Member Author

Will try to revert some of the dependencies to validate which one might cause the issue

DanielFran added a commit to DanielFran/generator-jhipster that referenced this issue Feb 24, 2022
@DanielFran
Copy link
Member Author

@mshima @pascalgrimaud @mraible Identified issue, this is related to the update of maven-compiler-plugin to 3.10.0

@pascalgrimaud
Copy link
Member

Here a screenshot of the errors:

image

It seems related to https://issues.apache.org/jira/browse/MCOMPILER-485

@DanielFran
Copy link
Member Author

@mhsima Do you want to share with me the bug bounty?

@mshima
Copy link
Member

mshima commented Feb 24, 2022

@DanielFran you can take the bounty.

@DanielFran
Copy link
Member Author

@pascalgrimaud
Copy link
Member

@DanielFran : approved

@pascalgrimaud pascalgrimaud added this to the 7.7.0 milestone Feb 26, 2022
@DanielFran
Copy link
Member Author

@pascalgrimaud can you re-approved the bug bounty please?

@pascalgrimaud
Copy link
Member

@DanielFran : done :)

ko5tik pushed a commit to ko5tik/generator-jhipster that referenced this issue May 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: bug 🐛 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ theme: front theme: microfrontend theme: microservice $100 https://www.jhipster.tech/bug-bounties/
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants