Code Monkey home page Code Monkey logo

sitregcapm's People

Contributors

balbinosoares avatar dependabot[bot] avatar dusansacha avatar gregorwolf avatar lechnerc77 avatar mattiastrr avatar nabheetcloud avatar thulium3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sitregcapm's Issues

[Roadmap] SITreg using the SAP Cloud Application Programming Model

  • Project setup
  • Invite contributors
  • Add get started to readme
  • Build admin service containing all entities including tests and business logic
  • Implement organizer service with business logic and tests
  • Add authentication
  • Implement participant service with business logic and tests
  • Implement public service with business logic and tests
  • Implement receptionist service with business logic and tests

no such table error after upgrade to 3.5.2

I've just run an npm install and also npm i -g @sap/cds to get me to the latest cds version. Running cds --version returns:

@sap/cds: 3.5.2
@sap/cds-compiler: 1.8.1
@sap/cds-ql: 1.5.1
@sap/cds-hana: 1.5.1
@sap/cds-sql: 1.5.1
@sap/cds-sqlite: 1.5.1
@sap/cds-reflect: 2.3.0
@sap/cds-services: 1.5.2
@sap/odata-server: 1.0.0
@sap/odata-commons: 1.0.0
@sap/generator-cds: 2.3.9

But when I now run a cds deploy and cds run I can all service endpoints except this two:

http://localhost:4004/organizer/EventTypes
http://localhost:4004/organizer/RelationsToSAP

For both the error

<error xmlns="http://docs.oasis-open.org/odata/ns/metadata">
<code>500</code>
<message>Internal Server Error</message>
</error>

is returned. In the console I see:

[2019-03-29T06:23:22.331Z | ERROR | 1232631]: An error occurred: SQLITE_ERROR: no such table: OrganizerService_EventTypes
[2019-03-29T06:28:23.944Z | ERROR | 1348642]: An error occurred: SQLITE_ERROR: no such table: OrganizerService_RelationsToSAP

When I look into the sqlite database I see that the view wasn't created as OrganizerService_RelationsToSAP but as OrganizerService_com_sap_sapmentors_sitregcapm_EventTypes:

Screenshot 2019-03-29 at 07 23 17

I would think that must be an issue with the sap.common.CodeList that is used for the entity EventTypes. Because the entity Organizers which just inherits from managed works fine and returns data at http://localhost:4004/organizer/Organizers.

Integration tests

Hello @balbinosoares @NabheetCloud @mattiastrr @lechnerc77,

thank you for all your contributions. Great to see them flowing in.

In SITreg I've created integration tests calling the OData API using users with the corresponding role assigned. I would like to follow this approach in CAPM too. What is the standard tool to run API tests in a NodeJS environment? Does SAP already posted some best practice?

In the next step we would also need to setup local authentication + authorizations to be able to test the different user roles.

Best regards
Gregor

Failed at the [email protected] install script on cf restage

Im trying do the setup xsuaa, but i receive this error in command cf restage.

