InvenTree icon indicating copy to clipboard operation
InvenTree copied to clipboard

[FR/P-UI] Release: Package

Open matmair opened this issue 2 years ago • 6 comments

Build Platform UI during package creation and include with release.

### Tasks
- [x] Build on all targets
- [x] Include in release
- [x] Cleanup enviroment (minimal footprin

matmair avatar Jul 18 '23 20:07 matmair

I would like to remove the possibility that users need to manually download the frontend bundle from GitHub - it is presenting problems with #7338.

I have 2 ideas for that:

  1. provide a proxy service that gets and caches frontend archives
  2. push new frontend archives to GitHub external storage like a s3 bucket

Both are trivial to build but add a bit of infrastructure. I would be willing to build and standup either solution. Thoughts @SchrodingersGat @wolflu05?

matmair avatar Jul 14 '24 01:07 matmair

@matmair can you explain why #7338 is happening and what either 1) or 2) is solving?

SchrodingersGat avatar Jul 14 '24 02:07 SchrodingersGat

#7338 is a mixture of 2 things: the script assumes that git is present (which isn’t required on package installations) and than would have to get the frontend package from GitHub. The second part is an issue because you need to manually download the frontend package from GitHub Artifacts for non-tagged commits - see https://github.com/inventree/InvenTree/blob/76f8a2ee9e42c383383c846b892d1874720ac089/tasks.py#L1345

All non-tagged versions need to manually get the frontend on bare metal or package installer methods. This was fine with PUI being in dev but it being the main UI this will break deployments. So we need a way to get the frontend without manual intervention. This can be done by either 1 or 2.

matmair avatar Jul 14 '24 12:07 matmair

I would be fine with both options, but if we choose the first, we need to know that gh artifacts are deleted after 90 days, which means that we could only provide builds for the users for the last 90 days. If they want to use an older version, they need to build them their self (is currently already the case).

wolflu05 avatar Jul 14 '24 15:07 wolflu05

I have created a PR that shows where the current way is limited: https://github.com/inventree/InvenTree/pull/7655 Important info: The package build context does not have a way to pass tokens in - so it can only use publicly available resources during the build process

matmair avatar Jul 15 '24 06:07 matmair

This will have to be pushed back. I have privately tested 2 but it will take to long too get this into 0.16.0

matmair avatar Aug 09 '24 07:08 matmair

This works for release builds, maybe in the future there could be a warning if a build does not include PUI.

matmair avatar Nov 12 '24 11:11 matmair