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

cds deploy - don't generate datas since 1.11 version #1014

Closed
yul-dev opened this issue Feb 5, 2025 · 4 comments · Fixed by #1018
Closed

cds deploy - don't generate datas since 1.11 version #1014

yul-dev opened this issue Feb 5, 2025 · 4 comments · Fixed by #1018
Assignees
Labels
bug Something isn't working postgres

Comments

@yul-dev
Copy link

yul-dev commented Feb 5, 2025

CDS DEPLOY don't generate file

Since version 1.11, the cds deploy command don't deploy data into folder destination.
When I put the package back in version 1.10.5, the cds_build command generates the folder (db) and files for deployment

Detailed steps to reproduce

@cap-js/postgres: 1.10.5

  1. cds build
  2. {
    build: {
    target: 'gen',
    tasks: [
    { for: 'postgres', src: 'db', options: { model: ['db', 'srv', 'app'] }}
    ]
    }
    }

@cap-js/postgres: 1.11

  1. cds build
  2. {
    build: {
    target: 'gen',
    tasks: [
    ]
    }
    }

Details about your project

Remove the lines not applicable, and fill in versions for remaining ones:

@cap-js/asyncapi 1.0.2
@cap-js/cds-types 0.8.0
@cap-js/db-service 1.17.1
@cap-js/openapi 1.1.2
@cap-js/postgres 1.10.5
@cap-js/sqlite 1.8.0
@sap/cds 8.7.0
@sap/cds-compiler 5.7.0
@sap/cds-dk 8.7.0
@sap/cds-dk (global) 8.6.1
@sap/cds-fiori 1.3.0
@sap/cds-foss 5.0.1
@sap/cds-mtxs 2.5.0
@sap/eslint-plugin-cds 3.1.2
Node.js v20.18.1
@yul-dev yul-dev added the bug Something isn't working label Feb 5, 2025
@yul-dev yul-dev changed the title cds deploy - don't generate datas since 1.11 versio cds deploy - don't generate datas since 1.11 versio, Feb 5, 2025
@yul-dev yul-dev changed the title cds deploy - don't generate datas since 1.11 versio, cds deploy - don't generate datas since 1.11 version Feb 5, 2025
@mvk-abs
Copy link

mvk-abs commented Feb 6, 2025

This is really an epic fail.
Having a look into the cds-plugin.js of @cap-js/postgres reveals

static hasTask() { return cds.requires.db?.kind === 'postgres' }

which cannot work with the preset from package.json version 1.11.0

"postgres": {
  "impl": "@cap-js/postgres",
  "kind": "sqlite",
  "dialect": "postgres",
  "vcap": {
    "label": "postgresql-db"
  },
  "schema_evolution": "auto"
}

where
"kind": "sqlite",

was added and therefore the whole plugin is broken.

@dragolea
Copy link

dragolea commented Feb 6, 2025

+1

@patricebender patricebender linked a pull request Feb 7, 2025 that will close this issue
@konstantin-roehm
Copy link

+1

I also stumbled upon this issue in the last days on setting up a new application with postgres with version 1.11.
I got the generation of gen/pg folder working by overwriting the incorrect config from the package by adding this to the cds project configuration:

  "cds": {
    "requires": {
      "kinds": {
        "postgres": {
          "kind": "postgres"
        }
      },
 ...
   }

With this workaround the cds build command was executing the additional tasks.
I still hope the referenced pull request will be included soon.

@patricebender
Copy link
Member

thanks for reporting. :) I will release a patch containing the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working postgres
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants