generator-jhipster: Issues with jhipster manual upgrade: .yo-rc.json not updated

Overview of the issue
  • Jhipster version is not getting updated in .yo-rc.json file after manual upgrade to master
  • Compilation errors after upgrade due to presence of ProfileInfoResource and associated test
  • Liquibase checksum issues after upgrade – Not implemented
  • Client side build fails after upgrade due to old files
Motivation for or Use Case

Jhipster version should be updated to ensure correct upgrade path for future upgrades

Reproduce the error
  1. Generate monolith application with Jhipster version 4.14.5.
  2. Link “generator-jhipster” master codebase to new generated application.
  3. Enter jhipster command to upgrade to newer version
  4. Check jhipster version in .yo-rc.json. It still points to 4.14.5
Related issues
Suggest a Fix
JHipster Version(s)

v5.1.0

JHipster configuration
{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "com.mycompany.myapp",
      "nativeLanguage": "en"
    },
    "jhipsterVersion": "4.14.5",
    "baseName": "rmono4",
    "packageName": "com.mycompany.myapp",
    "packageFolder": "com/mycompany/myapp",
    "serverPort": "8080",
    "authenticationType": "jwt",
    "cacheProvider": "ehcache",
    "enableHibernateCache": true,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "postgresql",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSocialSignIn": false,
    "enableSwaggerCodegen": false,
    "jwtSecretKey": "<secret>",
    "clientFramework": "angularX",
    "useSass": false,
    "clientPackageManager": "yarn",
    "applicationType": "monolith",
    "testFrameworks": [],
    "jhiPrefix": "jhi",
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": [
      "en"
    ]
  }
}
Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
  • Checking this box is mandatory (this is just to show you read everything)

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

I would not use runOnChange="true" because it could break subsequent changesets hand written by user. Personally I prefer Liquibase to fail on checksum changes because that’s the least surprising option.

I am also seeing Liquibase checksum issues after upgrade:

2018-08-10 20:36:19.681 ERROR 9373 — [no-4-Executor-1] i.g.j.c.liquibase.AsyncSpringLiquibase : Liquibase could not start correctly, your database is NOT ready: Validation Failed:
1 change sets check sum
config/liquibase/changelog/00000000000000_initial_schema.xml::00000000000001::jhipster was: 7:b24857ae96390484c3b88439ddbb0906 but i s now: 7:8966e014f629e8066e3cb3de05a568e1

liquibase.exception.ValidationFailedException: Validation Failed:

I do see changes in generated change-set like removal of indexes (idx_user_login, idx_user_email etc) and addition of addNotNullConstraint.

To avoid such issues during upgrade, this change-set should contain attribute runOnChange="true" and provide rollback of used refactorings. Also, it would be clean if initial schema change-set is split into smaller change-sets.