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

Issue 4927 - rebase lib389 and cockpit in 1.4.4 #4928

Merged
merged 1 commit into from Sep 20, 2021

Conversation

mreynolds389
Copy link
Contributor

Description:

389-ds-base-1.4.4 has somehow become out of sync with critical fixes in lib389 and cockpit. It is too difficult to try and find which patches are missing. Instead we can just rebase the source code for lib389 and cockpit from branch 389-ds-base-2.0.

fixes: #4927

@jchapma
Copy link
Contributor

jchapma commented Sep 20, 2021

@mreynolds389
So I guess we clone this PR and play around with everything to see if there are any issues ?

@mreynolds389
Copy link
Contributor Author

@mreynolds389
So I guess we clone this PR and play around with everything to see if there are any issues ?

Really it just needs a sanity test. Make sure the UI and CLI still works. It shouldn't require a lot of testing since it's exactly what is in 389-ds-base-2.0.

@droideck
Copy link
Member

droideck commented Sep 20, 2021

Mock run fails for me... But also, the simple local run also fails with the same error.

Maybe I'm doing something wrong, I've checked out to 389-ds-base-1.4.4, pulled changes, and then applied the patch - https://github.com/389ds/389-ds-base/pull/4928.patch

❯ ./buildAndRun.sh 

Cleaning and installing npm packages ...

npm WARN prepare removing existing node_modules/ before installation

Building and watching ...
ERROR in ./src/ds.jsx
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: /home/droideck/src/ds/up/src/cockpit/389-console/src/ds.jsx: Support for the experimental syntax 'jsx' isn't currently enabled (38:9):

  36 | const staticStates = {
  37 |     noPackage: (
> 38 |         <TextContent>
     |         ^
  39 |             <Text className="ds-margin-top-xlg" component={TextVariants.h2}>
  40 |                 There is no <b>389-ds-base</b> package installed on this system. Sorry there is nothing
  41 |                 to manage...

Add @babel/preset-react (https://git.io/JfeDR) to the 'presets' section of your Babel config to enable transformation.
If you want to leave it as-is, add @babel/plugin-syntax-jsx (https://git.io/vb4yA) to the 'plugins' section to enable parsing.
    at Parser._raise (/home/droideck/src/ds/up/src/cockpit/389-console/node_modules/@babel/parser/lib/index.js:798:17)
    at Parser.raiseWithData (/home/droideck/src/ds/up/src/cockpit/389-console/node_modules/@babel/parser/lib/index.js:791:17)
    at Parser.expectOnePlugin (/home/droideck/src/ds/up/src/cockpit/389-console/node_modules/@babel/parser/lib/index.js:3272:18)
    at Parser.parseExprAtom (/home/droideck/src/ds/up/src/cockpit/389-console/node_modules/@babel/parser/lib/index.js:11514:20)
    at Parser.parseExprSubscripts (/home/droideck/src/ds/up/src/cockpit/389-console/node_modules/@babel/parser/lib/index.js:11081:23)
    at Parser.parseUpdate (/home/droideck/src/ds/up/src/cockpit/389-console/node_modules/@babel/parser/lib/index.js:11061:21)
    at Parser.parseMaybeUnary (/home/droideck/src/ds/up/src/cockpit/389-console/node_modules/@babel/parser/lib/index.js:11039:23)
    at Parser.parseExprOps (/home/droideck/src/ds/up/src/cockpit/389-console/node_modules/@babel/parser/lib/index.js:10882:23)
    at Parser.parseMaybeConditional (/home/droideck/src/ds/up/src/cockpit/389-console/node_modules/@babel/parser/lib/index.js:10856:23)
    at Parser.parseMaybeAssign (/home/droideck/src/ds/up/src/cockpit/389-console/node_modules/@babel/parser/lib/index.js:10814:21)

ERROR in ./src/index.es6 1:0-41
Module not found: Error: Can't resolve './css/patternfly-4-cockpit.scss' in '/home/droideck/src/ds/up/src/cockpit/389-console/src'

ERROR in 
/home/droideck/src/ds/up/src/cockpit/389-console/src/ds.jsx
  0:0  error  Parsing error: No Babel config file detected for /home/droideck/src/ds/up/src/cockpit/389-console/src/ds.jsx. Either disable config file checking with requireConfigFile: false, or configure Babel so that it can find the config files

✖ 1 problem (1 error, 0 warnings)


webpack compiled with 3 errors

@mreynolds389
Copy link
Contributor Author

It works for me:

[mareynol@fedora 389-console]$ ./buildAndRun.sh

Cleaning and installing npm packages ...

npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.

Building and watching ...
webpack compiled successfully

@mreynolds389
Copy link
Contributor Author

@droideck Ok, found the problem, a babel file was missing from the commit. Fixed now.

Description:  389-ds-base-1.4.4 has somehow become out of sync
              with critical fixes in lib389 and cockpit. It is
              too difficult to try and find which patches are
              missing. Instead we can just rebase the source
              code for lib389 and cockpit from branch 389-ds-base-2.0.

fixes: 389ds#4927

Reviewed by: spichugi & jchapman(Thanks!!)
Copy link
Member

@droideck droideck left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@mreynolds389 mreynolds389 merged commit 8127b3d into 389ds:389-ds-base-1.4.4 Sep 20, 2021
@mreynolds389 mreynolds389 deleted the issue4927 branch September 20, 2021 21:00
@jchapma
Copy link
Contributor

jchapma commented Sep 20, 2021

Had a run through, looks great to me. Better late than never :)

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.

None yet

3 participants