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

fix(cf-deploy-sub-generator): change where init and writing functions are executed, ensure end phase is not doing any writing #2961

Merged
merged 4 commits into from
Feb 27, 2025

Conversation

longieirl
Copy link
Contributor

Fix for #2960

  • changed where init and writing steps are executed when the cf-sub-gen is loaded as a subgenerator.
  • removed duplicate mta.save(), not required since the save is only doing a cleanup of any tmp files and the mta.yaml is already written
  • added unit tests

@longieirl longieirl self-assigned this Feb 26, 2025
Copy link

changeset-bot bot commented Feb 26, 2025

🦋 Changeset detected

Latest commit: 07b9972

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@sap-ux/cf-deploy-config-sub-generator Patch
@sap-ux/cf-deploy-config-writer Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@longieirl
Copy link
Contributor Author

longieirl commented Feb 26, 2025

Generated output from changes;

[2025-02-26 14:23:57] DEBUG: Initializing telemetry in CF deployment configuration generator
          [2025-02-26 14:23:58] INFO: Preparing Fiori Freestyle templates took 1 milliseconds.
          [2025-02-26 14:23:58] INFO: Writing Fiori Freestyle files from template took 73 milliseconds.
          [2025-02-26 14:23:59] DEBUG: Generate app configuration using: 
 {"appPath":"/home/user/.node_modules_global/lib/node_modules/project8","destinationName":"NONE","addManagedAppRouter":true,"addMtaDestination":false,"lcapMode":false,"isMtaRoot":false,"rootPath":"/home/user/.node_modules_global/lib/node_modules/project8","destinationAuthentication":"NotAvailable","isDestinationFullUrl":false,"isCap":false,"appId":"project8"}
          [2025-02-26 14:23:59] DEBUG: MTA Configuration created /home/user/.node_modules_global/lib/node_modules/project8.
          [2025-02-26 14:23:59] DEBUG: MTA resources loaded
          [2025-02-26 14:23:59] DEBUG: MTA modules loaded
          [2025-02-26 14:23:59] INFO: Read mta.yaml with prefix project8
          [2025-02-26 14:23:59] DEBUG: MTA Configuration has been saved.
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/ui5.yaml
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/ui5-deploy.yaml
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/.gitignore
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/package.json
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/ui5-local.yaml
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/Component.js
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/index.html
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/manifest.json
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/i18n/i18n.properties
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/test/locate-reuse-libs.js
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/model/models.js
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/test/flpSandbox.html
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/controller/App.controller.js
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/css/style.css
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/view/App.view.xml
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/view/View1.view.xml
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/controller/View1.controller.js
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/test/integration/AllJourneys.js
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/test/integration/NavigationJourney.js
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/test/integration/arrangements/Startup.js
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/test/integration/opaTests.qunit.html
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/test/integration/opaTests.qunit.js
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/test/integration/pages/App.js
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/test/integration/pages/View1.js
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/test/testsuite.qunit.html
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/test/testsuite.qunit.js
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/test/unit/AllTests.js
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/test/unit/controller/View1.controller.js
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/test/unit/unitTests.qunit.html
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/webapp/test/unit/unitTests.qunit.js
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/README.md
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/xs-security.json
   create ../../../home/user/.node_modules_global/lib/node_modules/project8/xs-app.json
          
No change to package.json was detected. No package manager install will be executed.
          [2025-02-26 14:23:59] INFO: Installing dependencies...
          [2025-02-26 14:23:59] INFO: Running: `npm install`
          [2025-02-26 14:24:09] INFO: npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
          [2025-02-26 14:24:09] INFO: npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
          [2025-02-26 14:24:09] INFO: npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
          [2025-02-26 14:24:09] INFO: npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
          [2025-02-26 14:24:09] INFO: npm warn deprecated [email protected]: This package is no longer supported.
          [2025-02-26 14:24:09] INFO: npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead
          [2025-02-26 14:24:09] INFO: npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
          [2025-02-26 14:24:09] INFO: npm warn deprecated [email protected]: This package is no longer supported.
          [2025-02-26 14:24:09] INFO: npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated @ui5/[email protected]: UI5 Tooling version 1 and below are out of maintenance. Migrate your project to the latest version: https://sap.github.io/ui5-tooling/stable/
          [2025-02-26 14:24:09] INFO: npm warn deprecated [email protected]: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
          [2025-02-26 14:24:09] INFO: npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead
          [2025-02-26 14:24:10] INFO: npm warn deprecated [email protected]: This package is no longer supported.
          [2025-02-26 14:24:10] INFO: npm warn deprecated @xmldom/[email protected]: this version has critical issues, please update to the latest version
          [2025-02-26 14:24:10] INFO: npm warn deprecated @ui5/[email protected]: UI5 Tooling version 1 and below are out of maintenance. Migrate your project to the latest version: https://sap.github.io/ui5-tooling/stable/
          [2025-02-26 14:24:11] INFO: npm warn deprecated [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options.
          [2025-02-26 14:24:12] INFO: added 1233 packages, and audited 1234 packages in 13s

186 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
          [2025-02-26 14:24:13] DEBUG: Project dependencies installed in 14 seconds
          [2025-02-26 14:24:15] INFO: To start the server, launch a terminal and browse to the project8 folder and type npm start
          [2025-02-26 14:24:15] INFO: Application generated successfully, available at /home/user/.node_modules_global/lib/node_modules/project8
          [2025-02-26 14:24:15] INFO: Total time taken: 17 seconds.
    force ../../../home/user/.node_modules_global/lib/node_modules/.vscode/launch.json
          [2025-02-26 14:24:25] INFO: Trying to execute command after app generation: sap.ux.application.generated.handler

Copy link
Contributor

@IainSAP IainSAP left a comment

Choose a reason for hiding this comment

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

Thanks @longieirl

  • Moving to writing seems appropriate
  • Tests updated
  • Not tested locally

@longieirl longieirl changed the title fix(cf-deploy-sub-generator): change where inti and writing functions are executed, ensure end phase is not doing any writing fix(cf-deploy-sub-generator): change where init and writing functions are executed, ensure end phase is not doing any writing Feb 26, 2025
@longieirl longieirl marked this pull request as ready for review February 26, 2025 17:15
Copy link
Contributor

@cianmSAP cianmSAP left a comment

Choose a reason for hiding this comment

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

Changes look good
One query
Not tested

@longieirl longieirl merged commit d0b656b into main Feb 27, 2025
16 checks passed
@longieirl longieirl deleted the 2960/change-writing-step branch February 27, 2025 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants