#49999 Integrate React structure into cockpit-389-ds
Closed: wontfix 5 years ago Opened 5 years ago by spichugi.

Issue Description

We should implement the Cockpit requirements according to
https://cockpit-project.org/blog/cockpit-starter-kit.html
It will make DS UI faster, safer and easier to maintain and test.


Metadata Update from @spichugi:
- Custom field component adjusted to None
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None
- Custom field type adjusted to None
- Custom field version adjusted to None

5 years ago

A few issues I noticed....

After running "make install" the content of these two directories is the same:

/usr/share/cockpit/389-console/
/usr/share/cockpit/389-console/dist/ <--- this should not be here, right?

Also I thought all the css/js files were supposed to get "minimalized", but they are intact.

A few issues I noticed....
After running "make install" the content of these two directories is the same:
/usr/share/cockpit/389-console/
/usr/share/cockpit/389-console/dist/ <--- this should not be here, right?

Weird, I thought I fixed the issue. Could you please clean it and run with the new rebase?

Also I thought all the css/js files were supposed to get "minimalized", but they are intact.

All HTML, CSS and some static will go away eventually, but it will stay for now while we haven't ported the code (basically, *.jsx files will have both HTML and JS logic inside)
It is how React works. I'll describe in more details on the share knowledge session.

Having issues building on Fedora:

...
...
make  install-data-hook
make[3]: Entering directory '/builddir/build/BUILD/389-ds-base-1.4.0.19'
if [ "." != "." ]; then cp -r ./src/cockpit src ; fi
mkdir -p /builddir/build/BUILDROOT/389-ds-base-1.4.0.19-1.fc30.x86_64/usr/share/cockpit/389-console
rsync -rupE src/cockpit/389-console/cockpit_dist/ /builddir/build/BUILDROOT/389-ds-base-1.4.0.19-1.fc30.x86_64/usr/share/cockpit/389-console
rsync: change_dir "/builddir/build/BUILD/389-ds-base-1.4.0.19//src/cockpit/389-console/cockpit_dist" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]

Having issues building on Fedora:
...
...
make install-data-hook
make[3]: Entering directory '/builddir/build/BUILD/389-ds-base-1.4.0.19'
if [ "." != "." ]; then cp -r ./src/cockpit src ; fi
mkdir -p /builddir/build/BUILDROOT/389-ds-base-1.4.0.19-1.fc30.x86_64/usr/share/cockpit/389-console
rsync -rupE src/cockpit/389-console/cockpit_dist/ /builddir/build/BUILDROOT/389-ds-base-1.4.0.19-1.fc30.x86_64/usr/share/cockpit/389-console
rsync: change_dir "/builddir/build/BUILD/389-ds-base-1.4.0.19//src/cockpit/389-console/cockpit_dist" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]

Note - this happens upstream when doing a koji scratch build

Looks like we have a problem with npm. I was worried about this before, but you said it was common practice, but I don't see cockpit doing any find of npm during its build process.

Note - 389's rpm.mk is not used when doing upstream or downstream builds.

So I tried explicitly adding what was in node_module.mk to the spec file, and it fails:

+ make -f node_modules.mk install
test -f node_modules/webpack || npm install
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/@babel%2fpolyfill failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR!     /builddir/.npm/_logs/2018-11-01T19_23_18_714Z-debug.log
make: *** [node_modules.mk:2: install] Error 1

So it would appear that we can not call "npm" during the rpm build process. I was worried about network connectivity during the rpm building. It works locally, but not upstream on koji build system:

https://kojipkgs.fedoraproject.org//work/tasks/8058/30598058/build.log

We might have to revert this commit until this gets figured out. :-(

Metadata Update from @spichugi:
- Custom field reviewstatus adjusted to review (was: None)

5 years ago

Metadata Update from @spichugi:
- Custom field reviewstatus adjusted to None (was: review)

5 years ago

Metadata Update from @spichugi:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

5 years ago

dist-bz2 should always generated everything from scratch and clean out cockpit_dist:

a3d35b9..3a1628f master -> master

Metadata Update from @mreynolds:
- Issue set to the milestone: 1.4.0 (was: 0.0 NEEDS_TRIAGE)

5 years ago

Similar to the previous comment - rpm.mk build-cockpit should clean cockpit_dist first

3a964c2..c20cb67 master -> master

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/3058

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: fixed)

3 years ago

Login to comment on this ticket.

Metadata