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

Implement workspaces generator. #14629

Merged
merged 7 commits into from
Apr 13, 2021
Merged

Conversation

mshima
Copy link
Member

@mshima mshima commented Apr 9, 2021

What workspaces generator provides?

  • An easy way to test Microservices, with npm scripts compatible with monolith applications.
  • A workflow at our main repository for regressions and diff.
  • It will allow to improve gateway/microservices generation.
  • It will allow to improve our GitHub Actions cache.

Closes #14272


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@mshima
Copy link
Member Author

mshima commented Apr 10, 2021

blog-store test is failing due to a docker-compose regression related to #14563.

run: echo "127.0.0.1 keycloak" | sudo tee -a /etc/hosts
- name: 'TESTS: packaging'
if: steps.tests-should-be-skipped.outputs.skip-tests != 'true'
run: npm run ci:e2e:package
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer to have package after test, because it is useless to package if tests failed lol

Copy link
Member Author

Choose a reason for hiding this comment

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

The main reason for the this change is that it prevents a webpack build and probably reduces some seconds from backend tests too.
I plan to do the same for every workflow:

  • Move package to be executed first
  • Switch from npm run ci:frontend:test to npm run webapp:test

The workflow runtime reduces 1'30-3 minutes, 15-20% of the runtime.

Copy link
Member Author

Choose a reason for hiding this comment

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

Reverted packaging to be after tests for now, if we are doing this change, let's do it later together.

});
} else {
this.warning('The generated application could not be committed to Git, as a Git repository could not be initialized.');
let commitMsg = `Initial version of ${this.jhipsterConfig.baseName} generated by JHipster-${this.jhipsterConfig.jhipsterVersion}`;
Copy link
Member

Choose a reason for hiding this comment

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

Not related to this PR, but I think our initial commit is not nice. We should include the package name from official NPM repo, something like generator-jhipster@7.0.1 so it can be easy to copy/paste etc
What do you think ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree.

@pascalgrimaud pascalgrimaud merged commit 0c69f5b into jhipster:main Apr 13, 2021
@mshima mshima deleted the workspaces branch April 20, 2021 15:39
@pascalgrimaud pascalgrimaud added this to the 7.1.0 milestone May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for microservices workspaces support.
3 participants