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

Allow production builds for UI packages #3269

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

caponetto
Copy link
Contributor

What changes were proposed in this pull request?

Targets in the Makefile that touch the UI building process now have prod and dev versions. The UI packages offer both dev and prod scripts but currently, we are using only the dev version, which is useful only for development, not for the production environment. The dev version is larger since source maps and unoptimized files for the UI packages are included. Now, the prod version does not include source maps, and the source is optimized for production.

❯ make help
build-ui-dev                   Build UI packages for development
build-ui-prod                  Build UI packages for production
clean                          Make a clean source tree and uninstall extensions
container-images               Build all container images
docs                           Build docs
elyra-image-env                Creates a conda env consisting of the dependencies used in images
install-all-dev                Build and install for development, including examples
install-all-prod               Build and install for production, including examples
install-dev                    Build and install for development
install-examples               Install example pipeline components
install-prod                   Build and install for production
install-server                 Build and install backend
lint                           Run linters
package-ui-dev                 Package UI for development
package-ui-prod                Package UI for production
publish-container-images       Publish all container images
release                        Build wheel file for release
test                           Run all tests (backend, frontend and cypress integration tests)
watch                          Watch packages. For use alongside jupyter lab --watch

Cherry-picked from ODH Elyra:

How was this pull request tested?

Build Elyra with both make clean install-all-dev and make clean install-all-prod, and check the resulting whl file size and contents.

Also the CI on my fork: https://github.com/caponetto/opendatahub-io-elyra/actions/runs/12582298698

Developer's Certificate of Origin 1.1

   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

Signed-off-by: Guilherme Caponetto <638737+caponetto@users.noreply.github.com>
Signed-off-by: Guilherme Caponetto <638737+caponetto@users.noreply.github.com>
@caponetto
Copy link
Contributor Author

cc @lresende (as I'm not able to assign reviewers)

@caponetto caponetto mentioned this pull request Jan 2, 2025
7 tasks
@caponetto caponetto requested a review from lresende January 2, 2025 18:19
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.

1 participant