Migração de app e os logs de rastreio ...
Downloading r_buildpack...
Downloading sap_java_buildpack_1_8_6...
Downloading ruby_buildpack...
Downloading sap_java_buildpack...
Downloading sap_java_buildpack_1_8_5...
Downloaded sap_java_buildpack
Downloading java_buildpack...
Downloaded r_buildpack
Downloading staticfile_buildpack...
Downloaded ruby_buildpack
Downloading php_buildpack...
Downloaded sap_java_buildpack_1_8_6
Downloading dotnet_core_buildpack...
Downloaded java_buildpack
Downloading nodejs_buildpack...
Downloaded staticfile_buildpack
Downloading go_buildpack...
Downloaded dotnet_core_buildpack
Downloading python_buildpack...
Downloaded php_buildpack
Downloading binary_buildpack...
Downloaded sap_java_buildpack_1_8_5
Downloading sap_java_buildpack_1_9_0...
Downloaded nodejs_buildpack
Downloading nginx_buildpack...
Downloaded go_buildpack
Downloaded python_buildpack
Downloaded nginx_buildpack
Downloaded binary_buildpack
Downloaded sap_java_buildpack_1_9_0
Cell 8b53837e-af98-4f02-a020-b4ecff63fb41 creating container for instance 4aa6b4af-fe32-417b-beff-96dfd501e708
Cell 8b53837e-af98-4f02-a020-b4ecff63fb41 successfully created container for instance 4aa6b4af-fe32-417b-beff-96dfd501e708
Downloading app package...
Downloaded app package (9.7M)
-----> Nodejs Buildpack version 1.6.43
-----> Installing binaries
engines.node (package.json): ^8.9
engines.npm (package.json): unspecified (use default)
-----> Installing node 8.15.0
Download [https://buildpacks.cloudfoundry.org/dependencies/node/node-8.15.0-linux-x64-cflinuxfs3-97413182.tgz]
Using default npm version: 6.4.1
-----> Installing yarn 1.13.0
Download [https://buildpacks.cloudfoundry.org/dependencies/yarn/yarn-1.13.0-any-stack-125d40eb.tar.gz]
Installed yarn 1.13.0
-----> Creating runtime environment
NODE_ENV=production
NODE_HOME=/tmp/contents818138679/deps/0/node
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_PRODUCTION=true
-----> Building dependencies
Prebuild detected (node_modules already exists)
Rebuilding any native modules
[email protected] install /tmp/app/node_modules/sqlite3
node-pre-gyp install --fallback-to-build
sh: 1: node-pre-gyp: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vcap/.npm/_logs/2019-04-10T20_56_34_216Z-debug.log
ERROR Unable to build dependencies: exit status 1
Failed to compile droplet: Failed to run all supply scripts: exit status 14
Exit status 223
Cell 8b53837e-af98-4f02-a020-b4ecff63fb41 stopping instance 4aa6b4af-fe32-417b-beff-96dfd501e708
Cell 8b53837e-af98-4f02-a020-b4ecff63fb41 destroying container for instance 4aa6b4af-fe32-417b-beff-96dfd501e708
Cell 8b53837e-af98-4f02-a020-b4ecff63fb41 successfully destroyed container for instance 4aa6b4af-fe32-417b-beff-96dfd501e708
Erro ao preparar aplicativo: App staging failed in the buildpack compile phase

Add explanation for db refresh in README

Can you elaborate on "Do not forget to refresh the local database whenever you changed the datamodel"?

Do you mean "Do not forget to initialize..." as you have to repeat the Initialize step whenever there was a change?

Start in Cloud Foundry fails with "key properties are not propagated" error

I've tried a deployment of the application to SAP CP - Cloud Foundry. But currently the srv fails to start and throws this errors:

[cds] - connect to datasource - hana:gen/csn.json
cds compile failed due to these errors...

 at gen/csn.json:9: Error: Entity "localized.AdminService.CoOrganizers" does not have a key: ODATA entities must have a key
 at gen/csn.json:9: Info: Key "events" has not been projected - key properties are not propagated (in entity:"localized.AdminService.CoOrganizers"/query:1)
 at gen/csn.json:114: Error: Entity "localized.AdminService.Devices" does not have a key: ODATA entities must have a key
 at gen/csn.json:114: Info: Key "events" has not been projected - key properties are not propagated (in entity:"localized.AdminService.Devices"/query:1)
 at gen/csn.json:2577: Error: Entity "localized.ParticipantService.CoOrganizers" does not have a key: ODATA entities must have a key
 at gen/csn.json:2577: Info: Key "events" has not been projected - key properties are not propagated (in entity:"localized.ParticipantService.CoOrganizers"/query:1)
 at gen/csn.json:2683: Error: Entity "localized.ParticipantService.Devices" does not have a key: ODATA entities must have a key
 at gen/csn.json:2683: Info: Key "events" has not been projected - key properties are not propagated (in entity:"localized.ParticipantService.Devices"/query:1)
 at gen/csn.json:3817: Error: Entity "localized.PublicService.CoOrganizers" does not have a key: ODATA entities must have a key
 at gen/csn.json:3817: Info: Key "events" has not been projected - key properties are not propagated (in entity:"localized.PublicService.CoOrganizers"/query:1)
 at gen/csn.json:3923: Error: Entity "localized.PublicService.Devices" does not have a key: ODATA entities must have a key
 at gen/csn.json:3923: Info: Key "events" has not been projected - key properties are not propagated (in entity:"localized.PublicService.Devices"/query:1)
 at gen/csn.json:4960: Error: Entity "localized.ReceptionistService.CoOrganizers" does not have a key: ODATA entities must have a key
 at gen/csn.json:4960: Info: Key "events" has not been projected - key properties are not propagated (in entity:"localized.ReceptionistService.CoOrganizers"/query:1)
 at gen/csn.json:5066: Error: Entity "localized.ReceptionistService.Devices" does not have a key: ODATA entities must have a key
 at gen/csn.json:5066: Info: Key "events" has not been projected - key properties are not propagated (in entity:"localized.ReceptionistService.Devices"/query:1)
 at gen/csn.json:7393: Info: Input CSN contains localization view definitions which are re-calculated

As the entities CoOrganizers and Devices are not localized it is especially strange.

Admin Service - Doubt related to admin services.

Hello

I believe we have all the entities created. The basic CRUD service comes by default. In existing XSC application we can see for ODataAdmin we only have events and participant points read only, is the rest of the admin stuff done at database level in existing app or i am missing something here?

Thanks
Nabheet

Error: Artifact "com.sap.sapmentors.sitregcapm.Ticket" has not been found

Get the following when trying to build master, probably related to #6 not being merged correctly

Error: CDS compilation failed
srv\admin-service.cds:12:44-50: Error: Artifact "com.sap.sapmentors.sitregcapm.Ticket" has not been found (in entity:"AdminService.Tickets")
    at handleMessages (C:\Users\matti\Documents\Git\sitregcapm\node_modules\@sap\cds-compiler\lib\base\messages.js:119:13)
    at compileDo (C:\Users\matti\Documents\Git\sitregcapm\node_modules\@sap\cds-compiler\lib\main.js:476:3)
    at C:\Users\matti\Documents\Git\sitregcapm\node_modules\@sap\cds-compiler\lib\main.js:162:12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.