Обсуждение: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

Поиск
Список
Период
Сортировка

[pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Matthew Kleiman
Дата:
Hi Hackers!

Don't panic, this patch is for AFTER 1.5 release. ;-)


0001-Bring-React-into-the-codebase.patch is an infrastructural change. This patch brings in the React.js library and all of the tools that are needed for us to use React code in this project. It includes a webpack bundler to package and minify our javascript, a js linter to help keep the javascript code clean, and the Grunt taskrunner to manage these tasks.

0002-Creates-query-history-list.patch replaces the existing history tab with a React-based history component. The current patch brings us to feature-parity with the current application. However, we plan on continuing work on the History tab as we discussed. This is the smallest digestible chunk of work that we could send as a committable patch after 1.5 is cut.

Next Steps for History Tab
We are continuing to improve the user experience of the history tab. We have a series of stories lined up that lead us towards a further redesigned history tab. As we add the right hand panel and each query metadata item to it, we will be removing each query metadata item from the list view accordingly. 

Here is the design from one of the later stories:
Inline image 1

Regards,
Shruti & Matt

Вложения

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Murtuza Zabuawala
Дата:
Hi Matt,

I'm on macOS(10.10.5) & not able to run pgAdmin4 through console/terminal (with virtual environment activated), earlier it used to work properly but after applying given two patches it started throwing error.

After applying the patch

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4$ python web/pgAdmin4.py

Starting pgAdmin 4. Please navigate to http://0.0.0.0:5050 in your browser.

/Library/Frameworks/Python.framework/Versions/3.5/Resources/Python.app/Contents/MacOS/Python: can't open file 'web/pgAdmin4.py': [Errno 2] No such file or directory

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4$ python --version

Python 3.5.0

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4$ python web/pgAdmin4.py

Starting pgAdmin 4. Please navigate to http://0.0.0.0:5050 in your browser.

/Library/Frameworks/Python.framework/Versions/3.5/Resources/Python.app/Contents/MacOS/Python: can't open file 'web/pgAdmin4.py': [Errno 2] No such file or directory

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4


 And when I removed the patch and try again then it started properly. 

After removing the patch

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4$ git pull

Already up-to-date.

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4$ python web/pgAdmin4.py

Starting pgAdmin 4. Please navigate to http://0.0.0.0:5050 in your browser.

Starting pgAdmin 4. Please navigate to http://0.0.0.0:5050 in your browser.


Let me know if I missed anything here.


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


On Tue, May 16, 2017 at 3:07 AM, Matthew Kleiman <mkleiman@pivotal.io> wrote:
Hi Hackers!

Don't panic, this patch is for AFTER 1.5 release. ;-)


0001-Bring-React-into-the-codebase.patch is an infrastructural change. This patch brings in the React.js library and all of the tools that are needed for us to use React code in this project. It includes a webpack bundler to package and minify our javascript, a js linter to help keep the javascript code clean, and the Grunt taskrunner to manage these tasks.

0002-Creates-query-history-list.patch replaces the existing history tab with a React-based history component. The current patch brings us to feature-parity with the current application. However, we plan on continuing work on the History tab as we discussed. This is the smallest digestible chunk of work that we could send as a committable patch after 1.5 is cut.

Next Steps for History Tab
We are continuing to improve the user experience of the history tab. We have a series of stories lined up that lead us towards a further redesigned history tab. As we add the right hand panel and each query metadata item to it, we will be removing each query metadata item from the list view accordingly. 

Here is the design from one of the later stories:
Inline image 1

Regards,
Shruti & Matt



--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Вложения

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
On my machine it aborts with:

2017-05-18 09:45:14,516: ERROR pgadmin: Unable to generate javascript
2017-05-18 09:45:14,516: ERROR pgadmin: To run the app ensure that grunt is installed globally and that yarn install command runs successfully
Traceback (most recent call last):
  File "pgadmin4.py", line 64, in <module>
    raise Exception("No generated javascript, aborting")
Exception: No generated javascript, aborting

I installed grunt both locally and globally, but it didn't help.

On Thu, May 18, 2017 at 7:13 AM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi Matt,

I'm on macOS(10.10.5) & not able to run pgAdmin4 through console/terminal (with virtual environment activated), earlier it used to work properly but after applying given two patches it started throwing error.

After applying the patch

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4$ python web/pgAdmin4.py

Starting pgAdmin 4. Please navigate to http://0.0.0.0:5050 in your browser.

/Library/Frameworks/Python.framework/Versions/3.5/Resources/Python.app/Contents/MacOS/Python: can't open file 'web/pgAdmin4.py': [Errno 2] No such file or directory

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4$ python --version

Python 3.5.0

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4$ python web/pgAdmin4.py

Starting pgAdmin 4. Please navigate to http://0.0.0.0:5050 in your browser.

/Library/Frameworks/Python.framework/Versions/3.5/Resources/Python.app/Contents/MacOS/Python: can't open file 'web/pgAdmin4.py': [Errno 2] No such file or directory

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4


 And when I removed the patch and try again then it started properly. 

After removing the patch

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4$ git pull

Already up-to-date.

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4$ python web/pgAdmin4.py

Starting pgAdmin 4. Please navigate to http://0.0.0.0:5050 in your browser.

Starting pgAdmin 4. Please navigate to http://0.0.0.0:5050 in your browser.


Let me know if I missed anything here.


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


On Tue, May 16, 2017 at 3:07 AM, Matthew Kleiman <mkleiman@pivotal.io> wrote:
Hi Hackers!

Don't panic, this patch is for AFTER 1.5 release. ;-)


0001-Bring-React-into-the-codebase.patch is an infrastructural change. This patch brings in the React.js library and all of the tools that are needed for us to use React code in this project. It includes a webpack bundler to package and minify our javascript, a js linter to help keep the javascript code clean, and the Grunt taskrunner to manage these tasks.

0002-Creates-query-history-list.patch replaces the existing history tab with a React-based history component. The current patch brings us to feature-parity with the current application. However, we plan on continuing work on the History tab as we discussed. This is the smallest digestible chunk of work that we could send as a committable patch after 1.5 is cut.

Next Steps for History Tab
We are continuing to improve the user experience of the history tab. We have a series of stories lined up that lead us towards a further redesigned history tab. As we add the right hand panel and each query metadata item to it, we will be removing each query metadata item from the list view accordingly. 

Here is the design from one of the later stories:
Inline image 1

Regards,
Shruti & Matt



--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers





--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Вложения

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Murtuza Zabuawala
Дата:

Go to 'pgadmin4/web' directory

Try running,

run 'yarn install'

(if you have installed globally)
then run 'grunt' 
OR
run './node_modules/grunt-cli/bin/grunt'


Then run pgAdmin4

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


On Thu, May 18, 2017 at 2:18 PM, Dave Page <dpage@pgadmin.org> wrote:
On my machine it aborts with:

2017-05-18 09:45:14,516: ERROR pgadmin: Unable to generate javascript
2017-05-18 09:45:14,516: ERROR pgadmin: To run the app ensure that grunt is installed globally and that yarn install command runs successfully
Traceback (most recent call last):
  File "pgadmin4.py", line 64, in <module>
    raise Exception("No generated javascript, aborting")
Exception: No generated javascript, aborting

I installed grunt both locally and globally, but it didn't help.

On Thu, May 18, 2017 at 7:13 AM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi Matt,

I'm on macOS(10.10.5) & not able to run pgAdmin4 through console/terminal (with virtual environment activated), earlier it used to work properly but after applying given two patches it started throwing error.

After applying the patch

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4$ python web/pgAdmin4.py

Starting pgAdmin 4. Please navigate to http://0.0.0.0:5050 in your browser.

/Library/Frameworks/Python.framework/Versions/3.5/Resources/Python.app/Contents/MacOS/Python: can't open file 'web/pgAdmin4.py': [Errno 2] No such file or directory

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4$ python --version

Python 3.5.0

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4$ python web/pgAdmin4.py

Starting pgAdmin 4. Please navigate to http://0.0.0.0:5050 in your browser.

/Library/Frameworks/Python.framework/Versions/3.5/Resources/Python.app/Contents/MacOS/Python: can't open file 'web/pgAdmin4.py': [Errno 2] No such file or directory

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4


 And when I removed the patch and try again then it started properly. 

After removing the patch

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4$ git pull

Already up-to-date.

(venv_pg4) murtuza@Laptop217:~/Documents/projects/pgadmin4$ python web/pgAdmin4.py

Starting pgAdmin 4. Please navigate to http://0.0.0.0:5050 in your browser.

Starting pgAdmin 4. Please navigate to http://0.0.0.0:5050 in your browser.


Let me know if I missed anything here.


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


On Tue, May 16, 2017 at 3:07 AM, Matthew Kleiman <mkleiman@pivotal.io> wrote:
Hi Hackers!

Don't panic, this patch is for AFTER 1.5 release. ;-)


0001-Bring-React-into-the-codebase.patch is an infrastructural change. This patch brings in the React.js library and all of the tools that are needed for us to use React code in this project. It includes a webpack bundler to package and minify our javascript, a js linter to help keep the javascript code clean, and the Grunt taskrunner to manage these tasks.

0002-Creates-query-history-list.patch replaces the existing history tab with a React-based history component. The current patch brings us to feature-parity with the current application. However, we plan on continuing work on the History tab as we discussed. This is the smallest digestible chunk of work that we could send as a committable patch after 1.5 is cut.

Next Steps for History Tab
We are continuing to improve the user experience of the history tab. We have a series of stories lined up that lead us towards a further redesigned history tab. As we add the right hand panel and each query metadata item to it, we will be removing each query metadata item from the list view accordingly. 

Here is the design from one of the later stories:
Inline image 1

Regards,
Shruti & Matt



--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers





--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Вложения

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
Hi

On Thu, May 18, 2017 at 9:56 AM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:

Go to 'pgadmin4/web' directory

Try running,

run 'yarn install'

(if you have installed globally)
then run 'grunt' 
OR
run './node_modules/grunt-cli/bin/grunt'


Then run pgAdmin4

OK, that worked - though pgAdmin now takes a lot longer to start up, which is a problem.

The Jasmine tests now fail:

(pgadmin4)piranha:web dpage$ yarn run karma start --single-run
yarn run v0.24.4
$ "/Users/dpage/git/pgadmin4/web/node_modules/.bin/karma" start
18 05 2017 10:22:01.182:ERROR [plugin]: Error during loading "karma-phantomjs-launcher" plugin:
  Path must be a string. Received null

webpack: Compiled successfully.
webpack: Compiling...
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
(node:12214) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
18 05 2017 10:22:07.281:WARN [karma]: No captured browser, open http://localhost:9876/

webpack: Compiled successfully.
18 05 2017 10:22:07.294:ERROR [karma]: Found 1 load error
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Matthew Kleiman
Дата:
Dave,

Can you try running grunt tests on the command line? 

The tests task will run the eslint and karma grunt tasks, which should automatically webpack the React components before running the jasmine tests in karma.

If it still fails, send us the output of that.

Thanks,
Matt

On Thu, May 18, 2017 at 5:31 AM Dave Page <dpage@pgadmin.org> wrote:
Hi

On Thu, May 18, 2017 at 9:56 AM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:

Go to 'pgadmin4/web' directory

Try running,

run 'yarn install'

(if you have installed globally)
then run 'grunt' 
OR
run './node_modules/grunt-cli/bin/grunt'


Then run pgAdmin4

OK, that worked - though pgAdmin now takes a lot longer to start up, which is a problem.

The Jasmine tests now fail:

(pgadmin4)piranha:web dpage$ yarn run karma start --single-run
yarn run v0.24.4
$ "/Users/dpage/git/pgadmin4/web/node_modules/.bin/karma" start
18 05 2017 10:22:01.182:ERROR [plugin]: Error during loading "karma-phantomjs-launcher" plugin:
  Path must be a string. Received null

webpack: Compiled successfully.
webpack: Compiling...
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
webpack: wait until bundle finished: 
(node:12214) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
18 05 2017 10:22:07.281:WARN [karma]: No captured browser, open http://localhost:9876/

webpack: Compiled successfully.
18 05 2017 10:22:07.294:ERROR [karma]: Found 1 load error
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
On Thu, May 18, 2017 at 4:37 PM, Matthew Kleiman <mkleiman@pivotal.io> wrote:
> Dave,
>
> Can you try running grunt tests on the command line?
>
> The tests task will run the eslint and karma grunt tasks, which should
> automatically webpack the React components before running the jasmine tests
> in karma.
>
> If it still fails, send us the output of that.

(pgadmin4)piranha:web dpage$ grunt tests
Running "eslint:target" (eslint) task

Running "karma:unit" (karma) task
19 05 2017 15:26:13.366:ERROR [plugin]: Error during loading
"karma-phantomjs-launcher" plugin:
  Path must be a string. Received null

webpack: Compiled successfully.
webpack: Compiling...
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
(node:66274) DeprecationWarning: loaderUtils.parseQuery() received a
non-string value which can be problematic, see
https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major
version of loader-utils.
19 05 2017 15:26:18.887:WARN [karma]: No captured browser, open
http://localhost:9876/

webpack: Compiled successfully.
19 05 2017 15:26:18.895:ERROR [karma]: Found 1 load error
Warning: Task "karma:unit" failed. Use --force to continue.

Aborted due to warnings.


:-(

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Joao Pedro De Almeida Pereira
Дата:
Okay

Can you try removing web/node_modules and web/yarn.lock, and running
$ yarn install
$ grunt tests

We think this might be due to a bad version of phantomjs-prebuilt.

If that still fails, can you try running grunt as "yarn run grunt tests"?

Joao and George

On Fri, May 19, 2017 at 10:27 AM, Dave Page <dpage@pgadmin.org> wrote:
On Thu, May 18, 2017 at 4:37 PM, Matthew Kleiman <mkleiman@pivotal.io> wrote:
> Dave,
>
> Can you try running grunt tests on the command line?
>
> The tests task will run the eslint and karma grunt tasks, which should
> automatically webpack the React components before running the jasmine tests
> in karma.
>
> If it still fails, send us the output of that.

(pgadmin4)piranha:web dpage$ grunt tests
Running "eslint:target" (eslint) task

Running "karma:unit" (karma) task
19 05 2017 15:26:13.366:ERROR [plugin]: Error during loading
"karma-phantomjs-launcher" plugin:
  Path must be a string. Received null

webpack: Compiled successfully.
webpack: Compiling...
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
(node:66274) DeprecationWarning: loaderUtils.parseQuery() received a
non-string value which can be problematic, see
https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major
version of loader-utils.
19 05 2017 15:26:18.887:WARN [karma]: No captured browser, open
http://localhost:9876/

webpack: Compiled successfully.
19 05 2017 15:26:18.895:ERROR [karma]: Found 1 load error
Warning: Task "karma:unit" failed. Use --force to continue.

Aborted due to warnings.


:-(

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
On Tue, May 23, 2017 at 12:12 PM, Joao Pedro De Almeida Pereira
<jdealmeidapereira@pivotal.io> wrote:
> Okay
>
> Can you try removing web/node_modules and web/yarn.lock, and running
> $ yarn install
> $ grunt tests
>
> We think this might be due to a bad version of phantomjs-prebuilt.
>
> If that still fails, can you try running grunt as "yarn run grunt tests"?

I'm on a different machine now, and here grunt just seems to never
exit when it's doing anything. For example, I ran this a few minutes
ago, it finished in seconds and has been sitting here ever since:

(pgadmin4)snake:web dpage$ grunt tests
Running "eslint:target" (eslint) task

Running "karma:unit" (karma) task

webpack: Compiled successfully.
webpack: Compiling...
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
(node:4902) DeprecationWarning: loaderUtils.parseQuery() received a
non-string value which can be problematic, see
https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major
version of loader-utils.
23 05 2017 16:41:54.549:WARN [karma]: No captured browser, open
http://localhost:9876/

webpack: Compiled successfully.
PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 87 of 88 (skipped 1)
SUCCESS (1.353 secs / 1.328 secs)

I'm quite unimpressed with it so far :-(

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Matthew Kleiman
Дата:
Hi Dave,

This one is our bad! We didn't create a grunt task to run the tests only once, as you would in CI. grunt tests currently runs the tests and continues to watch for changes, running the tests again each time the source code is modified. We will create a task that is suitable to run in CI.

In the meantime, if you have any free time during the day today and would like to schedule a sync call with us, that would help us to tighten the feedback loop.

Thanks,
Joao & Matt

On Tue, May 23, 2017 at 4:44 PM, Dave Page <dpage@pgadmin.org> wrote:
On Tue, May 23, 2017 at 12:12 PM, Joao Pedro De Almeida Pereira
<jdealmeidapereira@pivotal.io> wrote:
> Okay
>
> Can you try removing web/node_modules and web/yarn.lock, and running
> $ yarn install
> $ grunt tests
>
> We think this might be due to a bad version of phantomjs-prebuilt.
>
> If that still fails, can you try running grunt as "yarn run grunt tests"?

I'm on a different machine now, and here grunt just seems to never
exit when it's doing anything. For example, I ran this a few minutes
ago, it finished in seconds and has been sitting here ever since:

(pgadmin4)snake:web dpage$ grunt tests
Running "eslint:target" (eslint) task

Running "karma:unit" (karma) task

webpack: Compiled successfully.
webpack: Compiling...
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
(node:4902) DeprecationWarning: loaderUtils.parseQuery() received a
non-string value which can be problematic, see
https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major
version of loader-utils.
23 05 2017 16:41:54.549:WARN [karma]: No captured browser, open
http://localhost:9876/

webpack: Compiled successfully.
PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 87 of 88 (skipped 1)
SUCCESS (1.353 secs / 1.328 secs)

I'm quite unimpressed with it so far :-(

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Joao Pedro De Almeida Pereira
Дата:
Hi Hackers!

Please find attached the two patches, now including a new grunt task to run the tests only once that can be used in CI.  For development, use grunt test, for ci or to run tests only once, use grunt test-ci.  This is documented in the README file.

Also note, these patches were generated using git diff as per https://www.pgadmin.org/docs/pgadmin4/dev/submitting_patches.html. Sorry for any inconvenience from generating a patch in an alternate manner earlier.

Thanks,
Joao & Matt

On Wed, May 24, 2017 at 9:36 AM, Matthew Kleiman <mkleiman@pivotal.io> wrote:
Hi Dave,

This one is our bad! We didn't create a grunt task to run the tests only once, as you would in CI. grunt tests currently runs the tests and continues to watch for changes, running the tests again each time the source code is modified. We will create a task that is suitable to run in CI.

In the meantime, if you have any free time during the day today and would like to schedule a sync call with us, that would help us to tighten the feedback loop.

Thanks,
Joao & Matt

On Tue, May 23, 2017 at 4:44 PM, Dave Page <dpage@pgadmin.org> wrote:
On Tue, May 23, 2017 at 12:12 PM, Joao Pedro De Almeida Pereira
<jdealmeidapereira@pivotal.io> wrote:
> Okay
>
> Can you try removing web/node_modules and web/yarn.lock, and running
> $ yarn install
> $ grunt tests
>
> We think this might be due to a bad version of phantomjs-prebuilt.
>
> If that still fails, can you try running grunt as "yarn run grunt tests"?

I'm on a different machine now, and here grunt just seems to never
exit when it's doing anything. For example, I ran this a few minutes
ago, it finished in seconds and has been sitting here ever since:

(pgadmin4)snake:web dpage$ grunt tests
Running "eslint:target" (eslint) task

Running "karma:unit" (karma) task

webpack: Compiled successfully.
webpack: Compiling...
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
(node:4902) DeprecationWarning: loaderUtils.parseQuery() received a
non-string value which can be problematic, see
https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major
version of loader-utils.
23 05 2017 16:41:54.549:WARN [karma]: No captured browser, open
http://localhost:9876/

webpack: Compiled successfully.
PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 87 of 88 (skipped 1)
SUCCESS (1.353 secs / 1.328 secs)

I'm quite unimpressed with it so far :-(

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Вложения

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
Hi

That fixed the JS tests, however, the feature tests are completely
broken now - the browser fails to load the app, so they just timeout:

======================================================================
ERROR: runTest (pgadmin.feature_tests.connect_to_server_feature_test.ConnectsToServerFeatureTest)
Test database connection
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 36, in setUp
    self.page.wait_for_app()
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 187, in wait_for_app
    self._wait_for("app to start", page_shows_app)
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 191, in _wait_for
    "Timed out waiting for " + waiting_for_message)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
line 80, in until
    raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for app to start


======================================================================
ERROR: runTest (pgadmin.feature_tests.copy_selected_query_results_feature_test.CopySelectedQueryResultsFeatureTest)
Test Copying Query Results
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 36, in setUp
    self.page.wait_for_app()
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 187, in wait_for_app
    self._wait_for("app to start", page_shows_app)
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 191, in _wait_for
    "Timed out waiting for " + waiting_for_message)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
line 80, in until
    raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for app to start


======================================================================
ERROR: runTest (pgadmin.feature_tests.pg_datatype_validation_test.PGDataypeFeatureTest)
Test checks for PG data-types output
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 36, in setUp
    self.page.wait_for_app()
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 187, in wait_for_app
    self._wait_for("app to start", page_shows_app)
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 191, in _wait_for
    "Timed out waiting for " + waiting_for_message)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
line 80, in until
    raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for app to start


======================================================================
ERROR: runTest (pgadmin.feature_tests.query_tool_journey_test.QueryToolJourneyTest)
Tests the path through the query tool
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 36, in setUp
    self.page.wait_for_app()
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 187, in wait_for_app
    self._wait_for("app to start", page_shows_app)
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 191, in _wait_for
    "Timed out waiting for " + waiting_for_message)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
line 80, in until
    raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for app to start


======================================================================
ERROR: runTest (pgadmin.feature_tests.table_ddl_feature_test.TableDdlFeatureTest)
Test table DDL generation
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 36, in setUp
    self.page.wait_for_app()
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 187, in wait_for_app
    self._wait_for("app to start", page_shows_app)
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 191, in _wait_for
    "Timed out waiting for " + waiting_for_message)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
line 80, in until
    raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for app to start


======================================================================
ERROR: runTest (pgadmin.feature_tests.xss_checks_panels_and_query_tool_test.CheckForXssFeatureTest)
Test XSS check for panels and query tool
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 36, in setUp
    self.page.wait_for_app()
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 187, in wait_for_app
    self._wait_for("app to start", page_shows_app)
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 191, in _wait_for
    "Timed out waiting for " + waiting_for_message)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
line 80, in until
    raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for app to start


======================================================================
ERROR: runTest (pgadmin.feature_tests.xss_checks_pgadmin_debugger_test.CheckDebuggerForXssFeatureTest)
Tests to check if Debugger is vulnerable to XSS
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 36, in setUp
    self.page.wait_for_app()
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 187, in wait_for_app
    self._wait_for("app to start", page_shows_app)
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 191, in _wait_for
    "Timed out waiting for " + waiting_for_message)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
line 80, in until
    raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for app to start


----------------------------------------------------------------------
Ran 166 tests in 113.200s

FAILED (errors=7, skipped=16)

=============Running the test cases for 'PostgreSQL 9.6'=============
runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_add.CastsAddTestCase)
Check Cast Node ... 2017-05-26 16:27:56,754: ERROR pgadmin: 'Mock'
object does not support item assignment
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
line 774, in connect
    server_types=ServerType.types()
  File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
line 309, in connect
    os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id)
TypeError: 'Mock' object does not support item assignment
FAIL
ERROR
runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_delete.CastsDeleteTestCase)
Check Cast Node ... 2017-05-26 16:27:56,840: ERROR pgadmin: 'Mock'
object does not support item assignment
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
line 774, in connect
    server_types=ServerType.types()
  File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
line 309, in connect
    os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id)
TypeError: 'Mock' object does not support item assignment
FAIL
ERROR
runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_get.CastsGetTestCase)
Check Cast Node ... Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/casts/tests/utils.py",
line 51, in create_cast
    " FUNCTION AS IMPLICIT" % (source_type, target_type))
ProgrammingError: cast from type money to type bigint already exists

2017-05-26 16:27:56,960: ERROR pgadmin: 'Mock' object does not support
item assignment
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
line 774, in connect
    server_types=ServerType.types()
  File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
line 309, in connect
    os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id)
TypeError: 'Mock' object does not support item assignment
FAIL
ERROR
runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_put.CastsPutTestCase)
Check Cast Node ... 2017-05-26 16:27:57,060: ERROR pgadmin: 'Mock'
object does not support item assignment
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
line 774, in connect
    server_types=ServerType.types()
  File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
line 309, in connect
    os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id)
TypeError: 'Mock' object does not support item assignment
FAIL
ERROR

On Wed, May 24, 2017 at 10:22 AM, Joao Pedro De Almeida Pereira
<jdealmeidapereira@pivotal.io> wrote:
> Hi Hackers!
>
> Please find attached the two patches, now including a new grunt task to run
> the tests only once that can be used in CI.  For development, use grunt
> test, for ci or to run tests only once, use grunt test-ci.  This is
> documented in the README file.
>
> Also note, these patches were generated using git diff as per
> https://www.pgadmin.org/docs/pgadmin4/dev/submitting_patches.html. Sorry for
> any inconvenience from generating a patch in an alternate manner earlier.
>
> Thanks,
> Joao & Matt
>
> On Wed, May 24, 2017 at 9:36 AM, Matthew Kleiman <mkleiman@pivotal.io>
> wrote:
>>
>> Hi Dave,
>>
>> This one is our bad! We didn't create a grunt task to run the tests only
>> once, as you would in CI. grunt tests currently runs the tests and continues
>> to watch for changes, running the tests again each time the source code is
>> modified. We will create a task that is suitable to run in CI.
>>
>> In the meantime, if you have any free time during the day today and would
>> like to schedule a sync call with us, that would help us to tighten the
>> feedback loop.
>>
>> Thanks,
>> Joao & Matt
>>
>> On Tue, May 23, 2017 at 4:44 PM, Dave Page <dpage@pgadmin.org> wrote:
>>>
>>> On Tue, May 23, 2017 at 12:12 PM, Joao Pedro De Almeida Pereira
>>> <jdealmeidapereira@pivotal.io> wrote:
>>> > Okay
>>> >
>>> > Can you try removing web/node_modules and web/yarn.lock, and running
>>> > $ yarn install
>>> > $ grunt tests
>>> >
>>> > We think this might be due to a bad version of phantomjs-prebuilt.
>>> >
>>> > If that still fails, can you try running grunt as "yarn run grunt
>>> > tests"?
>>>
>>> I'm on a different machine now, and here grunt just seems to never
>>> exit when it's doing anything. For example, I ran this a few minutes
>>> ago, it finished in seconds and has been sitting here ever since:
>>>
>>> (pgadmin4)snake:web dpage$ grunt tests
>>> Running "eslint:target" (eslint) task
>>>
>>> Running "karma:unit" (karma) task
>>>
>>> webpack: Compiled successfully.
>>> webpack: Compiling...
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> (node:4902) DeprecationWarning: loaderUtils.parseQuery() received a
>>> non-string value which can be problematic, see
>>> https://github.com/webpack/loader-utils/issues/56
>>> parseQuery() will be replaced with getOptions() in the next major
>>> version of loader-utils.
>>> 23 05 2017 16:41:54.549:WARN [karma]: No captured browser, open
>>> http://localhost:9876/
>>>
>>> webpack: Compiled successfully.
>>> PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 87 of 88 (skipped 1)
>>> SUCCESS (1.353 secs / 1.328 secs)
>>>
>>> I'm quite unimpressed with it so far :-(
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>
>>
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
George Gelashvili
Дата:
okay

We recreated the patches over new master.
Please apply the patches attached after "feature test timeouts" is merged into master, as that should resolve "waiting for app to start"

Thanks!
George and Joao

On Fri, May 26, 2017 at 4:39 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

That fixed the JS tests, however, the feature tests are completely
broken now - the browser fails to load the app, so they just timeout:

======================================================================
ERROR: runTest (pgadmin.feature_tests.connect_to_server_feature_test.ConnectsToServerFeatureTest)
Test database connection
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 36, in setUp
    self.page.wait_for_app()
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 187, in wait_for_app
    self._wait_for("app to start", page_shows_app)
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 191, in _wait_for
    "Timed out waiting for " + waiting_for_message)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
line 80, in until
    raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for app to start


======================================================================
ERROR: runTest (pgadmin.feature_tests.copy_selected_query_results_feature_test.CopySelectedQueryResultsFeatureTest)
Test Copying Query Results
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 36, in setUp
    self.page.wait_for_app()
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 187, in wait_for_app
    self._wait_for("app to start", page_shows_app)
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 191, in _wait_for
    "Timed out waiting for " + waiting_for_message)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
line 80, in until
    raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for app to start


======================================================================
ERROR: runTest (pgadmin.feature_tests.pg_datatype_validation_test.PGDataypeFeatureTest)
Test checks for PG data-types output
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 36, in setUp
    self.page.wait_for_app()
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 187, in wait_for_app
    self._wait_for("app to start", page_shows_app)
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 191, in _wait_for
    "Timed out waiting for " + waiting_for_message)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
line 80, in until
    raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for app to start


======================================================================
ERROR: runTest (pgadmin.feature_tests.query_tool_journey_test.QueryToolJourneyTest)
Tests the path through the query tool
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 36, in setUp
    self.page.wait_for_app()
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 187, in wait_for_app
    self._wait_for("app to start", page_shows_app)
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 191, in _wait_for
    "Timed out waiting for " + waiting_for_message)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
line 80, in until
    raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for app to start


======================================================================
ERROR: runTest (pgadmin.feature_tests.table_ddl_feature_test.TableDdlFeatureTest)
Test table DDL generation
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 36, in setUp
    self.page.wait_for_app()
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 187, in wait_for_app
    self._wait_for("app to start", page_shows_app)
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 191, in _wait_for
    "Timed out waiting for " + waiting_for_message)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
line 80, in until
    raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for app to start


======================================================================
ERROR: runTest (pgadmin.feature_tests.xss_checks_panels_and_query_tool_test.CheckForXssFeatureTest)
Test XSS check for panels and query tool
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 36, in setUp
    self.page.wait_for_app()
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 187, in wait_for_app
    self._wait_for("app to start", page_shows_app)
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 191, in _wait_for
    "Timed out waiting for " + waiting_for_message)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
line 80, in until
    raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for app to start


======================================================================
ERROR: runTest (pgadmin.feature_tests.xss_checks_pgadmin_debugger_test.CheckDebuggerForXssFeatureTest)
Tests to check if Debugger is vulnerable to XSS
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 36, in setUp
    self.page.wait_for_app()
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 187, in wait_for_app
    self._wait_for("app to start", page_shows_app)
  File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
line 191, in _wait_for
    "Timed out waiting for " + waiting_for_message)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
line 80, in until
    raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for app to start


----------------------------------------------------------------------
Ran 166 tests in 113.200s

FAILED (errors=7, skipped=16)

=============Running the test cases for 'PostgreSQL 9.6'=============
runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_add.CastsAddTestCase)
Check Cast Node ... 2017-05-26 16:27:56,754: ERROR pgadmin: 'Mock'
object does not support item assignment
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
line 774, in connect
    server_types=ServerType.types()
  File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
line 309, in connect
    os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id)
TypeError: 'Mock' object does not support item assignment
FAIL
ERROR
runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_delete.CastsDeleteTestCase)
Check Cast Node ... 2017-05-26 16:27:56,840: ERROR pgadmin: 'Mock'
object does not support item assignment
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
line 774, in connect
    server_types=ServerType.types()
  File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
line 309, in connect
    os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id)
TypeError: 'Mock' object does not support item assignment
FAIL
ERROR
runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_get.CastsGetTestCase)
Check Cast Node ... Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/casts/tests/utils.py",
line 51, in create_cast
    " FUNCTION AS IMPLICIT" % (source_type, target_type))
ProgrammingError: cast from type money to type bigint already exists

2017-05-26 16:27:56,960: ERROR pgadmin: 'Mock' object does not support
item assignment
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
line 774, in connect
    server_types=ServerType.types()
  File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
line 309, in connect
    os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id)
TypeError: 'Mock' object does not support item assignment
FAIL
ERROR
runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_put.CastsPutTestCase)
Check Cast Node ... 2017-05-26 16:27:57,060: ERROR pgadmin: 'Mock'
object does not support item assignment
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
line 774, in connect
    server_types=ServerType.types()
  File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
line 309, in connect
    os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id)
TypeError: 'Mock' object does not support item assignment
FAIL
ERROR

On Wed, May 24, 2017 at 10:22 AM, Joao Pedro De Almeida Pereira
<jdealmeidapereira@pivotal.io> wrote:
> Hi Hackers!
>
> Please find attached the two patches, now including a new grunt task to run
> the tests only once that can be used in CI.  For development, use grunt
> test, for ci or to run tests only once, use grunt test-ci.  This is
> documented in the README file.
>
> Also note, these patches were generated using git diff as per
> https://www.pgadmin.org/docs/pgadmin4/dev/submitting_patches.html. Sorry for
> any inconvenience from generating a patch in an alternate manner earlier.
>
> Thanks,
> Joao & Matt
>
> On Wed, May 24, 2017 at 9:36 AM, Matthew Kleiman <mkleiman@pivotal.io>
> wrote:
>>
>> Hi Dave,
>>
>> This one is our bad! We didn't create a grunt task to run the tests only
>> once, as you would in CI. grunt tests currently runs the tests and continues
>> to watch for changes, running the tests again each time the source code is
>> modified. We will create a task that is suitable to run in CI.
>>
>> In the meantime, if you have any free time during the day today and would
>> like to schedule a sync call with us, that would help us to tighten the
>> feedback loop.
>>
>> Thanks,
>> Joao & Matt
>>
>> On Tue, May 23, 2017 at 4:44 PM, Dave Page <dpage@pgadmin.org> wrote:
>>>
>>> On Tue, May 23, 2017 at 12:12 PM, Joao Pedro De Almeida Pereira
>>> <jdealmeidapereira@pivotal.io> wrote:
>>> > Okay
>>> >
>>> > Can you try removing web/node_modules and web/yarn.lock, and running
>>> > $ yarn install
>>> > $ grunt tests
>>> >
>>> > We think this might be due to a bad version of phantomjs-prebuilt.
>>> >
>>> > If that still fails, can you try running grunt as "yarn run grunt
>>> > tests"?
>>>
>>> I'm on a different machine now, and here grunt just seems to never
>>> exit when it's doing anything. For example, I ran this a few minutes
>>> ago, it finished in seconds and has been sitting here ever since:
>>>
>>> (pgadmin4)snake:web dpage$ grunt tests
>>> Running "eslint:target" (eslint) task
>>>
>>> Running "karma:unit" (karma) task
>>>
>>> webpack: Compiled successfully.
>>> webpack: Compiling...
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> webpack: wait until bundle finished:
>>> (node:4902) DeprecationWarning: loaderUtils.parseQuery() received a
>>> non-string value which can be problematic, see
>>> https://github.com/webpack/loader-utils/issues/56
>>> parseQuery() will be replaced with getOptions() in the next major
>>> version of loader-utils.
>>> 23 05 2017 16:41:54.549:WARN [karma]: No captured browser, open
>>> http://localhost:9876/
>>>
>>> webpack: Compiled successfully.
>>> PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 87 of 88 (skipped 1)
>>> SUCCESS (1.353 secs / 1.328 secs)
>>>
>>> I'm quite unimpressed with it so far :-(
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>
>>
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Вложения

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
Sorry guys - can you please remove the Grunt part of this until we've
decided whether or not we want to use it at all? (see the thread
discussing optimisation with Surinder).

For now, let's just drop the required packages into the vendor
directory. I'm happy to have that populated by yarn to avoid having
vendor code in the tree moving forwards.

On Fri, May 26, 2017 at 6:30 PM, George Gelashvili
<ggelashvili@pivotal.io> wrote:
> okay
>
> We recreated the patches over new master.
> Please apply the patches attached after "feature test timeouts" is merged
> into master, as that should resolve "waiting for app to start"
>
> Thanks!
> George and Joao
>
> On Fri, May 26, 2017 at 4:39 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi
>>
>> That fixed the JS tests, however, the feature tests are completely
>> broken now - the browser fails to load the app, so they just timeout:
>>
>> ======================================================================
>> ERROR: runTest
>> (pgadmin.feature_tests.connect_to_server_feature_test.ConnectsToServerFeatureTest)
>> Test database connection
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
>> line 36, in setUp
>>     self.page.wait_for_app()
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 187, in wait_for_app
>>     self._wait_for("app to start", page_shows_app)
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 191, in _wait_for
>>     "Timed out waiting for " + waiting_for_message)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
>> line 80, in until
>>     raise TimeoutException(message, screen, stacktrace)
>> TimeoutException: Message: Timed out waiting for app to start
>>
>>
>> ======================================================================
>> ERROR: runTest
>> (pgadmin.feature_tests.copy_selected_query_results_feature_test.CopySelectedQueryResultsFeatureTest)
>> Test Copying Query Results
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
>> line 36, in setUp
>>     self.page.wait_for_app()
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 187, in wait_for_app
>>     self._wait_for("app to start", page_shows_app)
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 191, in _wait_for
>>     "Timed out waiting for " + waiting_for_message)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
>> line 80, in until
>>     raise TimeoutException(message, screen, stacktrace)
>> TimeoutException: Message: Timed out waiting for app to start
>>
>>
>> ======================================================================
>> ERROR: runTest
>> (pgadmin.feature_tests.pg_datatype_validation_test.PGDataypeFeatureTest)
>> Test checks for PG data-types output
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
>> line 36, in setUp
>>     self.page.wait_for_app()
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 187, in wait_for_app
>>     self._wait_for("app to start", page_shows_app)
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 191, in _wait_for
>>     "Timed out waiting for " + waiting_for_message)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
>> line 80, in until
>>     raise TimeoutException(message, screen, stacktrace)
>> TimeoutException: Message: Timed out waiting for app to start
>>
>>
>> ======================================================================
>> ERROR: runTest
>> (pgadmin.feature_tests.query_tool_journey_test.QueryToolJourneyTest)
>> Tests the path through the query tool
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
>> line 36, in setUp
>>     self.page.wait_for_app()
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 187, in wait_for_app
>>     self._wait_for("app to start", page_shows_app)
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 191, in _wait_for
>>     "Timed out waiting for " + waiting_for_message)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
>> line 80, in until
>>     raise TimeoutException(message, screen, stacktrace)
>> TimeoutException: Message: Timed out waiting for app to start
>>
>>
>> ======================================================================
>> ERROR: runTest
>> (pgadmin.feature_tests.table_ddl_feature_test.TableDdlFeatureTest)
>> Test table DDL generation
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
>> line 36, in setUp
>>     self.page.wait_for_app()
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 187, in wait_for_app
>>     self._wait_for("app to start", page_shows_app)
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 191, in _wait_for
>>     "Timed out waiting for " + waiting_for_message)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
>> line 80, in until
>>     raise TimeoutException(message, screen, stacktrace)
>> TimeoutException: Message: Timed out waiting for app to start
>>
>>
>> ======================================================================
>> ERROR: runTest
>> (pgadmin.feature_tests.xss_checks_panels_and_query_tool_test.CheckForXssFeatureTest)
>> Test XSS check for panels and query tool
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
>> line 36, in setUp
>>     self.page.wait_for_app()
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 187, in wait_for_app
>>     self._wait_for("app to start", page_shows_app)
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 191, in _wait_for
>>     "Timed out waiting for " + waiting_for_message)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
>> line 80, in until
>>     raise TimeoutException(message, screen, stacktrace)
>> TimeoutException: Message: Timed out waiting for app to start
>>
>>
>> ======================================================================
>> ERROR: runTest
>> (pgadmin.feature_tests.xss_checks_pgadmin_debugger_test.CheckDebuggerForXssFeatureTest)
>> Tests to check if Debugger is vulnerable to XSS
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
>> line 36, in setUp
>>     self.page.wait_for_app()
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 187, in wait_for_app
>>     self._wait_for("app to start", page_shows_app)
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 191, in _wait_for
>>     "Timed out waiting for " + waiting_for_message)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
>> line 80, in until
>>     raise TimeoutException(message, screen, stacktrace)
>> TimeoutException: Message: Timed out waiting for app to start
>>
>>
>> ----------------------------------------------------------------------
>> Ran 166 tests in 113.200s
>>
>> FAILED (errors=7, skipped=16)
>>
>> =============Running the test cases for 'PostgreSQL 9.6'=============
>> runTest
>> (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_add.CastsAddTestCase)
>> Check Cast Node ... 2017-05-26 16:27:56,754: ERROR pgadmin: 'Mock'
>> object does not support item assignment
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
>> line 774, in connect
>>     server_types=ServerType.types()
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
>> line 309, in connect
>>     os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id)
>> TypeError: 'Mock' object does not support item assignment
>> FAIL
>> ERROR
>> runTest
>> (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_delete.CastsDeleteTestCase)
>> Check Cast Node ... 2017-05-26 16:27:56,840: ERROR pgadmin: 'Mock'
>> object does not support item assignment
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
>> line 774, in connect
>>     server_types=ServerType.types()
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
>> line 309, in connect
>>     os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id)
>> TypeError: 'Mock' object does not support item assignment
>> FAIL
>> ERROR
>> runTest
>> (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_get.CastsGetTestCase)
>> Check Cast Node ... Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/casts/tests/utils.py",
>> line 51, in create_cast
>>     " FUNCTION AS IMPLICIT" % (source_type, target_type))
>> ProgrammingError: cast from type money to type bigint already exists
>>
>> 2017-05-26 16:27:56,960: ERROR pgadmin: 'Mock' object does not support
>> item assignment
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
>> line 774, in connect
>>     server_types=ServerType.types()
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
>> line 309, in connect
>>     os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id)
>> TypeError: 'Mock' object does not support item assignment
>> FAIL
>> ERROR
>> runTest
>> (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_put.CastsPutTestCase)
>> Check Cast Node ... 2017-05-26 16:27:57,060: ERROR pgadmin: 'Mock'
>> object does not support item assignment
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
>> line 774, in connect
>>     server_types=ServerType.types()
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
>> line 309, in connect
>>     os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id)
>> TypeError: 'Mock' object does not support item assignment
>> FAIL
>> ERROR
>>
>> On Wed, May 24, 2017 at 10:22 AM, Joao Pedro De Almeida Pereira
>> <jdealmeidapereira@pivotal.io> wrote:
>> > Hi Hackers!
>> >
>> > Please find attached the two patches, now including a new grunt task to
>> > run
>> > the tests only once that can be used in CI.  For development, use grunt
>> > test, for ci or to run tests only once, use grunt test-ci.  This is
>> > documented in the README file.
>> >
>> > Also note, these patches were generated using git diff as per
>> > https://www.pgadmin.org/docs/pgadmin4/dev/submitting_patches.html. Sorry
>> > for
>> > any inconvenience from generating a patch in an alternate manner
>> > earlier.
>> >
>> > Thanks,
>> > Joao & Matt
>> >
>> > On Wed, May 24, 2017 at 9:36 AM, Matthew Kleiman <mkleiman@pivotal.io>
>> > wrote:
>> >>
>> >> Hi Dave,
>> >>
>> >> This one is our bad! We didn't create a grunt task to run the tests
>> >> only
>> >> once, as you would in CI. grunt tests currently runs the tests and
>> >> continues
>> >> to watch for changes, running the tests again each time the source code
>> >> is
>> >> modified. We will create a task that is suitable to run in CI.
>> >>
>> >> In the meantime, if you have any free time during the day today and
>> >> would
>> >> like to schedule a sync call with us, that would help us to tighten the
>> >> feedback loop.
>> >>
>> >> Thanks,
>> >> Joao & Matt
>> >>
>> >> On Tue, May 23, 2017 at 4:44 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>>
>> >>> On Tue, May 23, 2017 at 12:12 PM, Joao Pedro De Almeida Pereira
>> >>> <jdealmeidapereira@pivotal.io> wrote:
>> >>> > Okay
>> >>> >
>> >>> > Can you try removing web/node_modules and web/yarn.lock, and running
>> >>> > $ yarn install
>> >>> > $ grunt tests
>> >>> >
>> >>> > We think this might be due to a bad version of phantomjs-prebuilt.
>> >>> >
>> >>> > If that still fails, can you try running grunt as "yarn run grunt
>> >>> > tests"?
>> >>>
>> >>> I'm on a different machine now, and here grunt just seems to never
>> >>> exit when it's doing anything. For example, I ran this a few minutes
>> >>> ago, it finished in seconds and has been sitting here ever since:
>> >>>
>> >>> (pgadmin4)snake:web dpage$ grunt tests
>> >>> Running "eslint:target" (eslint) task
>> >>>
>> >>> Running "karma:unit" (karma) task
>> >>>
>> >>> webpack: Compiled successfully.
>> >>> webpack: Compiling...
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> (node:4902) DeprecationWarning: loaderUtils.parseQuery() received a
>> >>> non-string value which can be problematic, see
>> >>> https://github.com/webpack/loader-utils/issues/56
>> >>> parseQuery() will be replaced with getOptions() in the next major
>> >>> version of loader-utils.
>> >>> 23 05 2017 16:41:54.549:WARN [karma]: No captured browser, open
>> >>> http://localhost:9876/
>> >>>
>> >>> webpack: Compiled successfully.
>> >>> PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 87 of 88 (skipped 1)
>> >>> SUCCESS (1.353 secs / 1.328 secs)
>> >>>
>> >>> I'm quite unimpressed with it so far :-(
>> >>>
>> >>> --
>> >>> Dave Page
>> >>> Blog: http://pgsnake.blogspot.com
>> >>> Twitter: @pgsnake
>> >>>
>> >>> EnterpriseDB UK: http://www.enterprisedb.com
>> >>> The Enterprise PostgreSQL Company
>> >>
>> >>
>> >
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Matthew Kleiman
Дата:
Hi Dave,

We are currently using the Grunt taskrunner to run the following tasks:
  • lint the javascript code 
  • start javascript tests 
  • invoke webpack to transpile and bundle js and jsx files
  • minify javascript 
In order to remove Grunt from the application, we will need some other tool to execute these listed tasks.

There are other tools available, like Gulp.js, that we could use instead of Grunt. We would like to understand your motivation for removing Grunt so we can find a better solution.

Thanks,
Joao & Matt


On Sun, May 28, 2017 at 8:21 PM, Dave Page <dpage@pgadmin.org> wrote:
Sorry guys - can you please remove the Grunt part of this until we've
decided whether or not we want to use it at all? (see the thread
discussing optimisation with Surinder).

For now, let's just drop the required packages into the vendor
directory. I'm happy to have that populated by yarn to avoid having
vendor code in the tree moving forwards.

On Fri, May 26, 2017 at 6:30 PM, George Gelashvili
<ggelashvili@pivotal.io> wrote:
> okay
>
> We recreated the patches over new master.
> Please apply the patches attached after "feature test timeouts" is merged
> into master, as that should resolve "waiting for app to start"
>
> Thanks!
> George and Joao
>
> On Fri, May 26, 2017 at 4:39 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi
>>
>> That fixed the JS tests, however, the feature tests are completely
>> broken now - the browser fails to load the app, so they just timeout:
>>
>> ======================================================================
>> ERROR: runTest
>> (pgadmin.feature_tests.connect_to_server_feature_test.ConnectsToServerFeatureTest)
>> Test database connection
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
>> line 36, in setUp
>>     self.page.wait_for_app()
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 187, in wait_for_app
>>     self._wait_for("app to start", page_shows_app)
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 191, in _wait_for
>>     "Timed out waiting for " + waiting_for_message)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
>> line 80, in until
>>     raise TimeoutException(message, screen, stacktrace)
>> TimeoutException: Message: Timed out waiting for app to start
>>
>>
>> ======================================================================
>> ERROR: runTest
>> (pgadmin.feature_tests.copy_selected_query_results_feature_test.CopySelectedQueryResultsFeatureTest)
>> Test Copying Query Results
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
>> line 36, in setUp
>>     self.page.wait_for_app()
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 187, in wait_for_app
>>     self._wait_for("app to start", page_shows_app)
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 191, in _wait_for
>>     "Timed out waiting for " + waiting_for_message)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
>> line 80, in until
>>     raise TimeoutException(message, screen, stacktrace)
>> TimeoutException: Message: Timed out waiting for app to start
>>
>>
>> ======================================================================
>> ERROR: runTest
>> (pgadmin.feature_tests.pg_datatype_validation_test.PGDataypeFeatureTest)
>> Test checks for PG data-types output
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
>> line 36, in setUp
>>     self.page.wait_for_app()
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 187, in wait_for_app
>>     self._wait_for("app to start", page_shows_app)
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 191, in _wait_for
>>     "Timed out waiting for " + waiting_for_message)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
>> line 80, in until
>>     raise TimeoutException(message, screen, stacktrace)
>> TimeoutException: Message: Timed out waiting for app to start
>>
>>
>> ======================================================================
>> ERROR: runTest
>> (pgadmin.feature_tests.query_tool_journey_test.QueryToolJourneyTest)
>> Tests the path through the query tool
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
>> line 36, in setUp
>>     self.page.wait_for_app()
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 187, in wait_for_app
>>     self._wait_for("app to start", page_shows_app)
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 191, in _wait_for
>>     "Timed out waiting for " + waiting_for_message)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
>> line 80, in until
>>     raise TimeoutException(message, screen, stacktrace)
>> TimeoutException: Message: Timed out waiting for app to start
>>
>>
>> ======================================================================
>> ERROR: runTest
>> (pgadmin.feature_tests.table_ddl_feature_test.TableDdlFeatureTest)
>> Test table DDL generation
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
>> line 36, in setUp
>>     self.page.wait_for_app()
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 187, in wait_for_app
>>     self._wait_for("app to start", page_shows_app)
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 191, in _wait_for
>>     "Timed out waiting for " + waiting_for_message)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
>> line 80, in until
>>     raise TimeoutException(message, screen, stacktrace)
>> TimeoutException: Message: Timed out waiting for app to start
>>
>>
>> ======================================================================
>> ERROR: runTest
>> (pgadmin.feature_tests.xss_checks_panels_and_query_tool_test.CheckForXssFeatureTest)
>> Test XSS check for panels and query tool
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
>> line 36, in setUp
>>     self.page.wait_for_app()
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 187, in wait_for_app
>>     self._wait_for("app to start", page_shows_app)
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 191, in _wait_for
>>     "Timed out waiting for " + waiting_for_message)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
>> line 80, in until
>>     raise TimeoutException(message, screen, stacktrace)
>> TimeoutException: Message: Timed out waiting for app to start
>>
>>
>> ======================================================================
>> ERROR: runTest
>> (pgadmin.feature_tests.xss_checks_pgadmin_debugger_test.CheckDebuggerForXssFeatureTest)
>> Tests to check if Debugger is vulnerable to XSS
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
>> line 36, in setUp
>>     self.page.wait_for_app()
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 187, in wait_for_app
>>     self._wait_for("app to start", page_shows_app)
>>   File
>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>> line 191, in _wait_for
>>     "Timed out waiting for " + waiting_for_message)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
>> line 80, in until
>>     raise TimeoutException(message, screen, stacktrace)
>> TimeoutException: Message: Timed out waiting for app to start
>>
>>
>> ----------------------------------------------------------------------
>> Ran 166 tests in 113.200s
>>
>> FAILED (errors=7, skipped=16)
>>
>> =============Running the test cases for 'PostgreSQL 9.6'=============
>> runTest
>> (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_add.CastsAddTestCase)
>> Check Cast Node ... 2017-05-26 16:27:56,754: ERROR pgadmin: 'Mock'
>> object does not support item assignment
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
>> line 774, in connect
>>     server_types=ServerType.types()
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
>> line 309, in connect
>>     os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id)
>> TypeError: 'Mock' object does not support item assignment
>> FAIL
>> ERROR
>> runTest
>> (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_delete.CastsDeleteTestCase)
>> Check Cast Node ... 2017-05-26 16:27:56,840: ERROR pgadmin: 'Mock'
>> object does not support item assignment
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
>> line 774, in connect
>>     server_types=ServerType.types()
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
>> line 309, in connect
>>     os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id)
>> TypeError: 'Mock' object does not support item assignment
>> FAIL
>> ERROR
>> runTest
>> (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_get.CastsGetTestCase)
>> Check Cast Node ... Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/casts/tests/utils.py",
>> line 51, in create_cast
>>     " FUNCTION AS IMPLICIT" % (source_type, target_type))
>> ProgrammingError: cast from type money to type bigint already exists
>>
>> 2017-05-26 16:27:56,960: ERROR pgadmin: 'Mock' object does not support
>> item assignment
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
>> line 774, in connect
>>     server_types=ServerType.types()
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
>> line 309, in connect
>>     os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id)
>> TypeError: 'Mock' object does not support item assignment
>> FAIL
>> ERROR
>> runTest
>> (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_put.CastsPutTestCase)
>> Check Cast Node ... 2017-05-26 16:27:57,060: ERROR pgadmin: 'Mock'
>> object does not support item assignment
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
>> line 774, in connect
>>     server_types=ServerType.types()
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
>> line 309, in connect
>>     os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id)
>> TypeError: 'Mock' object does not support item assignment
>> FAIL
>> ERROR
>>
>> On Wed, May 24, 2017 at 10:22 AM, Joao Pedro De Almeida Pereira
>> <jdealmeidapereira@pivotal.io> wrote:
>> > Hi Hackers!
>> >
>> > Please find attached the two patches, now including a new grunt task to
>> > run
>> > the tests only once that can be used in CI.  For development, use grunt
>> > test, for ci or to run tests only once, use grunt test-ci.  This is
>> > documented in the README file.
>> >
>> > Also note, these patches were generated using git diff as per
>> > https://www.pgadmin.org/docs/pgadmin4/dev/submitting_patches.html. Sorry
>> > for
>> > any inconvenience from generating a patch in an alternate manner
>> > earlier.
>> >
>> > Thanks,
>> > Joao & Matt
>> >
>> > On Wed, May 24, 2017 at 9:36 AM, Matthew Kleiman <mkleiman@pivotal.io>
>> > wrote:
>> >>
>> >> Hi Dave,
>> >>
>> >> This one is our bad! We didn't create a grunt task to run the tests
>> >> only
>> >> once, as you would in CI. grunt tests currently runs the tests and
>> >> continues
>> >> to watch for changes, running the tests again each time the source code
>> >> is
>> >> modified. We will create a task that is suitable to run in CI.
>> >>
>> >> In the meantime, if you have any free time during the day today and
>> >> would
>> >> like to schedule a sync call with us, that would help us to tighten the
>> >> feedback loop.
>> >>
>> >> Thanks,
>> >> Joao & Matt
>> >>
>> >> On Tue, May 23, 2017 at 4:44 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>>
>> >>> On Tue, May 23, 2017 at 12:12 PM, Joao Pedro De Almeida Pereira
>> >>> <jdealmeidapereira@pivotal.io> wrote:
>> >>> > Okay
>> >>> >
>> >>> > Can you try removing web/node_modules and web/yarn.lock, and running
>> >>> > $ yarn install
>> >>> > $ grunt tests
>> >>> >
>> >>> > We think this might be due to a bad version of phantomjs-prebuilt.
>> >>> >
>> >>> > If that still fails, can you try running grunt as "yarn run grunt
>> >>> > tests"?
>> >>>
>> >>> I'm on a different machine now, and here grunt just seems to never
>> >>> exit when it's doing anything. For example, I ran this a few minutes
>> >>> ago, it finished in seconds and has been sitting here ever since:
>> >>>
>> >>> (pgadmin4)snake:web dpage$ grunt tests
>> >>> Running "eslint:target" (eslint) task
>> >>>
>> >>> Running "karma:unit" (karma) task
>> >>>
>> >>> webpack: Compiled successfully.
>> >>> webpack: Compiling...
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> webpack: wait until bundle finished:
>> >>> (node:4902) DeprecationWarning: loaderUtils.parseQuery() received a
>> >>> non-string value which can be problematic, see
>> >>> https://github.com/webpack/loader-utils/issues/56
>> >>> parseQuery() will be replaced with getOptions() in the next major
>> >>> version of loader-utils.
>> >>> 23 05 2017 16:41:54.549:WARN [karma]: No captured browser, open
>> >>> http://localhost:9876/
>> >>>
>> >>> webpack: Compiled successfully.
>> >>> PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 87 of 88 (skipped 1)
>> >>> SUCCESS (1.353 secs / 1.328 secs)
>> >>>
>> >>> I'm quite unimpressed with it so far :-(
>> >>>
>> >>> --
>> >>> Dave Page
>> >>> Blog: http://pgsnake.blogspot.com
>> >>> Twitter: @pgsnake
>> >>>
>> >>> EnterpriseDB UK: http://www.enterprisedb.com
>> >>> The Enterprise PostgreSQL Company
>> >>
>> >>
>> >
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
Hi

On Tue, May 30, 2017 at 2:47 PM, Matthew Kleiman <mkleiman@pivotal.io> wrote:
> Hi Dave,
>
> We are currently using the Grunt taskrunner to run the following tasks:
>
> lint the javascript code
> start javascript tests
> invoke webpack to transpile and bundle js and jsx files
> minify javascript
>
> In order to remove Grunt from the application, we will need some other tool
> to execute these listed tasks.
>
> There are other tools available, like Gulp.js, that we could use instead of
> Grunt. We would like to understand your motivation for removing Grunt so we
> can find a better solution.

The motivation is simple - we want a solution that works for the whole
app, can handle debug vs. release execution, pluggable modules, and
installations in read-only directories.

Per the other thread on the subject (that Joao suggested continuing
discussion on), Surinder is currently looking into flask-webpack. I
spent some time playing with grunt and some other options last week.

However; this patch is supposed to be about the history tab rewrite.
Whatever solution we use for webpacking/transpiling/linting/minifying
etc, it should be a standalone change as it's decidedly non-trivial.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Joao Pedro De Almeida Pereira
Дата:
The motivation is simple - we want a solution that works for the whole
app, can handle debug vs. release execution, pluggable modules, and
installations in read-only directories.
With the current configuration of Grunt, all the requirements you mention are available.
The tasks on Grunt should only be run under development or before we are creating the installer.

The installer should pick up only the bundled Javascript and should install it in the correct folders, this way there is no need to rewrite or process files in read-only directories of the end user machine.

Per the other thread on the subject (that Joao suggested continuing
discussion on), Surinder is currently looking into flask-webpack. I
spent some time playing with grunt and some other options last week.
We should continue the discussion about flask-webpack or Grunt or any other Build system in the other thread, but we need to have some decision because this patch needs a build system.
If we remove Grunt from this patch we will need to execute the following command every time the application run:

yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn run webpack -- --config webpack.config.js && python web/pgAdmin4

And to run the jasmine tests:

yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn run karma start

And to run the feature tests:

yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn run webpack -- --config webpack.config.js && python runtests.py

Is this a solution that is acceptable? 

However; this patch is supposed to be about the history tab rewrite.
Whatever solution we use for webpacking/transpiling/linting/minifying
etc, it should be a standalone change as it's decidedly non-trivial.
We split this patch into 2 different commits:
1 - Add React and all the tools needed to work with it, this includes Grunt, Webpack and ESLint
2 - Change the history tab

Do you want a single commit for each of the following? 
  React (just adds the React library via yarn)
  Webpack (adds Webpack library via yarn and creates the webpack.config.js)
  ESLint (adds ESLint library via yarn, creates .eslintrc config file, and corrects all lint errors that previously existed)
  Grunt (adds Grunt library via yarn and creates Gruntfile.js config, creating a pipeline of the previous three libraries/tasks)
  Our change to History

Thanks
Joao & Matt 

On Tue, May 30, 2017 at 10:10 AM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Tue, May 30, 2017 at 2:47 PM, Matthew Kleiman <mkleiman@pivotal.io> wrote:
> Hi Dave,
>
> We are currently using the Grunt taskrunner to run the following tasks:
>
> lint the javascript code
> start javascript tests
> invoke webpack to transpile and bundle js and jsx files
> minify javascript
>
> In order to remove Grunt from the application, we will need some other tool
> to execute these listed tasks.
>
> There are other tools available, like Gulp.js, that we could use instead of
> Grunt. We would like to understand your motivation for removing Grunt so we
> can find a better solution.

The motivation is simple - we want a solution that works for the whole
app, can handle debug vs. release execution, pluggable modules, and
installations in read-only directories.

Per the other thread on the subject (that Joao suggested continuing
discussion on), Surinder is currently looking into flask-webpack. I
spent some time playing with grunt and some other options last week.

However; this patch is supposed to be about the history tab rewrite.
Whatever solution we use for webpacking/transpiling/linting/minifying
etc, it should be a standalone change as it's decidedly non-trivial.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Surinder Kumar
Дата:
On Wed, May 31, 2017 at 12:01 AM, Joao Pedro De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:
The motivation is simple - we want a solution that works for the whole
app, can handle debug vs. release execution, pluggable modules, and
installations in read-only directories.
With the current configuration of Grunt, all the requirements you mention are available.
The tasks on Grunt should only be run under development or before we are creating the installer.


The installer should pick up only the bundled Javascript and should install it in the correct folders, this way there is no need to rewrite or process files in read-only directories of the end user machine.

Per the other thread on the subject (that Joao suggested continuing
discussion on), Surinder is currently looking into flask-webpack. I
spent some time playing with grunt and some other options last week.
We should continue the discussion about flask-webpack or Grunt or any other Build system in the other thread, but we need to have some decision because this patch needs a build system.
If we remove Grunt from this patch we will need to execute the following command every time the application run:

yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn run webpack -- --config webpack.config.js && python web/pgAdmin4

And to run the jasmine tests:

yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn run karma start

And to run the feature tests:

yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn run webpack -- --config webpack.config.js && python runtests.py

Is this a solution that is acceptable? 

As per my knowledge, Grunt can run the tasks and bundle the JS and CSS files (using r.js which is not preferred). But Webpack can not do both. It can only bundle files, it has to be used with either Grunt or Gulp to execute tasks.

Is it possible to run the task listed above by configuring them in "scripts" in package.json file and running concurrently ?

scripts: {
 "task-name1": "yarn run eslint filename",
​ ​
"task-name2": "yarn run karma start", so on...
}

and run them using following command:
npm run task-name1
 

However; this patch is supposed to be about the history tab rewrite.
Whatever solution we use for webpacking/transpiling/linting/minifying
etc, it should be a standalone change as it's decidedly non-trivial.
We split this patch into 2 different commits:
1 - Add React and all the tools needed to work with it, this includes Grunt, Webpack and ESLint
2 - Change the history tab

Do you want a single commit for each of the following? 
  React (just adds the React library via yarn)
  Webpack (adds Webpack library via yarn and creates the webpack.config.js)
  ESLint (adds ESLint library via yarn, creates .eslintrc config file, and corrects all lint errors that previously existed)
  Grunt (adds Grunt library via yarn and creates Gruntfile.js config, creating a pipeline of the previous three libraries/tasks)
  Our change to History

Thanks
Joao & Matt 

On Tue, May 30, 2017 at 10:10 AM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Tue, May 30, 2017 at 2:47 PM, Matthew Kleiman <mkleiman@pivotal.io> wrote:
> Hi Dave,
>
> We are currently using the Grunt taskrunner to run the following tasks:
>
> lint the javascript code
> start javascript tests
> invoke webpack to transpile and bundle js and jsx files
> minify javascript
>
> In order to remove Grunt from the application, we will need some other tool
> to execute these listed tasks.
>
> There are other tools available, like Gulp.js, that we could use instead of
> Grunt. We would like to understand your motivation for removing Grunt so we
> can find a better solution.

The motivation is simple - we want a solution that works for the whole
app, can handle debug vs. release execution, pluggable modules, and
installations in read-only directories.

Per the other thread on the subject (that Joao suggested continuing
discussion on), Surinder is currently looking into flask-webpack. I
spent some time playing with grunt and some other options last week.

However; this patch is supposed to be about the history tab rewrite.
Whatever solution we use for webpacking/transpiling/linting/minifying
etc, it should be a standalone change as it's decidedly non-trivial.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Matthew Kleiman
Дата:
Hey Surinder,

Is it possible to run the task listed above by configuring them in "scripts" in package.json file and running concurrently ?

That would be cleaner than what we proposed. We could use the yarn run feature to do just what you are suggesting. It works the same as in npm.
Something like the following:
In package.json - 
"scripts": {
  "linter": "eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js"
}


To call it on the command line -
yarn run linter

- Matt

On Wed, May 31, 2017 at 12:35 AM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:
On Wed, May 31, 2017 at 12:01 AM, Joao Pedro De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:
The motivation is simple - we want a solution that works for the whole
app, can handle debug vs. release execution, pluggable modules, and
installations in read-only directories.
With the current configuration of Grunt, all the requirements you mention are available.
The tasks on Grunt should only be run under development or before we are creating the installer.


The installer should pick up only the bundled Javascript and should install it in the correct folders, this way there is no need to rewrite or process files in read-only directories of the end user machine.

Per the other thread on the subject (that Joao suggested continuing
discussion on), Surinder is currently looking into flask-webpack. I
spent some time playing with grunt and some other options last week.
We should continue the discussion about flask-webpack or Grunt or any other Build system in the other thread, but we need to have some decision because this patch needs a build system.
If we remove Grunt from this patch we will need to execute the following command every time the application run:

yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn run webpack -- --config webpack.config.js && python web/pgAdmin4

And to run the jasmine tests:

yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn run karma start

And to run the feature tests:

yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn run webpack -- --config webpack.config.js && python runtests.py

Is this a solution that is acceptable? 

As per my knowledge, Grunt can run the tasks and bundle the JS and CSS files (using r.js which is not preferred). But Webpack can not do both. It can only bundle files, it has to be used with either Grunt or Gulp to execute tasks.

Is it possible to run the task listed above by configuring them in "scripts" in package.json file and running concurrently ?

scripts: {
 "task-name1": "yarn run eslint filename",
​ ​
"task-name2": "yarn run karma start", so on...
}

and run them using following command:
npm run task-name1
 

However; this patch is supposed to be about the history tab rewrite.
Whatever solution we use for webpacking/transpiling/linting/minifying
etc, it should be a standalone change as it's decidedly non-trivial.
We split this patch into 2 different commits:
1 - Add React and all the tools needed to work with it, this includes Grunt, Webpack and ESLint
2 - Change the history tab

Do you want a single commit for each of the following? 
  React (just adds the React library via yarn)
  Webpack (adds Webpack library via yarn and creates the webpack.config.js)
  ESLint (adds ESLint library via yarn, creates .eslintrc config file, and corrects all lint errors that previously existed)
  Grunt (adds Grunt library via yarn and creates Gruntfile.js config, creating a pipeline of the previous three libraries/tasks)
  Our change to History

Thanks
Joao & Matt 

On Tue, May 30, 2017 at 10:10 AM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Tue, May 30, 2017 at 2:47 PM, Matthew Kleiman <mkleiman@pivotal.io> wrote:
> Hi Dave,
>
> We are currently using the Grunt taskrunner to run the following tasks:
>
> lint the javascript code
> start javascript tests
> invoke webpack to transpile and bundle js and jsx files
> minify javascript
>
> In order to remove Grunt from the application, we will need some other tool
> to execute these listed tasks.
>
> There are other tools available, like Gulp.js, that we could use instead of
> Grunt. We would like to understand your motivation for removing Grunt so we
> can find a better solution.

The motivation is simple - we want a solution that works for the whole
app, can handle debug vs. release execution, pluggable modules, and
installations in read-only directories.

Per the other thread on the subject (that Joao suggested continuing
discussion on), Surinder is currently looking into flask-webpack. I
spent some time playing with grunt and some other options last week.

However; this patch is supposed to be about the history tab rewrite.
Whatever solution we use for webpacking/transpiling/linting/minifying
etc, it should be a standalone change as it's decidedly non-trivial.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Surinder Kumar
Дата:
Hi

Review comments:

1) First patch contains changes related to copy row feature which is already in process in another thread. Any reason to add those changes in this patch as this patch is meant to contain infrastructure changes ?

2) Can the changes related to FeatureTest or Jasmine test be separated out in another patch?


Thanks,
Surinder


On Thu, Jun 1, 2017 at 1:59 AM, Matthew Kleiman <mkleiman@pivotal.io> wrote:
Hey Surinder,

Is it possible to run the task listed above by configuring them in "scripts" in package.json file and running concurrently ?

That would be cleaner than what we proposed. We could use the yarn run feature to do just what you are suggesting. It works the same as in npm.
Something like the following:
In package.json - 
"scripts": {
  "linter": "eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js"
}


To call it on the command line -
yarn run linter

- Matt

On Wed, May 31, 2017 at 12:35 AM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:
On Wed, May 31, 2017 at 12:01 AM, Joao Pedro De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:
The motivation is simple - we want a solution that works for the whole
app, can handle debug vs. release execution, pluggable modules, and
installations in read-only directories.
With the current configuration of Grunt, all the requirements you mention are available.
The tasks on Grunt should only be run under development or before we are creating the installer.


The installer should pick up only the bundled Javascript and should install it in the correct folders, this way there is no need to rewrite or process files in read-only directories of the end user machine.

Per the other thread on the subject (that Joao suggested continuing
discussion on), Surinder is currently looking into flask-webpack. I
spent some time playing with grunt and some other options last week.
We should continue the discussion about flask-webpack or Grunt or any other Build system in the other thread, but we need to have some decision because this patch needs a build system.
If we remove Grunt from this patch we will need to execute the following command every time the application run:

yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn run webpack -- --config webpack.config.js && python web/pgAdmin4

And to run the jasmine tests:

yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn run karma start

And to run the feature tests:

yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn run webpack -- --config webpack.config.js && python runtests.py

Is this a solution that is acceptable? 

As per my knowledge, Grunt can run the tasks and bundle the JS and CSS files (using r.js which is not preferred). But Webpack can not do both. It can only bundle files, it has to be used with either Grunt or Gulp to execute tasks.

Is it possible to run the task listed above by configuring them in "scripts" in package.json file and running concurrently ?

scripts: {
 "task-name1": "yarn run eslint filename",
​ ​
"task-name2": "yarn run karma start", so on...
}

and run them using following command:
npm run task-name1
 

However; this patch is supposed to be about the history tab rewrite.
Whatever solution we use for webpacking/transpiling/linting/minifying
etc, it should be a standalone change as it's decidedly non-trivial.
We split this patch into 2 different commits:
1 - Add React and all the tools needed to work with it, this includes Grunt, Webpack and ESLint
2 - Change the history tab

Do you want a single commit for each of the following? 
  React (just adds the React library via yarn)
  Webpack (adds Webpack library via yarn and creates the webpack.config.js)
  ESLint (adds ESLint library via yarn, creates .eslintrc config file, and corrects all lint errors that previously existed)
  Grunt (adds Grunt library via yarn and creates Gruntfile.js config, creating a pipeline of the previous three libraries/tasks)
  Our change to History

Thanks
Joao & Matt 

On Tue, May 30, 2017 at 10:10 AM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Tue, May 30, 2017 at 2:47 PM, Matthew Kleiman <mkleiman@pivotal.io> wrote:
> Hi Dave,
>
> We are currently using the Grunt taskrunner to run the following tasks:
>
> lint the javascript code
> start javascript tests
> invoke webpack to transpile and bundle js and jsx files
> minify javascript
>
> In order to remove Grunt from the application, we will need some other tool
> to execute these listed tasks.
>
> There are other tools available, like Gulp.js, that we could use instead of
> Grunt. We would like to understand your motivation for removing Grunt so we
> can find a better solution.

The motivation is simple - we want a solution that works for the whole
app, can handle debug vs. release execution, pluggable modules, and
installations in read-only directories.

Per the other thread on the subject (that Joao suggested continuing
discussion on), Surinder is currently looking into flask-webpack. I
spent some time playing with grunt and some other options last week.

However; this patch is supposed to be about the history tab rewrite.
Whatever solution we use for webpacking/transpiling/linting/minifying
etc, it should be a standalone change as it's decidedly non-trivial.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company




Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Sarah McAlear
Дата:
Hello,

First patch contains changes related to copy row feature which is already in process in another thread. Any reason to add those changes in this patch as this patch is meant to contain infrastructure changes ?

As part of introducing React, we are bringing a linter into the codebase. The changes to the file you're referring to are formatting changes enforced by the linter.


Can the changes related to FeatureTest or Jasmine test be separated out in another patch?

Great question! Since we test-drove this, the value delivered by each individual test represents a behavior. Each piece of functionality in the implementation is directly related to their corresponding test(s).
In this way, the tests belong with the code in the same way as documentation.

The new 2 patches are the same as before, without Grunt.

Thanks!
George & Sarah 

On Mon, Jun 5, 2017 at 1:30 AM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:
Hi

Review comments:

1) First patch contains changes related to copy row feature which is already in process in another thread. Any reason to add those changes in this patch as this patch is meant to contain infrastructure changes ?

2) Can the changes related to FeatureTest or Jasmine test be separated out in another patch?


Thanks,
Surinder


On Thu, Jun 1, 2017 at 1:59 AM, Matthew Kleiman <mkleiman@pivotal.io> wrote:
Hey Surinder,

Is it possible to run the task listed above by configuring them in "scripts" in package.json file and running concurrently ?

That would be cleaner than what we proposed. We could use the yarn run feature to do just what you are suggesting. It works the same as in npm.
Something like the following:
In package.json - 
"scripts": {
  "linter": "eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js"
}


To call it on the command line -
yarn run linter

- Matt

On Wed, May 31, 2017 at 12:35 AM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:
On Wed, May 31, 2017 at 12:01 AM, Joao Pedro De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:
The motivation is simple - we want a solution that works for the whole
app, can handle debug vs. release execution, pluggable modules, and
installations in read-only directories.
With the current configuration of Grunt, all the requirements you mention are available.
The tasks on Grunt should only be run under development or before we are creating the installer.


The installer should pick up only the bundled Javascript and should install it in the correct folders, this way there is no need to rewrite or process files in read-only directories of the end user machine.

Per the other thread on the subject (that Joao suggested continuing
discussion on), Surinder is currently looking into flask-webpack. I
spent some time playing with grunt and some other options last week.
We should continue the discussion about flask-webpack or Grunt or any other Build system in the other thread, but we need to have some decision because this patch needs a build system.
If we remove Grunt from this patch we will need to execute the following command every time the application run:

yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn run webpack -- --config webpack.config.js && python web/pgAdmin4

And to run the jasmine tests:

yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn run karma start

And to run the feature tests:

yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn run webpack -- --config webpack.config.js && python runtests.py

Is this a solution that is acceptable? 

As per my knowledge, Grunt can run the tasks and bundle the JS and CSS files (using r.js which is not preferred). But Webpack can not do both. It can only bundle files, it has to be used with either Grunt or Gulp to execute tasks.

Is it possible to run the task listed above by configuring them in "scripts" in package.json file and running concurrently ?

scripts: {
 "task-name1": "yarn run eslint filename",
​ ​
"task-name2": "yarn run karma start", so on...
}

and run them using following command:
npm run task-name1
 

However; this patch is supposed to be about the history tab rewrite.
Whatever solution we use for webpacking/transpiling/linting/minifying
etc, it should be a standalone change as it's decidedly non-trivial.
We split this patch into 2 different commits:
1 - Add React and all the tools needed to work with it, this includes Grunt, Webpack and ESLint
2 - Change the history tab

Do you want a single commit for each of the following? 
  React (just adds the React library via yarn)
  Webpack (adds Webpack library via yarn and creates the webpack.config.js)
  ESLint (adds ESLint library via yarn, creates .eslintrc config file, and corrects all lint errors that previously existed)
  Grunt (adds Grunt library via yarn and creates Gruntfile.js config, creating a pipeline of the previous three libraries/tasks)
  Our change to History

Thanks
Joao & Matt 

On Tue, May 30, 2017 at 10:10 AM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Tue, May 30, 2017 at 2:47 PM, Matthew Kleiman <mkleiman@pivotal.io> wrote:
> Hi Dave,
>
> We are currently using the Grunt taskrunner to run the following tasks:
>
> lint the javascript code
> start javascript tests
> invoke webpack to transpile and bundle js and jsx files
> minify javascript
>
> In order to remove Grunt from the application, we will need some other tool
> to execute these listed tasks.
>
> There are other tools available, like Gulp.js, that we could use instead of
> Grunt. We would like to understand your motivation for removing Grunt so we
> can find a better solution.

The motivation is simple - we want a solution that works for the whole
app, can handle debug vs. release execution, pluggable modules, and
installations in read-only directories.

Per the other thread on the subject (that Joao suggested continuing
discussion on), Surinder is currently looking into flask-webpack. I
spent some time playing with grunt and some other options last week.

However; this patch is supposed to be about the history tab rewrite.
Whatever solution we use for webpacking/transpiling/linting/minifying
etc, it should be a standalone change as it's decidedly non-trivial.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company





Вложения

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
Hi

On Tue, Jun 6, 2017 at 9:15 PM, Sarah McAlear <smcalear@pivotal.io> wrote:
> Hello,
>
>> First patch contains changes related to copy row feature which is already
>> in process in another thread. Any reason to add those changes in this patch
>> as this patch is meant to contain infrastructure changes ?
>
>
> As part of introducing React, we are bringing a linter into the codebase.
> The changes to the file you're referring to are formatting changes enforced
> by the linter.

Right - but they also make it a pain to review the code and see what
has actually changed vs. what the linter has reformatted. Can we
separate those changes out easily?

>> Can the changes related to FeatureTest or Jasmine test be separated out in
>> another patch?
>
>
> Great question! Since we test-drove this, the value delivered by each
> individual test represents a behavior. Each piece of functionality in the
> implementation is directly related to their corresponding test(s).
> In this way, the tests belong with the code in the same way as
> documentation.

I totally agree with that. We should always strive to have code, docs
and tests together.

> The new 2 patches are the same as before, without Grunt.

Unfortunately they don't apply cleanly, and break the feature tests:

With the first patch only:

- The patch includes yarn.lock, which is a gitignore'd file.
- karma.conf.js needed manual merging of every hunk.
- When the feature tests run, the browser just flickers whilst it
continually tries to connect to the server, all the time getting
ERR_CONNECTION_REFUSED.

Patch number 2 fails to apply on karma.conf.js, sqleditor.js,
pgadmin_page.py and yarn.lock (which shouldn't be there anyway).

Can you fix/rebase please?

> On Mon, Jun 5, 2017 at 1:30 AM, Surinder Kumar
> <surinder.kumar@enterprisedb.com> wrote:
>>
>> Hi
>>
>> Review comments:
>>
>> 1) First patch contains changes related to copy row feature which is
>> already in process in another thread. Any reason to add those changes in
>> this patch as this patch is meant to contain infrastructure changes ?
>>
>> 2) Can the changes related to FeatureTest or Jasmine test be separated out
>> in another patch?
>>
>>
>> Thanks,
>> Surinder
>>
>>
>> On Thu, Jun 1, 2017 at 1:59 AM, Matthew Kleiman <mkleiman@pivotal.io>
>> wrote:
>>>
>>> Hey Surinder,
>>>
>>>> Is it possible to run the task listed above by configuring them in
>>>> "scripts" in package.json file and running concurrently ?
>>>
>>>
>>> That would be cleaner than what we proposed. We could use the yarn run
>>> feature to do just what you are suggesting. It works the same as in npm.
>>> Something like the following:
>>> In package.json -
>>> "scripts": {
>>>   "linter": "eslint pgadmin/static/jsx/**/*.jsx
>>> pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx
>>> regression/javascript/**/*.js *.js"
>>> }
>>>
>>> To call it on the command line -
>>> yarn run linter
>>>
>>> - Matt
>>>
>>> On Wed, May 31, 2017 at 12:35 AM, Surinder Kumar
>>> <surinder.kumar@enterprisedb.com> wrote:
>>>>
>>>> On Wed, May 31, 2017 at 12:01 AM, Joao Pedro De Almeida Pereira
>>>> <jdealmeidapereira@pivotal.io> wrote:
>>>>>>
>>>>>> The motivation is simple - we want a solution that works for the whole
>>>>>> app, can handle debug vs. release execution, pluggable modules, and
>>>>>> installations in read-only directories.
>>>>>
>>>>> With the current configuration of Grunt, all the requirements you
>>>>> mention are available.
>>>>> The tasks on Grunt should only be run under development or before we
>>>>> are creating the installer.
>>>>
>>>>
>>>>>
>>>>> The installer should pick up only the bundled Javascript and should
>>>>> install it in the correct folders, this way there is no need to rewrite or
>>>>> process files in read-only directories of the end user machine.
>>>>>
>>>>>> Per the other thread on the subject (that Joao suggested continuing
>>>>>> discussion on), Surinder is currently looking into flask-webpack. I
>>>>>> spent some time playing with grunt and some other options last week.
>>>>>
>>>>> We should continue the discussion about flask-webpack or Grunt or any
>>>>> other Build system in the other thread, but we need to have some decision
>>>>> because this patch needs a build system.
>>>>> If we remove Grunt from this patch we will need to execute the
>>>>> following command every time the application run:
>>>>>
>>>>> yarn run eslint pgadmin/static/jsx/**/*.jsx
>>>>> pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx
>>>>> regression/javascript/**/*.js *.js && yarn run webpack -- --config
>>>>> webpack.config.js && python web/pgAdmin4
>>>>>
>>>>> And to run the jasmine tests:
>>>>>
>>>>> yarn run eslint pgadmin/static/jsx/**/*.jsx
>>>>> pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx
>>>>> regression/javascript/**/*.js *.js && yarn run karma start
>>>>>
>>>>> And to run the feature tests:
>>>>>
>>>>> yarn run eslint pgadmin/static/jsx/**/*.jsx
>>>>> pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx
>>>>> regression/javascript/**/*.js *.js && yarn run webpack -- --config
>>>>> webpack.config.js && python runtests.py
>>>>>
>>>>> Is this a solution that is acceptable?
>>>>
>>>>
>>>> As per my knowledge, Grunt can run the tasks and bundle the JS and CSS
>>>> files (using r.js which is not preferred). But Webpack can not do both. It
>>>> can only bundle files, it has to be used with either Grunt or Gulp to
>>>> execute tasks.
>>>>
>>>> Is it possible to run the task listed above by configuring them in
>>>> "scripts" in package.json file and running concurrently ?
>>>>
>>>> scripts: {
>>>>  "task-name1": "yarn run eslint filename",
>>>> "task-name2": "yarn run karma start", so on...
>>>> }
>>>>
>>>> and run them using following command:
>>>> npm run task-name1
>>>>
>>>>>
>>>>>
>>>>>> However; this patch is supposed to be about the history tab rewrite.
>>>>>> Whatever solution we use for webpacking/transpiling/linting/minifying
>>>>>> etc, it should be a standalone change as it's decidedly non-trivial.
>>>>>
>>>>> We split this patch into 2 different commits:
>>>>> 1 - Add React and all the tools needed to work with it, this includes
>>>>> Grunt, Webpack and ESLint
>>>>> 2 - Change the history tab
>>>>>
>>>>> Do you want a single commit for each of the following?
>>>>>   React (just adds the React library via yarn)
>>>>>   Webpack (adds Webpack library via yarn and creates the
>>>>> webpack.config.js)
>>>>>   ESLint (adds ESLint library via yarn, creates .eslintrc config file,
>>>>> and corrects all lint errors that previously existed)
>>>>>   Grunt (adds Grunt library via yarn and creates Gruntfile.js config,
>>>>> creating a pipeline of the previous three libraries/tasks)
>>>>>   Our change to History
>>>>>
>>>>> Thanks
>>>>> Joao & Matt
>>>>>
>>>>> On Tue, May 30, 2017 at 10:10 AM, Dave Page <dpage@pgadmin.org> wrote:
>>>>>>
>>>>>> Hi
>>>>>>
>>>>>> On Tue, May 30, 2017 at 2:47 PM, Matthew Kleiman <mkleiman@pivotal.io>
>>>>>> wrote:
>>>>>> > Hi Dave,
>>>>>> >
>>>>>> > We are currently using the Grunt taskrunner to run the following
>>>>>> > tasks:
>>>>>> >
>>>>>> > lint the javascript code
>>>>>> > start javascript tests
>>>>>> > invoke webpack to transpile and bundle js and jsx files
>>>>>> > minify javascript
>>>>>> >
>>>>>> > In order to remove Grunt from the application, we will need some
>>>>>> > other tool
>>>>>> > to execute these listed tasks.
>>>>>> >
>>>>>> > There are other tools available, like Gulp.js, that we could use
>>>>>> > instead of
>>>>>> > Grunt. We would like to understand your motivation for removing
>>>>>> > Grunt so we
>>>>>> > can find a better solution.
>>>>>>
>>>>>> The motivation is simple - we want a solution that works for the whole
>>>>>> app, can handle debug vs. release execution, pluggable modules, and
>>>>>> installations in read-only directories.
>>>>>>
>>>>>> Per the other thread on the subject (that Joao suggested continuing
>>>>>> discussion on), Surinder is currently looking into flask-webpack. I
>>>>>> spent some time playing with grunt and some other options last week.
>>>>>>
>>>>>> However; this patch is supposed to be about the history tab rewrite.
>>>>>> Whatever solution we use for webpacking/transpiling/linting/minifying
>>>>>> etc, it should be a standalone change as it's decidedly non-trivial.
>>>>>>
>>>>>> --
>>>>>> Dave Page
>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>> Twitter: @pgsnake
>>>>>>
>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>>
>>>>
>>>
>>
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
George Gelashvili
Дата:
Hi Dave,

I split the linting out into an intermediate commit, and rebased on top of master.

Please see attached.

Thanks!
George

On Wed, Jun 7, 2017 at 10:46 AM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Tue, Jun 6, 2017 at 9:15 PM, Sarah McAlear <smcalear@pivotal.io> wrote:
> Hello,
>
>> First patch contains changes related to copy row feature which is already
>> in process in another thread. Any reason to add those changes in this patch
>> as this patch is meant to contain infrastructure changes ?
>
>
> As part of introducing React, we are bringing a linter into the codebase.
> The changes to the file you're referring to are formatting changes enforced
> by the linter.

Right - but they also make it a pain to review the code and see what
has actually changed vs. what the linter has reformatted. Can we
separate those changes out easily?

>> Can the changes related to FeatureTest or Jasmine test be separated out in
>> another patch?
>
>
> Great question! Since we test-drove this, the value delivered by each
> individual test represents a behavior. Each piece of functionality in the
> implementation is directly related to their corresponding test(s).
> In this way, the tests belong with the code in the same way as
> documentation.

I totally agree with that. We should always strive to have code, docs
and tests together.

> The new 2 patches are the same as before, without Grunt.

Unfortunately they don't apply cleanly, and break the feature tests:

With the first patch only:

- The patch includes yarn.lock, which is a gitignore'd file.
- karma.conf.js needed manual merging of every hunk.
- When the feature tests run, the browser just flickers whilst it
continually tries to connect to the server, all the time getting
ERR_CONNECTION_REFUSED.

Patch number 2 fails to apply on karma.conf.js, sqleditor.js,
pgadmin_page.py and yarn.lock (which shouldn't be there anyway).

Can you fix/rebase please?

> On Mon, Jun 5, 2017 at 1:30 AM, Surinder Kumar
> <surinder.kumar@enterprisedb.com> wrote:
>>
>> Hi
>>
>> Review comments:
>>
>> 1) First patch contains changes related to copy row feature which is
>> already in process in another thread. Any reason to add those changes in
>> this patch as this patch is meant to contain infrastructure changes ?
>>
>> 2) Can the changes related to FeatureTest or Jasmine test be separated out
>> in another patch?
>>
>>
>> Thanks,
>> Surinder
>>
>>
>> On Thu, Jun 1, 2017 at 1:59 AM, Matthew Kleiman <mkleiman@pivotal.io>
>> wrote:
>>>
>>> Hey Surinder,
>>>
>>>> Is it possible to run the task listed above by configuring them in
>>>> "scripts" in package.json file and running concurrently ?
>>>
>>>
>>> That would be cleaner than what we proposed. We could use the yarn run
>>> feature to do just what you are suggesting. It works the same as in npm.
>>> Something like the following:
>>> In package.json -
>>> "scripts": {
>>>   "linter": "eslint pgadmin/static/jsx/**/*.jsx
>>> pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx
>>> regression/javascript/**/*.js *.js"
>>> }
>>>
>>> To call it on the command line -
>>> yarn run linter
>>>
>>> - Matt
>>>
>>> On Wed, May 31, 2017 at 12:35 AM, Surinder Kumar
>>> <surinder.kumar@enterprisedb.com> wrote:
>>>>
>>>> On Wed, May 31, 2017 at 12:01 AM, Joao Pedro De Almeida Pereira
>>>> <jdealmeidapereira@pivotal.io> wrote:
>>>>>>
>>>>>> The motivation is simple - we want a solution that works for the whole
>>>>>> app, can handle debug vs. release execution, pluggable modules, and
>>>>>> installations in read-only directories.
>>>>>
>>>>> With the current configuration of Grunt, all the requirements you
>>>>> mention are available.
>>>>> The tasks on Grunt should only be run under development or before we
>>>>> are creating the installer.
>>>>
>>>>
>>>>>
>>>>> The installer should pick up only the bundled Javascript and should
>>>>> install it in the correct folders, this way there is no need to rewrite or
>>>>> process files in read-only directories of the end user machine.
>>>>>
>>>>>> Per the other thread on the subject (that Joao suggested continuing
>>>>>> discussion on), Surinder is currently looking into flask-webpack. I
>>>>>> spent some time playing with grunt and some other options last week.
>>>>>
>>>>> We should continue the discussion about flask-webpack or Grunt or any
>>>>> other Build system in the other thread, but we need to have some decision
>>>>> because this patch needs a build system.
>>>>> If we remove Grunt from this patch we will need to execute the
>>>>> following command every time the application run:
>>>>>
>>>>> yarn run eslint pgadmin/static/jsx/**/*.jsx
>>>>> pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx
>>>>> regression/javascript/**/*.js *.js && yarn run webpack -- --config
>>>>> webpack.config.js && python web/pgAdmin4
>>>>>
>>>>> And to run the jasmine tests:
>>>>>
>>>>> yarn run eslint pgadmin/static/jsx/**/*.jsx
>>>>> pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx
>>>>> regression/javascript/**/*.js *.js && yarn run karma start
>>>>>
>>>>> And to run the feature tests:
>>>>>
>>>>> yarn run eslint pgadmin/static/jsx/**/*.jsx
>>>>> pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx
>>>>> regression/javascript/**/*.js *.js && yarn run webpack -- --config
>>>>> webpack.config.js && python runtests.py
>>>>>
>>>>> Is this a solution that is acceptable?
>>>>
>>>>
>>>> As per my knowledge, Grunt can run the tasks and bundle the JS and CSS
>>>> files (using r.js which is not preferred). But Webpack can not do both. It
>>>> can only bundle files, it has to be used with either Grunt or Gulp to
>>>> execute tasks.
>>>>
>>>> Is it possible to run the task listed above by configuring them in
>>>> "scripts" in package.json file and running concurrently ?
>>>>
>>>> scripts: {
>>>>  "task-name1": "yarn run eslint filename",
>>>> "task-name2": "yarn run karma start", so on...
>>>> }
>>>>
>>>> and run them using following command:
>>>> npm run task-name1
>>>>
>>>>>
>>>>>
>>>>>> However; this patch is supposed to be about the history tab rewrite.
>>>>>> Whatever solution we use for webpacking/transpiling/linting/minifying
>>>>>> etc, it should be a standalone change as it's decidedly non-trivial.
>>>>>
>>>>> We split this patch into 2 different commits:
>>>>> 1 - Add React and all the tools needed to work with it, this includes
>>>>> Grunt, Webpack and ESLint
>>>>> 2 - Change the history tab
>>>>>
>>>>> Do you want a single commit for each of the following?
>>>>>   React (just adds the React library via yarn)
>>>>>   Webpack (adds Webpack library via yarn and creates the
>>>>> webpack.config.js)
>>>>>   ESLint (adds ESLint library via yarn, creates .eslintrc config file,
>>>>> and corrects all lint errors that previously existed)
>>>>>   Grunt (adds Grunt library via yarn and creates Gruntfile.js config,
>>>>> creating a pipeline of the previous three libraries/tasks)
>>>>>   Our change to History
>>>>>
>>>>> Thanks
>>>>> Joao & Matt
>>>>>
>>>>> On Tue, May 30, 2017 at 10:10 AM, Dave Page <dpage@pgadmin.org> wrote:
>>>>>>
>>>>>> Hi
>>>>>>
>>>>>> On Tue, May 30, 2017 at 2:47 PM, Matthew Kleiman <mkleiman@pivotal.io>
>>>>>> wrote:
>>>>>> > Hi Dave,
>>>>>> >
>>>>>> > We are currently using the Grunt taskrunner to run the following
>>>>>> > tasks:
>>>>>> >
>>>>>> > lint the javascript code
>>>>>> > start javascript tests
>>>>>> > invoke webpack to transpile and bundle js and jsx files
>>>>>> > minify javascript
>>>>>> >
>>>>>> > In order to remove Grunt from the application, we will need some
>>>>>> > other tool
>>>>>> > to execute these listed tasks.
>>>>>> >
>>>>>> > There are other tools available, like Gulp.js, that we could use
>>>>>> > instead of
>>>>>> > Grunt. We would like to understand your motivation for removing
>>>>>> > Grunt so we
>>>>>> > can find a better solution.
>>>>>>
>>>>>> The motivation is simple - we want a solution that works for the whole
>>>>>> app, can handle debug vs. release execution, pluggable modules, and
>>>>>> installations in read-only directories.
>>>>>>
>>>>>> Per the other thread on the subject (that Joao suggested continuing
>>>>>> discussion on), Surinder is currently looking into flask-webpack. I
>>>>>> spent some time playing with grunt and some other options last week.
>>>>>>
>>>>>> However; this patch is supposed to be about the history tab rewrite.
>>>>>> Whatever solution we use for webpacking/transpiling/linting/minifying
>>>>>> etc, it should be a standalone change as it's decidedly non-trivial.
>>>>>>
>>>>>> --
>>>>>> Dave Page
>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>> Twitter: @pgsnake
>>>>>>
>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>>
>>>>
>>>
>>
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Вложения

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
Hi George

On Wed, Jun 7, 2017 at 10:21 PM, George Gelashvili
<ggelashvili@pivotal.io> wrote:
> Hi Dave,
>
> I split the linting out into an intermediate commit, and rebased on top of
> master.

Unfortunately, it still doesn't apply:

error: patch failed: web/regression/javascript/test-main.js:1
error: removal patch leaves file contents
error: web/regression/javascript/test-main.js: patch does not apply
Checking patch web/regression/requirements.txt...
Checking patch web/webpack.config.js...
Checking patch web/webpack.test.config.js...
Checking patch web/yarn.lock...
error: web/yarn.lock: already exists in working directory
Applied patch .gitignore cleanly.
Applied patch Make.bat cleanly.
Applied patch README cleanly.
Applied patch pkg/mac/build.sh cleanly.
Applied patch pkg/pip/build.sh cleanly.
Applied patch pkg/src/build.sh cleanly.
Applied patch web/.eslintrc.js cleanly.
Applied patch web/karma.conf.js cleanly.
Applied patch web/package.json cleanly.
Applied patch web/pgAdmin4.py cleanly.
Applied patch web/pgadmin/static/jsx/components.jsx cleanly.
Applied patch web/pgadmin/tools/javascript/__init__.py cleanly.
Applied patch web/pgadmin/tools/javascript/javascript_bundler.py cleanly.
Applied patch web/pgadmin/tools/javascript/tests/__init__.py cleanly.
Applied patch web/pgadmin/tools/javascript/tests/test_javascript_bundler.py
cleanly.
Applied patch web/regression/README cleanly.
Applied patch web/regression/javascript/jasmine_capture_warnings_beforeall.js
cleanly.
Applied patch web/regression/requirements.txt cleanly.
Applied patch web/webpack.config.js cleanly.
Applied patch web/webpack.test.config.js cleanly.

The second (lint update) patch is even worse, with significant number
change that just don't want to apply.

Clearly yarn.lock needs to be removed from there repo.

Once I can apply a version of this, how should I be running the linter
and the unit tests?

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
George Gelashvili
Дата:
Hi Dave,

Our patch touches code also changed by the patches that were recently committed.
That's likely what's causing this issue. We've rebased on top of the new state of master.

We had initially kept the yarn.lock .gitignored, but ran into an issue rather early on where an upgraded dependency introduced a regression.
Checking-in the yarn.lock provides the "know your dependency version" benefit of vendorizing code without vendorization's drawback of having to manually manage your dependencies.

It is safe to delete a yarn.lock before applying a patch, as you are authoring master. It provides a history of the versions of each dependency that were working at the point in time of the commit. By contrast, package.json provides approximate versions and leaves room for fixes/improvements by the dependency authors to be pulled in as they become available.

To run linter and tests:

The tasks that Grunt used to manage are now defined as a set of scripts in the package.json
After applying the patches--which may require deleting yarn.lock for the first patch--you should cd web && yarn install

Then yarn test will run the linter, jasmine specs, and python tests including feature tests, in that order, exiting early if there are failures/errors.
At the moment, the CheckForViewData test is failing on master as well as in each of these patches; that should be resolved as RM2477.

Thanks!
George and Matt


On Thu, Jun 8, 2017 at 9:15 AM, Dave Page <dpage@pgadmin.org> wrote:
Hi George

On Wed, Jun 7, 2017 at 10:21 PM, George Gelashvili
<ggelashvili@pivotal.io> wrote:
> Hi Dave,
>
> I split the linting out into an intermediate commit, and rebased on top of
> master.

Unfortunately, it still doesn't apply:

error: patch failed: web/regression/javascript/test-main.js:1
error: removal patch leaves file contents
error: web/regression/javascript/test-main.js: patch does not apply
Checking patch web/regression/requirements.txt...
Checking patch web/webpack.config.js...
Checking patch web/webpack.test.config.js...
Checking patch web/yarn.lock...
error: web/yarn.lock: already exists in working directory
Applied patch .gitignore cleanly.
Applied patch Make.bat cleanly.
Applied patch README cleanly.
Applied patch pkg/mac/build.sh cleanly.
Applied patch pkg/pip/build.sh cleanly.
Applied patch pkg/src/build.sh cleanly.
Applied patch web/.eslintrc.js cleanly.
Applied patch web/karma.conf.js cleanly.
Applied patch web/package.json cleanly.
Applied patch web/pgAdmin4.py cleanly.
Applied patch web/pgadmin/static/jsx/components.jsx cleanly.
Applied patch web/pgadmin/tools/javascript/__init__.py cleanly.
Applied patch web/pgadmin/tools/javascript/javascript_bundler.py cleanly.
Applied patch web/pgadmin/tools/javascript/tests/__init__.py cleanly.
Applied patch web/pgadmin/tools/javascript/tests/test_javascript_bundler.py
cleanly.
Applied patch web/regression/README cleanly.
Applied patch web/regression/javascript/jasmine_capture_warnings_beforeall.js
cleanly.
Applied patch web/regression/requirements.txt cleanly.
Applied patch web/webpack.config.js cleanly.
Applied patch web/webpack.test.config.js cleanly.

The second (lint update) patch is even worse, with significant number
change that just don't want to apply.

Clearly yarn.lock needs to be removed from there repo.

Once I can apply a version of this, how should I be running the linter
and the unit tests?

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Вложения

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
Hi

OK, so Ashesh and I spend much of the morning on this.

Patch 01 - Applied.
Patch 02:

- karma.conf.js wouldn't patch; I've manually handled that.
- test-main.js wouldn't patch. The diff looked like it was trying to
empty it; I have removed it instead.
- The imports in pgAdmin4.py need to be made after the app root is
added to the path.
- The JS bundler should be in pgadmin/utils, not pgadmin/tools (which
is intended for plugin modules)
- The tests were failing following some changes Ashesh pushed earlier
to add a client-side url_for function.
- pgAdmin4.py was attempting to run the bundler on every startup. I've
wrapped those called in "if config.DEBUG:" conditionals, as typically
an installation for an end-user will be in a read-only directory.

We've fixed all of that in the attached patch. I'm not sure why it's
so much bigger than yours.

The following issues are outstanding; please take a look at them:

- There is no update to the Windows installer generation code (needed
in 2 places unfortunately; Make.bat and Make-MinGW.bat).

- The updates to the other packages call "yarn run webpacker" which is
an undefined target.

I haven't looked at patch 03 yet, but Ashesh did tell me it won't
apply for him. Patch 4 is also untested at this stage.

If the issues above can be fixed, we can get patch 2 applied then move
on from there.

I'll hold off on Harshal's patch for the Query Tool's load on demand
to give you a chance to get this done.

Thanks.

On Sat, Jun 10, 2017 at 2:52 AM, George Gelashvili
<ggelashvili@pivotal.io> wrote:
> Hi Dave,
>
> Our patch touches code also changed by the patches that were recently
> committed.
> That's likely what's causing this issue. We've rebased on top of the new
> state of master.
>
> We had initially kept the yarn.lock .gitignored, but ran into an issue
> rather early on where an upgraded dependency introduced a regression.
> Checking-in the yarn.lock provides the "know your dependency version"
> benefit of vendorizing code without vendorization's drawback of having to
> manually manage your dependencies.
>
> It is safe to delete a yarn.lock before applying a patch, as you are
> authoring master. It provides a history of the versions of each dependency
> that were working at the point in time of the commit. By contrast,
> package.json provides approximate versions and leaves room for
> fixes/improvements by the dependency authors to be pulled in as they become
> available.
>
> To run linter and tests:
>
> The tasks that Grunt used to manage are now defined as a set of scripts in
> the package.json
> After applying the patches--which may require deleting yarn.lock for the
> first patch--you should cd web && yarn install
>
> Then yarn test will run the linter, jasmine specs, and python tests
> including feature tests, in that order, exiting early if there are
> failures/errors.
> At the moment, the CheckForViewData test is failing on master as well as in
> each of these patches; that should be resolved as RM2477.
>
> Thanks!
> George and Matt
>
>
> On Thu, Jun 8, 2017 at 9:15 AM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi George
>>
>> On Wed, Jun 7, 2017 at 10:21 PM, George Gelashvili
>> <ggelashvili@pivotal.io> wrote:
>> > Hi Dave,
>> >
>> > I split the linting out into an intermediate commit, and rebased on top
>> > of
>> > master.
>>
>> Unfortunately, it still doesn't apply:
>>
>> error: patch failed: web/regression/javascript/test-main.js:1
>> error: removal patch leaves file contents
>> error: web/regression/javascript/test-main.js: patch does not apply
>> Checking patch web/regression/requirements.txt...
>> Checking patch web/webpack.config.js...
>> Checking patch web/webpack.test.config.js...
>> Checking patch web/yarn.lock...
>> error: web/yarn.lock: already exists in working directory
>> Applied patch .gitignore cleanly.
>> Applied patch Make.bat cleanly.
>> Applied patch README cleanly.
>> Applied patch pkg/mac/build.sh cleanly.
>> Applied patch pkg/pip/build.sh cleanly.
>> Applied patch pkg/src/build.sh cleanly.
>> Applied patch web/.eslintrc.js cleanly.
>> Applied patch web/karma.conf.js cleanly.
>> Applied patch web/package.json cleanly.
>> Applied patch web/pgAdmin4.py cleanly.
>> Applied patch web/pgadmin/static/jsx/components.jsx cleanly.
>> Applied patch web/pgadmin/tools/javascript/__init__.py cleanly.
>> Applied patch web/pgadmin/tools/javascript/javascript_bundler.py cleanly.
>> Applied patch web/pgadmin/tools/javascript/tests/__init__.py cleanly.
>> Applied patch
>> web/pgadmin/tools/javascript/tests/test_javascript_bundler.py
>> cleanly.
>> Applied patch web/regression/README cleanly.
>> Applied patch
>> web/regression/javascript/jasmine_capture_warnings_beforeall.js
>> cleanly.
>> Applied patch web/regression/requirements.txt cleanly.
>> Applied patch web/webpack.config.js cleanly.
>> Applied patch web/webpack.test.config.js cleanly.
>>
>> The second (lint update) patch is even worse, with significant number
>> change that just don't want to apply.
>>
>> Clearly yarn.lock needs to be removed from there repo.
>>
>> Once I can apply a version of this, how should I be running the linter
>> and the unit tests?
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Вложения

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Shruti B Iyer
Дата:

Hello Dave,

Thanks for making those fixes and sharing them with us. We tried applying the patch and it looks like there are some missing file changes from your patch that were present in ours, like the Make.bat file changes. But we will add them when we send you the new patches.

While trying to generate the new patches we realized some tests are failing in master branch due to an internal server error:

2017-06-12 10:04:11,938: INFO werkzeug: 127.0.0.1 - - [12/Jun/2017 10:04:11] "GET /browser/table/sql/1/1/12669/2200/81920 HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py", line 2000, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py", line 1991, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py", line 1567, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py", line 1544, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/views.py", line 84, in view
    return self.dispatch_request(*args, **kwargs)
  File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/utils.py", line 235, in dispatch_request
    return method(*args, **kwargs)
  File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py", line 315, in wrap
    return f(*args, **kwargs)
  File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py", line 2555, in sql
    data = self._formatter(did, scid, tid, data)
  File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py", line 1081, in _formatter
    data = self._columns_formatter(tid, data)
  File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py", line 663, in _columns_formatter
    column['attlen'] = matchObj.group(1)
AttributeError: 'NoneType' object has no attribute 'group'

Was this introduced in a previous patch?

We will recreate the patches and send them ASAP.

Thanks
Shruti & Joao

On Mon, Jun 12, 2017 at 6:59 AM Dave Page <dpage@pgadmin.org> wrote:
Hi

OK, so Ashesh and I spend much of the morning on this.

Patch 01 - Applied.
Patch 02:

- karma.conf.js wouldn't patch; I've manually handled that.
- test-main.js wouldn't patch. The diff looked like it was trying to
empty it; I have removed it instead.
- The imports in pgAdmin4.py need to be made after the app root is
added to the path.
- The JS bundler should be in pgadmin/utils, not pgadmin/tools (which
is intended for plugin modules)
- The tests were failing following some changes Ashesh pushed earlier
to add a client-side url_for function.
- pgAdmin4.py was attempting to run the bundler on every startup. I've
wrapped those called in "if config.DEBUG:" conditionals, as typically
an installation for an end-user will be in a read-only directory.

We've fixed all of that in the attached patch. I'm not sure why it's
so much bigger than yours.

The following issues are outstanding; please take a look at them:

- There is no update to the Windows installer generation code (needed
in 2 places unfortunately; Make.bat and Make-MinGW.bat).

- The updates to the other packages call "yarn run webpacker" which is
an undefined target.

I haven't looked at patch 03 yet, but Ashesh did tell me it won't
apply for him. Patch 4 is also untested at this stage.

If the issues above can be fixed, we can get patch 2 applied then move
on from there.

I'll hold off on Harshal's patch for the Query Tool's load on demand
to give you a chance to get this done.

Thanks.

On Sat, Jun 10, 2017 at 2:52 AM, George Gelashvili
<ggelashvili@pivotal.io> wrote:
> Hi Dave,
>
> Our patch touches code also changed by the patches that were recently
> committed.
> That's likely what's causing this issue. We've rebased on top of the new
> state of master.
>
> We had initially kept the yarn.lock .gitignored, but ran into an issue
> rather early on where an upgraded dependency introduced a regression.
> Checking-in the yarn.lock provides the "know your dependency version"
> benefit of vendorizing code without vendorization's drawback of having to
> manually manage your dependencies.
>
> It is safe to delete a yarn.lock before applying a patch, as you are
> authoring master. It provides a history of the versions of each dependency
> that were working at the point in time of the commit. By contrast,
> package.json provides approximate versions and leaves room for
> fixes/improvements by the dependency authors to be pulled in as they become
> available.
>
> To run linter and tests:
>
> The tasks that Grunt used to manage are now defined as a set of scripts in
> the package.json
> After applying the patches--which may require deleting yarn.lock for the
> first patch--you should cd web && yarn install
>
> Then yarn test will run the linter, jasmine specs, and python tests
> including feature tests, in that order, exiting early if there are
> failures/errors.
> At the moment, the CheckForViewData test is failing on master as well as in
> each of these patches; that should be resolved as RM2477.
>
> Thanks!
> George and Matt
>
>
> On Thu, Jun 8, 2017 at 9:15 AM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi George
>>
>> On Wed, Jun 7, 2017 at 10:21 PM, George Gelashvili
>> <ggelashvili@pivotal.io> wrote:
>> > Hi Dave,
>> >
>> > I split the linting out into an intermediate commit, and rebased on top
>> > of
>> > master.
>>
>> Unfortunately, it still doesn't apply:
>>
>> error: patch failed: web/regression/javascript/test-main.js:1
>> error: removal patch leaves file contents
>> error: web/regression/javascript/test-main.js: patch does not apply
>> Checking patch web/regression/requirements.txt...
>> Checking patch web/webpack.config.js...
>> Checking patch web/webpack.test.config.js...
>> Checking patch web/yarn.lock...
>> error: web/yarn.lock: already exists in working directory
>> Applied patch .gitignore cleanly.
>> Applied patch Make.bat cleanly.
>> Applied patch README cleanly.
>> Applied patch pkg/mac/build.sh cleanly.
>> Applied patch pkg/pip/build.sh cleanly.
>> Applied patch pkg/src/build.sh cleanly.
>> Applied patch web/.eslintrc.js cleanly.
>> Applied patch web/karma.conf.js cleanly.
>> Applied patch web/package.json cleanly.
>> Applied patch web/pgAdmin4.py cleanly.
>> Applied patch web/pgadmin/static/jsx/components.jsx cleanly.
>> Applied patch web/pgadmin/tools/javascript/__init__.py cleanly.
>> Applied patch web/pgadmin/tools/javascript/javascript_bundler.py cleanly.
>> Applied patch web/pgadmin/tools/javascript/tests/__init__.py cleanly.
>> Applied patch
>> web/pgadmin/tools/javascript/tests/test_javascript_bundler.py
>> cleanly.
>> Applied patch web/regression/README cleanly.
>> Applied patch
>> web/regression/javascript/jasmine_capture_warnings_beforeall.js
>> cleanly.
>> Applied patch web/regression/requirements.txt cleanly.
>> Applied patch web/webpack.config.js cleanly.
>> Applied patch web/webpack.test.config.js cleanly.
>>
>> The second (lint update) patch is even worse, with significant number
>> change that just don't want to apply.
>>
>> Clearly yarn.lock needs to be removed from there repo.
>>
>> Once I can apply a version of this, how should I be running the linter
>> and the unit tests?
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
Hi Shruti

On Mon, Jun 12, 2017 at 3:24 PM, Shruti B Iyer <siyer@pivotal.io> wrote:
>
> Hello Dave,
>
> Thanks for making those fixes and sharing them with us. We tried applying
> the patch and it looks like there are some missing file changes from your
> patch that were present in ours, like the Make.bat file changes. But we will
> add them when we send you the new patches.

Hmm, I wonder if I missed them because I applied the patch in a sub directory.

> While trying to generate the new patches we realized some tests are failing
> in master branch due to an internal server error:
>
> 2017-06-12 10:04:11,938: INFO werkzeug: 127.0.0.1 - - [12/Jun/2017 10:04:11]
> "GET /browser/table/sql/1/1/12669/2200/81920 HTTP/1.1" 500 -
> Traceback (most recent call last):
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
> line 2000, in __call__
>     return self.wsgi_app(environ, start_response)
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
> line 1991, in wsgi_app
>     response = self.make_response(self.handle_exception(e))
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
> line 1567, in handle_exception
>     reraise(exc_type, exc_value, tb)
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
> line 1988, in wsgi_app
>     response = self.full_dispatch_request()
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
> line 1641, in full_dispatch_request
>     rv = self.handle_user_exception(e)
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
> line 1544, in handle_user_exception
>     reraise(exc_type, exc_value, tb)
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
> line 1639, in full_dispatch_request
>     rv = self.dispatch_request()
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
> line 1625, in dispatch_request
>     return self.view_functions[rule.endpoint](**req.view_args)
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/views.py",
> line 84, in view
>     return self.dispatch_request(*args, **kwargs)
>   File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/utils.py",
> line 235, in dispatch_request
>     return method(*args, **kwargs)
>   File
> "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
> line 315, in wrap
>     return f(*args, **kwargs)
>   File
> "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
> line 2555, in sql
>     data = self._formatter(did, scid, tid, data)
>   File
> "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
> line 1081, in _formatter
>     data = self._columns_formatter(tid, data)
>   File
> "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
> line 663, in _columns_formatter
>     column['attlen'] = matchObj.group(1)
> AttributeError: 'NoneType' object has no attribute 'group'
>
> Was this introduced in a previous patch?

Yes, it looks like it. For some reason it's not failing on the Jenkins
server though. I'll ask Khushboo to fix it.

> We will recreate the patches and send them ASAP.

Thanks!

> Thanks
> Shruti & Joao
>
> On Mon, Jun 12, 2017 at 6:59 AM Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi
>>
>> OK, so Ashesh and I spend much of the morning on this.
>>
>> Patch 01 - Applied.
>> Patch 02:
>>
>> - karma.conf.js wouldn't patch; I've manually handled that.
>> - test-main.js wouldn't patch. The diff looked like it was trying to
>> empty it; I have removed it instead.
>> - The imports in pgAdmin4.py need to be made after the app root is
>> added to the path.
>> - The JS bundler should be in pgadmin/utils, not pgadmin/tools (which
>> is intended for plugin modules)
>> - The tests were failing following some changes Ashesh pushed earlier
>> to add a client-side url_for function.
>> - pgAdmin4.py was attempting to run the bundler on every startup. I've
>> wrapped those called in "if config.DEBUG:" conditionals, as typically
>> an installation for an end-user will be in a read-only directory.
>>
>> We've fixed all of that in the attached patch. I'm not sure why it's
>> so much bigger than yours.
>>
>> The following issues are outstanding; please take a look at them:
>>
>> - There is no update to the Windows installer generation code (needed
>> in 2 places unfortunately; Make.bat and Make-MinGW.bat).
>>
>> - The updates to the other packages call "yarn run webpacker" which is
>> an undefined target.
>>
>> I haven't looked at patch 03 yet, but Ashesh did tell me it won't
>> apply for him. Patch 4 is also untested at this stage.
>>
>> If the issues above can be fixed, we can get patch 2 applied then move
>> on from there.
>>
>> I'll hold off on Harshal's patch for the Query Tool's load on demand
>> to give you a chance to get this done.
>>
>> Thanks.
>>
>> On Sat, Jun 10, 2017 at 2:52 AM, George Gelashvili
>> <ggelashvili@pivotal.io> wrote:
>> > Hi Dave,
>> >
>> > Our patch touches code also changed by the patches that were recently
>> > committed.
>> > That's likely what's causing this issue. We've rebased on top of the new
>> > state of master.
>> >
>> > We had initially kept the yarn.lock .gitignored, but ran into an issue
>> > rather early on where an upgraded dependency introduced a regression.
>> > Checking-in the yarn.lock provides the "know your dependency version"
>> > benefit of vendorizing code without vendorization's drawback of having
>> > to
>> > manually manage your dependencies.
>> >
>> > It is safe to delete a yarn.lock before applying a patch, as you are
>> > authoring master. It provides a history of the versions of each
>> > dependency
>> > that were working at the point in time of the commit. By contrast,
>> > package.json provides approximate versions and leaves room for
>> > fixes/improvements by the dependency authors to be pulled in as they
>> > become
>> > available.
>> >
>> > To run linter and tests:
>> >
>> > The tasks that Grunt used to manage are now defined as a set of scripts
>> > in
>> > the package.json
>> > After applying the patches--which may require deleting yarn.lock for the
>> > first patch--you should cd web && yarn install
>> >
>> > Then yarn test will run the linter, jasmine specs, and python tests
>> > including feature tests, in that order, exiting early if there are
>> > failures/errors.
>> > At the moment, the CheckForViewData test is failing on master as well as
>> > in
>> > each of these patches; that should be resolved as RM2477.
>> >
>> > Thanks!
>> > George and Matt
>> >
>> >
>> > On Thu, Jun 8, 2017 at 9:15 AM, Dave Page <dpage@pgadmin.org> wrote:
>> >>
>> >> Hi George
>> >>
>> >> On Wed, Jun 7, 2017 at 10:21 PM, George Gelashvili
>> >> <ggelashvili@pivotal.io> wrote:
>> >> > Hi Dave,
>> >> >
>> >> > I split the linting out into an intermediate commit, and rebased on
>> >> > top
>> >> > of
>> >> > master.
>> >>
>> >> Unfortunately, it still doesn't apply:
>> >>
>> >> error: patch failed: web/regression/javascript/test-main.js:1
>> >> error: removal patch leaves file contents
>> >> error: web/regression/javascript/test-main.js: patch does not apply
>> >> Checking patch web/regression/requirements.txt...
>> >> Checking patch web/webpack.config.js...
>> >> Checking patch web/webpack.test.config.js...
>> >> Checking patch web/yarn.lock...
>> >> error: web/yarn.lock: already exists in working directory
>> >> Applied patch .gitignore cleanly.
>> >> Applied patch Make.bat cleanly.
>> >> Applied patch README cleanly.
>> >> Applied patch pkg/mac/build.sh cleanly.
>> >> Applied patch pkg/pip/build.sh cleanly.
>> >> Applied patch pkg/src/build.sh cleanly.
>> >> Applied patch web/.eslintrc.js cleanly.
>> >> Applied patch web/karma.conf.js cleanly.
>> >> Applied patch web/package.json cleanly.
>> >> Applied patch web/pgAdmin4.py cleanly.
>> >> Applied patch web/pgadmin/static/jsx/components.jsx cleanly.
>> >> Applied patch web/pgadmin/tools/javascript/__init__.py cleanly.
>> >> Applied patch web/pgadmin/tools/javascript/javascript_bundler.py
>> >> cleanly.
>> >> Applied patch web/pgadmin/tools/javascript/tests/__init__.py cleanly.
>> >> Applied patch
>> >> web/pgadmin/tools/javascript/tests/test_javascript_bundler.py
>> >> cleanly.
>> >> Applied patch web/regression/README cleanly.
>> >> Applied patch
>> >> web/regression/javascript/jasmine_capture_warnings_beforeall.js
>> >> cleanly.
>> >> Applied patch web/regression/requirements.txt cleanly.
>> >> Applied patch web/webpack.config.js cleanly.
>> >> Applied patch web/webpack.test.config.js cleanly.
>> >>
>> >> The second (lint update) patch is even worse, with significant number
>> >> change that just don't want to apply.
>> >>
>> >> Clearly yarn.lock needs to be removed from there repo.
>> >>
>> >> Once I can apply a version of this, how should I be running the linter
>> >> and the unit tests?
>> >>
>> >> --
>> >> Dave Page
>> >> Blog: http://pgsnake.blogspot.com
>> >> Twitter: @pgsnake
>> >>
>> >> EnterpriseDB UK: http://www.enterprisedb.com
>> >> The Enterprise PostgreSQL Company
>> >
>> >
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Shruti B Iyer
Дата:
Hi Hackers,

Attached are the updated patches that apply on top of master. 

Thanks,
Shruti & Joao

On Mon, Jun 12, 2017 at 10:44 AM Dave Page <dpage@pgadmin.org> wrote:
Hi Shruti

On Mon, Jun 12, 2017 at 3:24 PM, Shruti B Iyer <siyer@pivotal.io> wrote:
>
> Hello Dave,
>
> Thanks for making those fixes and sharing them with us. We tried applying
> the patch and it looks like there are some missing file changes from your
> patch that were present in ours, like the Make.bat file changes. But we will
> add them when we send you the new patches.

Hmm, I wonder if I missed them because I applied the patch in a sub directory.

> While trying to generate the new patches we realized some tests are failing
> in master branch due to an internal server error:
>
> 2017-06-12 10:04:11,938: INFO werkzeug: 127.0.0.1 - - [12/Jun/2017 10:04:11]
> "GET /browser/table/sql/1/1/12669/2200/81920 HTTP/1.1" 500 -
> Traceback (most recent call last):
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
> line 2000, in __call__
>     return self.wsgi_app(environ, start_response)
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
> line 1991, in wsgi_app
>     response = self.make_response(self.handle_exception(e))
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
> line 1567, in handle_exception
>     reraise(exc_type, exc_value, tb)
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
> line 1988, in wsgi_app
>     response = self.full_dispatch_request()
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
> line 1641, in full_dispatch_request
>     rv = self.handle_user_exception(e)
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
> line 1544, in handle_user_exception
>     reraise(exc_type, exc_value, tb)
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
> line 1639, in full_dispatch_request
>     rv = self.dispatch_request()
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
> line 1625, in dispatch_request
>     return self.view_functions[rule.endpoint](**req.view_args)
>   File
> "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/views.py",
> line 84, in view
>     return self.dispatch_request(*args, **kwargs)
>   File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/utils.py",
> line 235, in dispatch_request
>     return method(*args, **kwargs)
>   File
> "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
> line 315, in wrap
>     return f(*args, **kwargs)
>   File
> "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
> line 2555, in sql
>     data = self._formatter(did, scid, tid, data)
>   File
> "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
> line 1081, in _formatter
>     data = self._columns_formatter(tid, data)
>   File
> "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
> line 663, in _columns_formatter
>     column['attlen'] = matchObj.group(1)
> AttributeError: 'NoneType' object has no attribute 'group'
>
> Was this introduced in a previous patch?

Yes, it looks like it. For some reason it's not failing on the Jenkins
server though. I'll ask Khushboo to fix it.

> We will recreate the patches and send them ASAP.

Thanks!

> Thanks
> Shruti & Joao
>
> On Mon, Jun 12, 2017 at 6:59 AM Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi
>>
>> OK, so Ashesh and I spend much of the morning on this.
>>
>> Patch 01 - Applied.
>> Patch 02:
>>
>> - karma.conf.js wouldn't patch; I've manually handled that.
>> - test-main.js wouldn't patch. The diff looked like it was trying to
>> empty it; I have removed it instead.
>> - The imports in pgAdmin4.py need to be made after the app root is
>> added to the path.
>> - The JS bundler should be in pgadmin/utils, not pgadmin/tools (which
>> is intended for plugin modules)
>> - The tests were failing following some changes Ashesh pushed earlier
>> to add a client-side url_for function.
>> - pgAdmin4.py was attempting to run the bundler on every startup. I've
>> wrapped those called in "if config.DEBUG:" conditionals, as typically
>> an installation for an end-user will be in a read-only directory.
>>
>> We've fixed all of that in the attached patch. I'm not sure why it's
>> so much bigger than yours.
>>
>> The following issues are outstanding; please take a look at them:
>>
>> - There is no update to the Windows installer generation code (needed
>> in 2 places unfortunately; Make.bat and Make-MinGW.bat).
>>
>> - The updates to the other packages call "yarn run webpacker" which is
>> an undefined target.
>>
>> I haven't looked at patch 03 yet, but Ashesh did tell me it won't
>> apply for him. Patch 4 is also untested at this stage.
>>
>> If the issues above can be fixed, we can get patch 2 applied then move
>> on from there.
>>
>> I'll hold off on Harshal's patch for the Query Tool's load on demand
>> to give you a chance to get this done.
>>
>> Thanks.
>>
>> On Sat, Jun 10, 2017 at 2:52 AM, George Gelashvili
>> <ggelashvili@pivotal.io> wrote:
>> > Hi Dave,
>> >
>> > Our patch touches code also changed by the patches that were recently
>> > committed.
>> > That's likely what's causing this issue. We've rebased on top of the new
>> > state of master.
>> >
>> > We had initially kept the yarn.lock .gitignored, but ran into an issue
>> > rather early on where an upgraded dependency introduced a regression.
>> > Checking-in the yarn.lock provides the "know your dependency version"
>> > benefit of vendorizing code without vendorization's drawback of having
>> > to
>> > manually manage your dependencies.
>> >
>> > It is safe to delete a yarn.lock before applying a patch, as you are
>> > authoring master. It provides a history of the versions of each
>> > dependency
>> > that were working at the point in time of the commit. By contrast,
>> > package.json provides approximate versions and leaves room for
>> > fixes/improvements by the dependency authors to be pulled in as they
>> > become
>> > available.
>> >
>> > To run linter and tests:
>> >
>> > The tasks that Grunt used to manage are now defined as a set of scripts
>> > in
>> > the package.json
>> > After applying the patches--which may require deleting yarn.lock for the
>> > first patch--you should cd web && yarn install
>> >
>> > Then yarn test will run the linter, jasmine specs, and python tests
>> > including feature tests, in that order, exiting early if there are
>> > failures/errors.
>> > At the moment, the CheckForViewData test is failing on master as well as
>> > in
>> > each of these patches; that should be resolved as RM2477.
>> >
>> > Thanks!
>> > George and Matt
>> >
>> >
>> > On Thu, Jun 8, 2017 at 9:15 AM, Dave Page <dpage@pgadmin.org> wrote:
>> >>
>> >> Hi George
>> >>
>> >> On Wed, Jun 7, 2017 at 10:21 PM, George Gelashvili
>> >> <ggelashvili@pivotal.io> wrote:
>> >> > Hi Dave,
>> >> >
>> >> > I split the linting out into an intermediate commit, and rebased on
>> >> > top
>> >> > of
>> >> > master.
>> >>
>> >> Unfortunately, it still doesn't apply:
>> >>
>> >> error: patch failed: web/regression/javascript/test-main.js:1
>> >> error: removal patch leaves file contents
>> >> error: web/regression/javascript/test-main.js: patch does not apply
>> >> Checking patch web/regression/requirements.txt...
>> >> Checking patch web/webpack.config.js...
>> >> Checking patch web/webpack.test.config.js...
>> >> Checking patch web/yarn.lock...
>> >> error: web/yarn.lock: already exists in working directory
>> >> Applied patch .gitignore cleanly.
>> >> Applied patch Make.bat cleanly.
>> >> Applied patch README cleanly.
>> >> Applied patch pkg/mac/build.sh cleanly.
>> >> Applied patch pkg/pip/build.sh cleanly.
>> >> Applied patch pkg/src/build.sh cleanly.
>> >> Applied patch web/.eslintrc.js cleanly.
>> >> Applied patch web/karma.conf.js cleanly.
>> >> Applied patch web/package.json cleanly.
>> >> Applied patch web/pgAdmin4.py cleanly.
>> >> Applied patch web/pgadmin/static/jsx/components.jsx cleanly.
>> >> Applied patch web/pgadmin/tools/javascript/__init__.py cleanly.
>> >> Applied patch web/pgadmin/tools/javascript/javascript_bundler.py
>> >> cleanly.
>> >> Applied patch web/pgadmin/tools/javascript/tests/__init__.py cleanly.
>> >> Applied patch
>> >> web/pgadmin/tools/javascript/tests/test_javascript_bundler.py
>> >> cleanly.
>> >> Applied patch web/regression/README cleanly.
>> >> Applied patch
>> >> web/regression/javascript/jasmine_capture_warnings_beforeall.js
>> >> cleanly.
>> >> Applied patch web/regression/requirements.txt cleanly.
>> >> Applied patch web/webpack.config.js cleanly.
>> >> Applied patch web/webpack.test.config.js cleanly.
>> >>
>> >> The second (lint update) patch is even worse, with significant number
>> >> change that just don't want to apply.
>> >>
>> >> Clearly yarn.lock needs to be removed from there repo.
>> >>
>> >> Once I can apply a version of this, how should I be running the linter
>> >> and the unit tests?
>> >>
>> >> --
>> >> Dave Page
>> >> Blog: http://pgsnake.blogspot.com
>> >> Twitter: @pgsnake
>> >>
>> >> EnterpriseDB UK: http://www.enterprisedb.com
>> >> The Enterprise PostgreSQL Company
>> >
>> >
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Вложения

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
Hi,

So 01 and 02 are now committed :-).

03 has a couple of problems though (likely the same):

- Running the webpacker results in:

(pgadmin4)piranha:web dpage$ yarn run webpacker
yarn run v0.24.4
$ yarn run webpack -- --optimize-minimize --config webpack.config.js
yarn run v0.24.4
$ "/Users/dpage/git/pgadmin4/web/node_modules/.bin/webpack"
--optimize-minimize --config webpack.config.js
(node:19446) DeprecationWarning: loaderUtils.parseQuery() received a
non-string value which can be problematic, see
https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major
version of loader-utils.
Hash: a5e75aa70eb6b09bdb78
Version: webpack 2.3.3
Time: 3983ms
             Asset     Size  Chunks             Chunk Names
reactComponents.js   222 kB       0  [emitted]  reactComponents
        history.js  1.58 kB       1  [emitted]  history
   [0] /Users/dpage/git/pgadmin4/web/~/process/browser.js 5.42 kB {0} [built]
  [18] /Users/dpage/git/pgadmin4/web/~/react-dom/lib/ReactReconciler.js
6.21 kB {0} [built]
  [19] /Users/dpage/git/pgadmin4/web/~/react/lib/React.js 2.69 kB {0} [built]
  [31] /Users/dpage/git/pgadmin4/web/~/react/react.js 56 bytes {0} [built]
  [80] ./js/history/history_collection.js 1.91 kB {1} [built]
  [81] ./jsx/history/query_history.jsx 3.65 kB {0} [built]
  [82] /Users/dpage/git/pgadmin4/web/~/react-dom/index.js 59 bytes {0} [built]
  [83] ./js/history/index.js 690 bytes {1} [built]
  [84] ./jsx/components.jsx 599 bytes {0} [built]
  [85] ./jsx/history/query_history_entry.jsx 5.21 kB {0} [built]
 [113] /Users/dpage/git/pgadmin4/web/~/react-dom/lib/ReactDOM.js 5.14
kB {0} [built]
 [175] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactDOMFactories.js
5.53 kB {0} [built]
 [176] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactPropTypes.js
15.8 kB {0} [built]
 [177] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactPureComponent.js
1.32 kB {0} [built]
 [178] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactVersion.js 350
bytes {0} [built]
    + 167 hidden modules

ERROR in ./jsx/history/query_history_entry.jsx
Module not found: Error: Can't resolve 'immutability-helper' in
'/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
 @ ./jsx/history/query_history_entry.jsx 13:26-56
 @ ./jsx/history/query_history.jsx
 @ ./jsx/components.jsx

ERROR in ./jsx/history/query_history_entry.jsx
Module not found: Error: Can't resolve 'moment' in
'/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
 @ ./jsx/history/query_history_entry.jsx 17:14-31
 @ ./jsx/history/query_history.jsx
 @ ./jsx/components.jsx
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
this command


- If I try to run pgAdmin, I get a script error in the UI, and console
output as attached (sorry for the screenshot, I've yet to find a good
way to copy/paste that info without losing the formatting).

Thanks.


On Mon, Jun 12, 2017 at 3:53 PM, Shruti B Iyer <siyer@pivotal.io> wrote:
> Hi Hackers,
>
> Attached are the updated patches that apply on top of master.
>
> Thanks,
> Shruti & Joao
>
>
> On Mon, Jun 12, 2017 at 10:44 AM Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi Shruti
>>
>> On Mon, Jun 12, 2017 at 3:24 PM, Shruti B Iyer <siyer@pivotal.io> wrote:
>> >
>> > Hello Dave,
>> >
>> > Thanks for making those fixes and sharing them with us. We tried
>> > applying
>> > the patch and it looks like there are some missing file changes from
>> > your
>> > patch that were present in ours, like the Make.bat file changes. But we
>> > will
>> > add them when we send you the new patches.
>>
>> Hmm, I wonder if I missed them because I applied the patch in a sub
>> directory.
>>
>> > While trying to generate the new patches we realized some tests are
>> > failing
>> > in master branch due to an internal server error:
>> >
>> > 2017-06-12 10:04:11,938: INFO werkzeug: 127.0.0.1 - - [12/Jun/2017
>> > 10:04:11]
>> > "GET /browser/table/sql/1/1/12669/2200/81920 HTTP/1.1" 500 -
>> > Traceback (most recent call last):
>> >   File
>> >
>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>> > line 2000, in __call__
>> >     return self.wsgi_app(environ, start_response)
>> >   File
>> >
>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>> > line 1991, in wsgi_app
>> >     response = self.make_response(self.handle_exception(e))
>> >   File
>> >
>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>> > line 1567, in handle_exception
>> >     reraise(exc_type, exc_value, tb)
>> >   File
>> >
>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>> > line 1988, in wsgi_app
>> >     response = self.full_dispatch_request()
>> >   File
>> >
>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>> > line 1641, in full_dispatch_request
>> >     rv = self.handle_user_exception(e)
>> >   File
>> >
>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>> > line 1544, in handle_user_exception
>> >     reraise(exc_type, exc_value, tb)
>> >   File
>> >
>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>> > line 1639, in full_dispatch_request
>> >     rv = self.dispatch_request()
>> >   File
>> >
>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>> > line 1625, in dispatch_request
>> >     return self.view_functions[rule.endpoint](**req.view_args)
>> >   File
>> >
>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/views.py",
>> > line 84, in view
>> >     return self.dispatch_request(*args, **kwargs)
>> >   File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/utils.py",
>> > line 235, in dispatch_request
>> >     return method(*args, **kwargs)
>> >   File
>> >
>> >
"/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>> > line 315, in wrap
>> >     return f(*args, **kwargs)
>> >   File
>> >
>> >
"/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>> > line 2555, in sql
>> >     data = self._formatter(did, scid, tid, data)
>> >   File
>> >
>> >
"/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>> > line 1081, in _formatter
>> >     data = self._columns_formatter(tid, data)
>> >   File
>> >
>> >
"/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>> > line 663, in _columns_formatter
>> >     column['attlen'] = matchObj.group(1)
>> > AttributeError: 'NoneType' object has no attribute 'group'
>> >
>> > Was this introduced in a previous patch?
>>
>> Yes, it looks like it. For some reason it's not failing on the Jenkins
>> server though. I'll ask Khushboo to fix it.
>>
>> > We will recreate the patches and send them ASAP.
>>
>> Thanks!
>>
>> > Thanks
>> > Shruti & Joao
>> >
>> > On Mon, Jun 12, 2017 at 6:59 AM Dave Page <dpage@pgadmin.org> wrote:
>> >>
>> >> Hi
>> >>
>> >> OK, so Ashesh and I spend much of the morning on this.
>> >>
>> >> Patch 01 - Applied.
>> >> Patch 02:
>> >>
>> >> - karma.conf.js wouldn't patch; I've manually handled that.
>> >> - test-main.js wouldn't patch. The diff looked like it was trying to
>> >> empty it; I have removed it instead.
>> >> - The imports in pgAdmin4.py need to be made after the app root is
>> >> added to the path.
>> >> - The JS bundler should be in pgadmin/utils, not pgadmin/tools (which
>> >> is intended for plugin modules)
>> >> - The tests were failing following some changes Ashesh pushed earlier
>> >> to add a client-side url_for function.
>> >> - pgAdmin4.py was attempting to run the bundler on every startup. I've
>> >> wrapped those called in "if config.DEBUG:" conditionals, as typically
>> >> an installation for an end-user will be in a read-only directory.
>> >>
>> >> We've fixed all of that in the attached patch. I'm not sure why it's
>> >> so much bigger than yours.
>> >>
>> >> The following issues are outstanding; please take a look at them:
>> >>
>> >> - There is no update to the Windows installer generation code (needed
>> >> in 2 places unfortunately; Make.bat and Make-MinGW.bat).
>> >>
>> >> - The updates to the other packages call "yarn run webpacker" which is
>> >> an undefined target.
>> >>
>> >> I haven't looked at patch 03 yet, but Ashesh did tell me it won't
>> >> apply for him. Patch 4 is also untested at this stage.
>> >>
>> >> If the issues above can be fixed, we can get patch 2 applied then move
>> >> on from there.
>> >>
>> >> I'll hold off on Harshal's patch for the Query Tool's load on demand
>> >> to give you a chance to get this done.
>> >>
>> >> Thanks.
>> >>
>> >> On Sat, Jun 10, 2017 at 2:52 AM, George Gelashvili
>> >> <ggelashvili@pivotal.io> wrote:
>> >> > Hi Dave,
>> >> >
>> >> > Our patch touches code also changed by the patches that were recently
>> >> > committed.
>> >> > That's likely what's causing this issue. We've rebased on top of the
>> >> > new
>> >> > state of master.
>> >> >
>> >> > We had initially kept the yarn.lock .gitignored, but ran into an
>> >> > issue
>> >> > rather early on where an upgraded dependency introduced a regression.
>> >> > Checking-in the yarn.lock provides the "know your dependency version"
>> >> > benefit of vendorizing code without vendorization's drawback of
>> >> > having
>> >> > to
>> >> > manually manage your dependencies.
>> >> >
>> >> > It is safe to delete a yarn.lock before applying a patch, as you are
>> >> > authoring master. It provides a history of the versions of each
>> >> > dependency
>> >> > that were working at the point in time of the commit. By contrast,
>> >> > package.json provides approximate versions and leaves room for
>> >> > fixes/improvements by the dependency authors to be pulled in as they
>> >> > become
>> >> > available.
>> >> >
>> >> > To run linter and tests:
>> >> >
>> >> > The tasks that Grunt used to manage are now defined as a set of
>> >> > scripts
>> >> > in
>> >> > the package.json
>> >> > After applying the patches--which may require deleting yarn.lock for
>> >> > the
>> >> > first patch--you should cd web && yarn install
>> >> >
>> >> > Then yarn test will run the linter, jasmine specs, and python tests
>> >> > including feature tests, in that order, exiting early if there are
>> >> > failures/errors.
>> >> > At the moment, the CheckForViewData test is failing on master as well
>> >> > as
>> >> > in
>> >> > each of these patches; that should be resolved as RM2477.
>> >> >
>> >> > Thanks!
>> >> > George and Matt
>> >> >
>> >> >
>> >> > On Thu, Jun 8, 2017 at 9:15 AM, Dave Page <dpage@pgadmin.org> wrote:
>> >> >>
>> >> >> Hi George
>> >> >>
>> >> >> On Wed, Jun 7, 2017 at 10:21 PM, George Gelashvili
>> >> >> <ggelashvili@pivotal.io> wrote:
>> >> >> > Hi Dave,
>> >> >> >
>> >> >> > I split the linting out into an intermediate commit, and rebased
>> >> >> > on
>> >> >> > top
>> >> >> > of
>> >> >> > master.
>> >> >>
>> >> >> Unfortunately, it still doesn't apply:
>> >> >>
>> >> >> error: patch failed: web/regression/javascript/test-main.js:1
>> >> >> error: removal patch leaves file contents
>> >> >> error: web/regression/javascript/test-main.js: patch does not apply
>> >> >> Checking patch web/regression/requirements.txt...
>> >> >> Checking patch web/webpack.config.js...
>> >> >> Checking patch web/webpack.test.config.js...
>> >> >> Checking patch web/yarn.lock...
>> >> >> error: web/yarn.lock: already exists in working directory
>> >> >> Applied patch .gitignore cleanly.
>> >> >> Applied patch Make.bat cleanly.
>> >> >> Applied patch README cleanly.
>> >> >> Applied patch pkg/mac/build.sh cleanly.
>> >> >> Applied patch pkg/pip/build.sh cleanly.
>> >> >> Applied patch pkg/src/build.sh cleanly.
>> >> >> Applied patch web/.eslintrc.js cleanly.
>> >> >> Applied patch web/karma.conf.js cleanly.
>> >> >> Applied patch web/package.json cleanly.
>> >> >> Applied patch web/pgAdmin4.py cleanly.
>> >> >> Applied patch web/pgadmin/static/jsx/components.jsx cleanly.
>> >> >> Applied patch web/pgadmin/tools/javascript/__init__.py cleanly.
>> >> >> Applied patch web/pgadmin/tools/javascript/javascript_bundler.py
>> >> >> cleanly.
>> >> >> Applied patch web/pgadmin/tools/javascript/tests/__init__.py
>> >> >> cleanly.
>> >> >> Applied patch
>> >> >> web/pgadmin/tools/javascript/tests/test_javascript_bundler.py
>> >> >> cleanly.
>> >> >> Applied patch web/regression/README cleanly.
>> >> >> Applied patch
>> >> >> web/regression/javascript/jasmine_capture_warnings_beforeall.js
>> >> >> cleanly.
>> >> >> Applied patch web/regression/requirements.txt cleanly.
>> >> >> Applied patch web/webpack.config.js cleanly.
>> >> >> Applied patch web/webpack.test.config.js cleanly.
>> >> >>
>> >> >> The second (lint update) patch is even worse, with significant
>> >> >> number
>> >> >> change that just don't want to apply.
>> >> >>
>> >> >> Clearly yarn.lock needs to be removed from there repo.
>> >> >>
>> >> >> Once I can apply a version of this, how should I be running the
>> >> >> linter
>> >> >> and the unit tests?
>> >> >>
>> >> >> --
>> >> >> Dave Page
>> >> >> Blog: http://pgsnake.blogspot.com
>> >> >> Twitter: @pgsnake
>> >> >>
>> >> >> EnterpriseDB UK: http://www.enterprisedb.com
>> >> >> The Enterprise PostgreSQL Company
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Dave Page
>> >> Blog: http://pgsnake.blogspot.com
>> >> Twitter: @pgsnake
>> >>
>> >> EnterpriseDB UK: http://www.enterprisedb.com
>> >> The Enterprise PostgreSQL Company
>> >>
>> >> --
>> >> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> >> To make changes to your subscription:
>> >> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Вложения

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
To add to that; running the JS tests gives:

ERROR in ./regression/javascript/history/query_history_entry_spec.jsx
Module not found: Error: Can't resolve 'jasmine-enzyme' in
'/Users/dpage/git/pgadmin4/web/regression/javascript/history'
 @ ./regression/javascript/history/query_history_entry_spec.jsx 13:21-46

ERROR in ./pgadmin/static/jsx/history/query_history_entry.jsx
Module not found: Error: Can't resolve 'immutability-helper' in
'/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
 @ ./pgadmin/static/jsx/history/query_history_entry.jsx 13:26-56
 @ ./regression/javascript/history/query_history_entry_spec.jsx

ERROR in ./pgadmin/static/jsx/history/query_history_entry.jsx
Module not found: Error: Can't resolve 'moment' in
'/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
 @ ./pgadmin/static/jsx/history/query_history_entry.jsx 17:14-31
 @ ./regression/javascript/history/query_history_entry_spec.jsx

ERROR in ./regression/javascript/history/query_history_spec.jsx
Module not found: Error: Can't resolve 'jasmine-enzyme' in
'/Users/dpage/git/pgadmin4/web/regression/javascript/history'
 @ ./regression/javascript/history/query_history_spec.jsx 19:21-46
webpack: Failed to compile.
PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  Error: Cannot find module "immutability-helper"
  at regression/javascript/history/query_history_entry_spec.jsx:30705


PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  Error: Cannot find module "immutability-helper"
  at regression/javascript/history/query_history_spec.jsx:30705


error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
this command.


Also, while I think of it, why the addition of the delay to app_starter.py?


On Mon, Jun 12, 2017 at 5:12 PM, Dave Page <dpage@pgadmin.org> wrote:
> Hi,
>
> So 01 and 02 are now committed :-).
>
> 03 has a couple of problems though (likely the same):
>
> - Running the webpacker results in:
>
> (pgadmin4)piranha:web dpage$ yarn run webpacker
> yarn run v0.24.4
> $ yarn run webpack -- --optimize-minimize --config webpack.config.js
> yarn run v0.24.4
> $ "/Users/dpage/git/pgadmin4/web/node_modules/.bin/webpack"
> --optimize-minimize --config webpack.config.js
> (node:19446) DeprecationWarning: loaderUtils.parseQuery() received a
> non-string value which can be problematic, see
> https://github.com/webpack/loader-utils/issues/56
> parseQuery() will be replaced with getOptions() in the next major
> version of loader-utils.
> Hash: a5e75aa70eb6b09bdb78
> Version: webpack 2.3.3
> Time: 3983ms
>              Asset     Size  Chunks             Chunk Names
> reactComponents.js   222 kB       0  [emitted]  reactComponents
>         history.js  1.58 kB       1  [emitted]  history
>    [0] /Users/dpage/git/pgadmin4/web/~/process/browser.js 5.42 kB {0} [built]
>   [18] /Users/dpage/git/pgadmin4/web/~/react-dom/lib/ReactReconciler.js
> 6.21 kB {0} [built]
>   [19] /Users/dpage/git/pgadmin4/web/~/react/lib/React.js 2.69 kB {0} [built]
>   [31] /Users/dpage/git/pgadmin4/web/~/react/react.js 56 bytes {0} [built]
>   [80] ./js/history/history_collection.js 1.91 kB {1} [built]
>   [81] ./jsx/history/query_history.jsx 3.65 kB {0} [built]
>   [82] /Users/dpage/git/pgadmin4/web/~/react-dom/index.js 59 bytes {0} [built]
>   [83] ./js/history/index.js 690 bytes {1} [built]
>   [84] ./jsx/components.jsx 599 bytes {0} [built]
>   [85] ./jsx/history/query_history_entry.jsx 5.21 kB {0} [built]
>  [113] /Users/dpage/git/pgadmin4/web/~/react-dom/lib/ReactDOM.js 5.14
> kB {0} [built]
>  [175] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactDOMFactories.js
> 5.53 kB {0} [built]
>  [176] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactPropTypes.js
> 15.8 kB {0} [built]
>  [177] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactPureComponent.js
> 1.32 kB {0} [built]
>  [178] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactVersion.js 350
> bytes {0} [built]
>     + 167 hidden modules
>
> ERROR in ./jsx/history/query_history_entry.jsx
> Module not found: Error: Can't resolve 'immutability-helper' in
> '/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
>  @ ./jsx/history/query_history_entry.jsx 13:26-56
>  @ ./jsx/history/query_history.jsx
>  @ ./jsx/components.jsx
>
> ERROR in ./jsx/history/query_history_entry.jsx
> Module not found: Error: Can't resolve 'moment' in
> '/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
>  @ ./jsx/history/query_history_entry.jsx 17:14-31
>  @ ./jsx/history/query_history.jsx
>  @ ./jsx/components.jsx
> error Command failed with exit code 2.
> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
> this command.
> error Command failed with exit code 1.
> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
> this command
>
>
> - If I try to run pgAdmin, I get a script error in the UI, and console
> output as attached (sorry for the screenshot, I've yet to find a good
> way to copy/paste that info without losing the formatting).
>
> Thanks.
>
>
> On Mon, Jun 12, 2017 at 3:53 PM, Shruti B Iyer <siyer@pivotal.io> wrote:
>> Hi Hackers,
>>
>> Attached are the updated patches that apply on top of master.
>>
>> Thanks,
>> Shruti & Joao
>>
>>
>> On Mon, Jun 12, 2017 at 10:44 AM Dave Page <dpage@pgadmin.org> wrote:
>>>
>>> Hi Shruti
>>>
>>> On Mon, Jun 12, 2017 at 3:24 PM, Shruti B Iyer <siyer@pivotal.io> wrote:
>>> >
>>> > Hello Dave,
>>> >
>>> > Thanks for making those fixes and sharing them with us. We tried
>>> > applying
>>> > the patch and it looks like there are some missing file changes from
>>> > your
>>> > patch that were present in ours, like the Make.bat file changes. But we
>>> > will
>>> > add them when we send you the new patches.
>>>
>>> Hmm, I wonder if I missed them because I applied the patch in a sub
>>> directory.
>>>
>>> > While trying to generate the new patches we realized some tests are
>>> > failing
>>> > in master branch due to an internal server error:
>>> >
>>> > 2017-06-12 10:04:11,938: INFO werkzeug: 127.0.0.1 - - [12/Jun/2017
>>> > 10:04:11]
>>> > "GET /browser/table/sql/1/1/12669/2200/81920 HTTP/1.1" 500 -
>>> > Traceback (most recent call last):
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> > line 2000, in __call__
>>> >     return self.wsgi_app(environ, start_response)
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> > line 1991, in wsgi_app
>>> >     response = self.make_response(self.handle_exception(e))
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> > line 1567, in handle_exception
>>> >     reraise(exc_type, exc_value, tb)
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> > line 1988, in wsgi_app
>>> >     response = self.full_dispatch_request()
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> > line 1641, in full_dispatch_request
>>> >     rv = self.handle_user_exception(e)
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> > line 1544, in handle_user_exception
>>> >     reraise(exc_type, exc_value, tb)
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> > line 1639, in full_dispatch_request
>>> >     rv = self.dispatch_request()
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> > line 1625, in dispatch_request
>>> >     return self.view_functions[rule.endpoint](**req.view_args)
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/views.py",
>>> > line 84, in view
>>> >     return self.dispatch_request(*args, **kwargs)
>>> >   File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/utils.py",
>>> > line 235, in dispatch_request
>>> >     return method(*args, **kwargs)
>>> >   File
>>> >
>>> >
"/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>>> > line 315, in wrap
>>> >     return f(*args, **kwargs)
>>> >   File
>>> >
>>> >
"/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>>> > line 2555, in sql
>>> >     data = self._formatter(did, scid, tid, data)
>>> >   File
>>> >
>>> >
"/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>>> > line 1081, in _formatter
>>> >     data = self._columns_formatter(tid, data)
>>> >   File
>>> >
>>> >
"/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>>> > line 663, in _columns_formatter
>>> >     column['attlen'] = matchObj.group(1)
>>> > AttributeError: 'NoneType' object has no attribute 'group'
>>> >
>>> > Was this introduced in a previous patch?
>>>
>>> Yes, it looks like it. For some reason it's not failing on the Jenkins
>>> server though. I'll ask Khushboo to fix it.
>>>
>>> > We will recreate the patches and send them ASAP.
>>>
>>> Thanks!
>>>
>>> > Thanks
>>> > Shruti & Joao
>>> >
>>> > On Mon, Jun 12, 2017 at 6:59 AM Dave Page <dpage@pgadmin.org> wrote:
>>> >>
>>> >> Hi
>>> >>
>>> >> OK, so Ashesh and I spend much of the morning on this.
>>> >>
>>> >> Patch 01 - Applied.
>>> >> Patch 02:
>>> >>
>>> >> - karma.conf.js wouldn't patch; I've manually handled that.
>>> >> - test-main.js wouldn't patch. The diff looked like it was trying to
>>> >> empty it; I have removed it instead.
>>> >> - The imports in pgAdmin4.py need to be made after the app root is
>>> >> added to the path.
>>> >> - The JS bundler should be in pgadmin/utils, not pgadmin/tools (which
>>> >> is intended for plugin modules)
>>> >> - The tests were failing following some changes Ashesh pushed earlier
>>> >> to add a client-side url_for function.
>>> >> - pgAdmin4.py was attempting to run the bundler on every startup. I've
>>> >> wrapped those called in "if config.DEBUG:" conditionals, as typically
>>> >> an installation for an end-user will be in a read-only directory.
>>> >>
>>> >> We've fixed all of that in the attached patch. I'm not sure why it's
>>> >> so much bigger than yours.
>>> >>
>>> >> The following issues are outstanding; please take a look at them:
>>> >>
>>> >> - There is no update to the Windows installer generation code (needed
>>> >> in 2 places unfortunately; Make.bat and Make-MinGW.bat).
>>> >>
>>> >> - The updates to the other packages call "yarn run webpacker" which is
>>> >> an undefined target.
>>> >>
>>> >> I haven't looked at patch 03 yet, but Ashesh did tell me it won't
>>> >> apply for him. Patch 4 is also untested at this stage.
>>> >>
>>> >> If the issues above can be fixed, we can get patch 2 applied then move
>>> >> on from there.
>>> >>
>>> >> I'll hold off on Harshal's patch for the Query Tool's load on demand
>>> >> to give you a chance to get this done.
>>> >>
>>> >> Thanks.
>>> >>
>>> >> On Sat, Jun 10, 2017 at 2:52 AM, George Gelashvili
>>> >> <ggelashvili@pivotal.io> wrote:
>>> >> > Hi Dave,
>>> >> >
>>> >> > Our patch touches code also changed by the patches that were recently
>>> >> > committed.
>>> >> > That's likely what's causing this issue. We've rebased on top of the
>>> >> > new
>>> >> > state of master.
>>> >> >
>>> >> > We had initially kept the yarn.lock .gitignored, but ran into an
>>> >> > issue
>>> >> > rather early on where an upgraded dependency introduced a regression.
>>> >> > Checking-in the yarn.lock provides the "know your dependency version"
>>> >> > benefit of vendorizing code without vendorization's drawback of
>>> >> > having
>>> >> > to
>>> >> > manually manage your dependencies.
>>> >> >
>>> >> > It is safe to delete a yarn.lock before applying a patch, as you are
>>> >> > authoring master. It provides a history of the versions of each
>>> >> > dependency
>>> >> > that were working at the point in time of the commit. By contrast,
>>> >> > package.json provides approximate versions and leaves room for
>>> >> > fixes/improvements by the dependency authors to be pulled in as they
>>> >> > become
>>> >> > available.
>>> >> >
>>> >> > To run linter and tests:
>>> >> >
>>> >> > The tasks that Grunt used to manage are now defined as a set of
>>> >> > scripts
>>> >> > in
>>> >> > the package.json
>>> >> > After applying the patches--which may require deleting yarn.lock for
>>> >> > the
>>> >> > first patch--you should cd web && yarn install
>>> >> >
>>> >> > Then yarn test will run the linter, jasmine specs, and python tests
>>> >> > including feature tests, in that order, exiting early if there are
>>> >> > failures/errors.
>>> >> > At the moment, the CheckForViewData test is failing on master as well
>>> >> > as
>>> >> > in
>>> >> > each of these patches; that should be resolved as RM2477.
>>> >> >
>>> >> > Thanks!
>>> >> > George and Matt
>>> >> >
>>> >> >
>>> >> > On Thu, Jun 8, 2017 at 9:15 AM, Dave Page <dpage@pgadmin.org> wrote:
>>> >> >>
>>> >> >> Hi George
>>> >> >>
>>> >> >> On Wed, Jun 7, 2017 at 10:21 PM, George Gelashvili
>>> >> >> <ggelashvili@pivotal.io> wrote:
>>> >> >> > Hi Dave,
>>> >> >> >
>>> >> >> > I split the linting out into an intermediate commit, and rebased
>>> >> >> > on
>>> >> >> > top
>>> >> >> > of
>>> >> >> > master.
>>> >> >>
>>> >> >> Unfortunately, it still doesn't apply:
>>> >> >>
>>> >> >> error: patch failed: web/regression/javascript/test-main.js:1
>>> >> >> error: removal patch leaves file contents
>>> >> >> error: web/regression/javascript/test-main.js: patch does not apply
>>> >> >> Checking patch web/regression/requirements.txt...
>>> >> >> Checking patch web/webpack.config.js...
>>> >> >> Checking patch web/webpack.test.config.js...
>>> >> >> Checking patch web/yarn.lock...
>>> >> >> error: web/yarn.lock: already exists in working directory
>>> >> >> Applied patch .gitignore cleanly.
>>> >> >> Applied patch Make.bat cleanly.
>>> >> >> Applied patch README cleanly.
>>> >> >> Applied patch pkg/mac/build.sh cleanly.
>>> >> >> Applied patch pkg/pip/build.sh cleanly.
>>> >> >> Applied patch pkg/src/build.sh cleanly.
>>> >> >> Applied patch web/.eslintrc.js cleanly.
>>> >> >> Applied patch web/karma.conf.js cleanly.
>>> >> >> Applied patch web/package.json cleanly.
>>> >> >> Applied patch web/pgAdmin4.py cleanly.
>>> >> >> Applied patch web/pgadmin/static/jsx/components.jsx cleanly.
>>> >> >> Applied patch web/pgadmin/tools/javascript/__init__.py cleanly.
>>> >> >> Applied patch web/pgadmin/tools/javascript/javascript_bundler.py
>>> >> >> cleanly.
>>> >> >> Applied patch web/pgadmin/tools/javascript/tests/__init__.py
>>> >> >> cleanly.
>>> >> >> Applied patch
>>> >> >> web/pgadmin/tools/javascript/tests/test_javascript_bundler.py
>>> >> >> cleanly.
>>> >> >> Applied patch web/regression/README cleanly.
>>> >> >> Applied patch
>>> >> >> web/regression/javascript/jasmine_capture_warnings_beforeall.js
>>> >> >> cleanly.
>>> >> >> Applied patch web/regression/requirements.txt cleanly.
>>> >> >> Applied patch web/webpack.config.js cleanly.
>>> >> >> Applied patch web/webpack.test.config.js cleanly.
>>> >> >>
>>> >> >> The second (lint update) patch is even worse, with significant
>>> >> >> number
>>> >> >> change that just don't want to apply.
>>> >> >>
>>> >> >> Clearly yarn.lock needs to be removed from there repo.
>>> >> >>
>>> >> >> Once I can apply a version of this, how should I be running the
>>> >> >> linter
>>> >> >> and the unit tests?
>>> >> >>
>>> >> >> --
>>> >> >> Dave Page
>>> >> >> Blog: http://pgsnake.blogspot.com
>>> >> >> Twitter: @pgsnake
>>> >> >>
>>> >> >> EnterpriseDB UK: http://www.enterprisedb.com
>>> >> >> The Enterprise PostgreSQL Company
>>> >> >
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Dave Page
>>> >> Blog: http://pgsnake.blogspot.com
>>> >> Twitter: @pgsnake
>>> >>
>>> >> EnterpriseDB UK: http://www.enterprisedb.com
>>> >> The Enterprise PostgreSQL Company
>>> >>
>>> >> --
>>> >> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>>> >> To make changes to your subscription:
>>> >> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Shruti B Iyer
Дата:
Hi Dave,

We regenerated the patch to add new tasks to package.json to compile react code for development and to not minimize it. This should fix the error you captured in the screenshot.

The new task to lint and bundle everything for development is:
yarn run bundle:dev

The new task only bundle everything is:
yarn run webpacker:dev

We also changed the task test:feature to bundle without optimization before we start the tests.

When we ran these commands in our machine, they did not display any error. Is it possible that you forgot to run yarn install before running the webpacker task? We are asking this because the errors look like missing node packages.

Thanks
Shruti & Joao

On Mon, Jun 12, 2017 at 12:15 PM Dave Page <dpage@pgadmin.org> wrote:
To add to that; running the JS tests gives:

ERROR in ./regression/javascript/history/query_history_entry_spec.jsx
Module not found: Error: Can't resolve 'jasmine-enzyme' in
'/Users/dpage/git/pgadmin4/web/regression/javascript/history'
 @ ./regression/javascript/history/query_history_entry_spec.jsx 13:21-46

ERROR in ./pgadmin/static/jsx/history/query_history_entry.jsx
Module not found: Error: Can't resolve 'immutability-helper' in
'/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
 @ ./pgadmin/static/jsx/history/query_history_entry.jsx 13:26-56
 @ ./regression/javascript/history/query_history_entry_spec.jsx

ERROR in ./pgadmin/static/jsx/history/query_history_entry.jsx
Module not found: Error: Can't resolve 'moment' in
'/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
 @ ./pgadmin/static/jsx/history/query_history_entry.jsx 17:14-31
 @ ./regression/javascript/history/query_history_entry_spec.jsx

ERROR in ./regression/javascript/history/query_history_spec.jsx
Module not found: Error: Can't resolve 'jasmine-enzyme' in
'/Users/dpage/git/pgadmin4/web/regression/javascript/history'
 @ ./regression/javascript/history/query_history_spec.jsx 19:21-46
webpack: Failed to compile.
PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  Error: Cannot find module "immutability-helper"
  at regression/javascript/history/query_history_entry_spec.jsx:30705


PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  Error: Cannot find module "immutability-helper"
  at regression/javascript/history/query_history_spec.jsx:30705


error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
this command.


Also, while I think of it, why the addition of the delay to app_starter.py?


On Mon, Jun 12, 2017 at 5:12 PM, Dave Page <dpage@pgadmin.org> wrote:
> Hi,
>
> So 01 and 02 are now committed :-).
>
> 03 has a couple of problems though (likely the same):
>
> - Running the webpacker results in:
>
> (pgadmin4)piranha:web dpage$ yarn run webpacker
> yarn run v0.24.4
> $ yarn run webpack -- --optimize-minimize --config webpack.config.js
> yarn run v0.24.4
> $ "/Users/dpage/git/pgadmin4/web/node_modules/.bin/webpack"
> --optimize-minimize --config webpack.config.js
> (node:19446) DeprecationWarning: loaderUtils.parseQuery() received a
> non-string value which can be problematic, see
> https://github.com/webpack/loader-utils/issues/56
> parseQuery() will be replaced with getOptions() in the next major
> version of loader-utils.
> Hash: a5e75aa70eb6b09bdb78
> Version: webpack 2.3.3
> Time: 3983ms
>              Asset     Size  Chunks             Chunk Names
> reactComponents.js   222 kB       0  [emitted]  reactComponents
>         history.js  1.58 kB       1  [emitted]  history
>    [0] /Users/dpage/git/pgadmin4/web/~/process/browser.js 5.42 kB {0} [built]
>   [18] /Users/dpage/git/pgadmin4/web/~/react-dom/lib/ReactReconciler.js
> 6.21 kB {0} [built]
>   [19] /Users/dpage/git/pgadmin4/web/~/react/lib/React.js 2.69 kB {0} [built]
>   [31] /Users/dpage/git/pgadmin4/web/~/react/react.js 56 bytes {0} [built]
>   [80] ./js/history/history_collection.js 1.91 kB {1} [built]
>   [81] ./jsx/history/query_history.jsx 3.65 kB {0} [built]
>   [82] /Users/dpage/git/pgadmin4/web/~/react-dom/index.js 59 bytes {0} [built]
>   [83] ./js/history/index.js 690 bytes {1} [built]
>   [84] ./jsx/components.jsx 599 bytes {0} [built]
>   [85] ./jsx/history/query_history_entry.jsx 5.21 kB {0} [built]
>  [113] /Users/dpage/git/pgadmin4/web/~/react-dom/lib/ReactDOM.js 5.14
> kB {0} [built]
>  [175] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactDOMFactories.js
> 5.53 kB {0} [built]
>  [176] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactPropTypes.js
> 15.8 kB {0} [built]
>  [177] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactPureComponent.js
> 1.32 kB {0} [built]
>  [178] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactVersion.js 350
> bytes {0} [built]
>     + 167 hidden modules
>
> ERROR in ./jsx/history/query_history_entry.jsx
> Module not found: Error: Can't resolve 'immutability-helper' in
> '/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
>  @ ./jsx/history/query_history_entry.jsx 13:26-56
>  @ ./jsx/history/query_history.jsx
>  @ ./jsx/components.jsx
>
> ERROR in ./jsx/history/query_history_entry.jsx
> Module not found: Error: Can't resolve 'moment' in
> '/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
>  @ ./jsx/history/query_history_entry.jsx 17:14-31
>  @ ./jsx/history/query_history.jsx
>  @ ./jsx/components.jsx
> error Command failed with exit code 2.
> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
> this command.
> error Command failed with exit code 1.
> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
> this command
>
>
> - If I try to run pgAdmin, I get a script error in the UI, and console
> output as attached (sorry for the screenshot, I've yet to find a good
> way to copy/paste that info without losing the formatting).
>
> Thanks.
>
>
> On Mon, Jun 12, 2017 at 3:53 PM, Shruti B Iyer <siyer@pivotal.io> wrote:
>> Hi Hackers,
>>
>> Attached are the updated patches that apply on top of master.
>>
>> Thanks,
>> Shruti & Joao
>>
>>
>> On Mon, Jun 12, 2017 at 10:44 AM Dave Page <dpage@pgadmin.org> wrote:
>>>
>>> Hi Shruti
>>>
>>> On Mon, Jun 12, 2017 at 3:24 PM, Shruti B Iyer <siyer@pivotal.io> wrote:
>>> >
>>> > Hello Dave,
>>> >
>>> > Thanks for making those fixes and sharing them with us. We tried
>>> > applying
>>> > the patch and it looks like there are some missing file changes from
>>> > your
>>> > patch that were present in ours, like the Make.bat file changes. But we
>>> > will
>>> > add them when we send you the new patches.
>>>
>>> Hmm, I wonder if I missed them because I applied the patch in a sub
>>> directory.
>>>
>>> > While trying to generate the new patches we realized some tests are
>>> > failing
>>> > in master branch due to an internal server error:
>>> >
>>> > 2017-06-12 10:04:11,938: INFO werkzeug: 127.0.0.1 - - [12/Jun/2017
>>> > 10:04:11]
>>> > "GET /browser/table/sql/1/1/12669/2200/81920 HTTP/1.1" 500 -
>>> > Traceback (most recent call last):
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> > line 2000, in __call__
>>> >     return self.wsgi_app(environ, start_response)
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> > line 1991, in wsgi_app
>>> >     response = self.make_response(self.handle_exception(e))
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> > line 1567, in handle_exception
>>> >     reraise(exc_type, exc_value, tb)
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> > line 1988, in wsgi_app
>>> >     response = self.full_dispatch_request()
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> > line 1641, in full_dispatch_request
>>> >     rv = self.handle_user_exception(e)
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> > line 1544, in handle_user_exception
>>> >     reraise(exc_type, exc_value, tb)
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> > line 1639, in full_dispatch_request
>>> >     rv = self.dispatch_request()
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> > line 1625, in dispatch_request
>>> >     return self.view_functions[rule.endpoint](**req.view_args)
>>> >   File
>>> >
>>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/views.py",
>>> > line 84, in view
>>> >     return self.dispatch_request(*args, **kwargs)
>>> >   File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/utils.py",
>>> > line 235, in dispatch_request
>>> >     return method(*args, **kwargs)
>>> >   File
>>> >
>>> > "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>>> > line 315, in wrap
>>> >     return f(*args, **kwargs)
>>> >   File
>>> >
>>> > "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>>> > line 2555, in sql
>>> >     data = self._formatter(did, scid, tid, data)
>>> >   File
>>> >
>>> > "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>>> > line 1081, in _formatter
>>> >     data = self._columns_formatter(tid, data)
>>> >   File
>>> >
>>> > "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>>> > line 663, in _columns_formatter
>>> >     column['attlen'] = matchObj.group(1)
>>> > AttributeError: 'NoneType' object has no attribute 'group'
>>> >
>>> > Was this introduced in a previous patch?
>>>
>>> Yes, it looks like it. For some reason it's not failing on the Jenkins
>>> server though. I'll ask Khushboo to fix it.
>>>
>>> > We will recreate the patches and send them ASAP.
>>>
>>> Thanks!
>>>
>>> > Thanks
>>> > Shruti & Joao
>>> >
>>> > On Mon, Jun 12, 2017 at 6:59 AM Dave Page <dpage@pgadmin.org> wrote:
>>> >>
>>> >> Hi
>>> >>
>>> >> OK, so Ashesh and I spend much of the morning on this.
>>> >>
>>> >> Patch 01 - Applied.
>>> >> Patch 02:
>>> >>
>>> >> - karma.conf.js wouldn't patch; I've manually handled that.
>>> >> - test-main.js wouldn't patch. The diff looked like it was trying to
>>> >> empty it; I have removed it instead.
>>> >> - The imports in pgAdmin4.py need to be made after the app root is
>>> >> added to the path.
>>> >> - The JS bundler should be in pgadmin/utils, not pgadmin/tools (which
>>> >> is intended for plugin modules)
>>> >> - The tests were failing following some changes Ashesh pushed earlier
>>> >> to add a client-side url_for function.
>>> >> - pgAdmin4.py was attempting to run the bundler on every startup. I've
>>> >> wrapped those called in "if config.DEBUG:" conditionals, as typically
>>> >> an installation for an end-user will be in a read-only directory.
>>> >>
>>> >> We've fixed all of that in the attached patch. I'm not sure why it's
>>> >> so much bigger than yours.
>>> >>
>>> >> The following issues are outstanding; please take a look at them:
>>> >>
>>> >> - There is no update to the Windows installer generation code (needed
>>> >> in 2 places unfortunately; Make.bat and Make-MinGW.bat).
>>> >>
>>> >> - The updates to the other packages call "yarn run webpacker" which is
>>> >> an undefined target.
>>> >>
>>> >> I haven't looked at patch 03 yet, but Ashesh did tell me it won't
>>> >> apply for him. Patch 4 is also untested at this stage.
>>> >>
>>> >> If the issues above can be fixed, we can get patch 2 applied then move
>>> >> on from there.
>>> >>
>>> >> I'll hold off on Harshal's patch for the Query Tool's load on demand
>>> >> to give you a chance to get this done.
>>> >>
>>> >> Thanks.
>>> >>
>>> >> On Sat, Jun 10, 2017 at 2:52 AM, George Gelashvili
>>> >> <ggelashvili@pivotal.io> wrote:
>>> >> > Hi Dave,
>>> >> >
>>> >> > Our patch touches code also changed by the patches that were recently
>>> >> > committed.
>>> >> > That's likely what's causing this issue. We've rebased on top of the
>>> >> > new
>>> >> > state of master.
>>> >> >
>>> >> > We had initially kept the yarn.lock .gitignored, but ran into an
>>> >> > issue
>>> >> > rather early on where an upgraded dependency introduced a regression.
>>> >> > Checking-in the yarn.lock provides the "know your dependency version"
>>> >> > benefit of vendorizing code without vendorization's drawback of
>>> >> > having
>>> >> > to
>>> >> > manually manage your dependencies.
>>> >> >
>>> >> > It is safe to delete a yarn.lock before applying a patch, as you are
>>> >> > authoring master. It provides a history of the versions of each
>>> >> > dependency
>>> >> > that were working at the point in time of the commit. By contrast,
>>> >> > package.json provides approximate versions and leaves room for
>>> >> > fixes/improvements by the dependency authors to be pulled in as they
>>> >> > become
>>> >> > available.
>>> >> >
>>> >> > To run linter and tests:
>>> >> >
>>> >> > The tasks that Grunt used to manage are now defined as a set of
>>> >> > scripts
>>> >> > in
>>> >> > the package.json
>>> >> > After applying the patches--which may require deleting yarn.lock for
>>> >> > the
>>> >> > first patch--you should cd web && yarn install
>>> >> >
>>> >> > Then yarn test will run the linter, jasmine specs, and python tests
>>> >> > including feature tests, in that order, exiting early if there are
>>> >> > failures/errors.
>>> >> > At the moment, the CheckForViewData test is failing on master as well
>>> >> > as
>>> >> > in
>>> >> > each of these patches; that should be resolved as RM2477.
>>> >> >
>>> >> > Thanks!
>>> >> > George and Matt
>>> >> >
>>> >> >
>>> >> > On Thu, Jun 8, 2017 at 9:15 AM, Dave Page <dpage@pgadmin.org> wrote:
>>> >> >>
>>> >> >> Hi George
>>> >> >>
>>> >> >> On Wed, Jun 7, 2017 at 10:21 PM, George Gelashvili
>>> >> >> <ggelashvili@pivotal.io> wrote:
>>> >> >> > Hi Dave,
>>> >> >> >
>>> >> >> > I split the linting out into an intermediate commit, and rebased
>>> >> >> > on
>>> >> >> > top
>>> >> >> > of
>>> >> >> > master.
>>> >> >>
>>> >> >> Unfortunately, it still doesn't apply:
>>> >> >>
>>> >> >> error: patch failed: web/regression/javascript/test-main.js:1
>>> >> >> error: removal patch leaves file contents
>>> >> >> error: web/regression/javascript/test-main.js: patch does not apply
>>> >> >> Checking patch web/regression/requirements.txt...
>>> >> >> Checking patch web/webpack.config.js...
>>> >> >> Checking patch web/webpack.test.config.js...
>>> >> >> Checking patch web/yarn.lock...
>>> >> >> error: web/yarn.lock: already exists in working directory
>>> >> >> Applied patch .gitignore cleanly.
>>> >> >> Applied patch Make.bat cleanly.
>>> >> >> Applied patch README cleanly.
>>> >> >> Applied patch pkg/mac/build.sh cleanly.
>>> >> >> Applied patch pkg/pip/build.sh cleanly.
>>> >> >> Applied patch pkg/src/build.sh cleanly.
>>> >> >> Applied patch web/.eslintrc.js cleanly.
>>> >> >> Applied patch web/karma.conf.js cleanly.
>>> >> >> Applied patch web/package.json cleanly.
>>> >> >> Applied patch web/pgAdmin4.py cleanly.
>>> >> >> Applied patch web/pgadmin/static/jsx/components.jsx cleanly.
>>> >> >> Applied patch web/pgadmin/tools/javascript/__init__.py cleanly.
>>> >> >> Applied patch web/pgadmin/tools/javascript/javascript_bundler.py
>>> >> >> cleanly.
>>> >> >> Applied patch web/pgadmin/tools/javascript/tests/__init__.py
>>> >> >> cleanly.
>>> >> >> Applied patch
>>> >> >> web/pgadmin/tools/javascript/tests/test_javascript_bundler.py
>>> >> >> cleanly.
>>> >> >> Applied patch web/regression/README cleanly.
>>> >> >> Applied patch
>>> >> >> web/regression/javascript/jasmine_capture_warnings_beforeall.js
>>> >> >> cleanly.
>>> >> >> Applied patch web/regression/requirements.txt cleanly.
>>> >> >> Applied patch web/webpack.config.js cleanly.
>>> >> >> Applied patch web/webpack.test.config.js cleanly.
>>> >> >>
>>> >> >> The second (lint update) patch is even worse, with significant
>>> >> >> number
>>> >> >> change that just don't want to apply.
>>> >> >>
>>> >> >> Clearly yarn.lock needs to be removed from there repo.
>>> >> >>
>>> >> >> Once I can apply a version of this, how should I be running the
>>> >> >> linter
>>> >> >> and the unit tests?
>>> >> >>
>>> >> >> --
>>> >> >> Dave Page
>>> >> >> Blog: http://pgsnake.blogspot.com
>>> >> >> Twitter: @pgsnake
>>> >> >>
>>> >> >> EnterpriseDB UK: http://www.enterprisedb.com
>>> >> >> The Enterprise PostgreSQL Company
>>> >> >
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Dave Page
>>> >> Blog: http://pgsnake.blogspot.com
>>> >> Twitter: @pgsnake
>>> >>
>>> >> EnterpriseDB UK: http://www.enterprisedb.com
>>> >> The Enterprise PostgreSQL Company
>>> >>
>>> >> --
>>> >> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>>> >> To make changes to your subscription:
>>> >> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Вложения

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
Hi

On Mon, Jun 12, 2017 at 7:22 PM, Shruti B Iyer <siyer@pivotal.io> wrote:
> Hi Dave,
>
> We regenerated the patch to add new tasks to package.json to compile react
> code for development and to not minimize it. This should fix the error you
> captured in the screenshot.
>
> The new task to lint and bundle everything for development is:
> yarn run bundle:dev
>
> The new task only bundle everything is:
> yarn run webpacker:dev
>
> We also changed the task test:feature to bundle without optimization before
> we start the tests.
>
> When we ran these commands in our machine, they did not display any error.
> Is it possible that you forgot to run yarn install before running the
> webpacker task? We are asking this because the errors look like missing node
> packages.

I did run an install, yes. This patch does work though, so applied - thanks!

Could you answer my earlier question about the need for the delay in
app_starter.py please?

Thanks.

> On Mon, Jun 12, 2017 at 12:15 PM Dave Page <dpage@pgadmin.org> wrote:
>>
>> To add to that; running the JS tests gives:
>>
>> ERROR in ./regression/javascript/history/query_history_entry_spec.jsx
>> Module not found: Error: Can't resolve 'jasmine-enzyme' in
>> '/Users/dpage/git/pgadmin4/web/regression/javascript/history'
>>  @ ./regression/javascript/history/query_history_entry_spec.jsx 13:21-46
>>
>> ERROR in ./pgadmin/static/jsx/history/query_history_entry.jsx
>> Module not found: Error: Can't resolve 'immutability-helper' in
>> '/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
>>  @ ./pgadmin/static/jsx/history/query_history_entry.jsx 13:26-56
>>  @ ./regression/javascript/history/query_history_entry_spec.jsx
>>
>> ERROR in ./pgadmin/static/jsx/history/query_history_entry.jsx
>> Module not found: Error: Can't resolve 'moment' in
>> '/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
>>  @ ./pgadmin/static/jsx/history/query_history_entry.jsx 17:14-31
>>  @ ./regression/javascript/history/query_history_entry_spec.jsx
>>
>> ERROR in ./regression/javascript/history/query_history_spec.jsx
>> Module not found: Error: Can't resolve 'jasmine-enzyme' in
>> '/Users/dpage/git/pgadmin4/web/regression/javascript/history'
>>  @ ./regression/javascript/history/query_history_spec.jsx 19:21-46
>> webpack: Failed to compile.
>> PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
>>   Error: Cannot find module "immutability-helper"
>>   at regression/javascript/history/query_history_entry_spec.jsx:30705
>>
>>
>> PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
>>   Error: Cannot find module "immutability-helper"
>>   at regression/javascript/history/query_history_spec.jsx:30705
>>
>>
>> error Command failed with exit code 1.
>> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>> this command.
>> error Command failed with exit code 1.
>> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>> this command.
>>
>>
>> Also, while I think of it, why the addition of the delay to
>> app_starter.py?
>>
>>
>> On Mon, Jun 12, 2017 at 5:12 PM, Dave Page <dpage@pgadmin.org> wrote:
>> > Hi,
>> >
>> > So 01 and 02 are now committed :-).
>> >
>> > 03 has a couple of problems though (likely the same):
>> >
>> > - Running the webpacker results in:
>> >
>> > (pgadmin4)piranha:web dpage$ yarn run webpacker
>> > yarn run v0.24.4
>> > $ yarn run webpack -- --optimize-minimize --config webpack.config.js
>> > yarn run v0.24.4
>> > $ "/Users/dpage/git/pgadmin4/web/node_modules/.bin/webpack"
>> > --optimize-minimize --config webpack.config.js
>> > (node:19446) DeprecationWarning: loaderUtils.parseQuery() received a
>> > non-string value which can be problematic, see
>> > https://github.com/webpack/loader-utils/issues/56
>> > parseQuery() will be replaced with getOptions() in the next major
>> > version of loader-utils.
>> > Hash: a5e75aa70eb6b09bdb78
>> > Version: webpack 2.3.3
>> > Time: 3983ms
>> >              Asset     Size  Chunks             Chunk Names
>> > reactComponents.js   222 kB       0  [emitted]  reactComponents
>> >         history.js  1.58 kB       1  [emitted]  history
>> >    [0] /Users/dpage/git/pgadmin4/web/~/process/browser.js 5.42 kB {0}
>> > [built]
>> >   [18] /Users/dpage/git/pgadmin4/web/~/react-dom/lib/ReactReconciler.js
>> > 6.21 kB {0} [built]
>> >   [19] /Users/dpage/git/pgadmin4/web/~/react/lib/React.js 2.69 kB {0}
>> > [built]
>> >   [31] /Users/dpage/git/pgadmin4/web/~/react/react.js 56 bytes {0}
>> > [built]
>> >   [80] ./js/history/history_collection.js 1.91 kB {1} [built]
>> >   [81] ./jsx/history/query_history.jsx 3.65 kB {0} [built]
>> >   [82] /Users/dpage/git/pgadmin4/web/~/react-dom/index.js 59 bytes {0}
>> > [built]
>> >   [83] ./js/history/index.js 690 bytes {1} [built]
>> >   [84] ./jsx/components.jsx 599 bytes {0} [built]
>> >   [85] ./jsx/history/query_history_entry.jsx 5.21 kB {0} [built]
>> >  [113] /Users/dpage/git/pgadmin4/web/~/react-dom/lib/ReactDOM.js 5.14
>> > kB {0} [built]
>> >  [175] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactDOMFactories.js
>> > 5.53 kB {0} [built]
>> >  [176] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactPropTypes.js
>> > 15.8 kB {0} [built]
>> >  [177] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactPureComponent.js
>> > 1.32 kB {0} [built]
>> >  [178] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactVersion.js 350
>> > bytes {0} [built]
>> >     + 167 hidden modules
>> >
>> > ERROR in ./jsx/history/query_history_entry.jsx
>> > Module not found: Error: Can't resolve 'immutability-helper' in
>> > '/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
>> >  @ ./jsx/history/query_history_entry.jsx 13:26-56
>> >  @ ./jsx/history/query_history.jsx
>> >  @ ./jsx/components.jsx
>> >
>> > ERROR in ./jsx/history/query_history_entry.jsx
>> > Module not found: Error: Can't resolve 'moment' in
>> > '/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
>> >  @ ./jsx/history/query_history_entry.jsx 17:14-31
>> >  @ ./jsx/history/query_history.jsx
>> >  @ ./jsx/components.jsx
>> > error Command failed with exit code 2.
>> > info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>> > this command.
>> > error Command failed with exit code 1.
>> > info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>> > this command
>> >
>> >
>> > - If I try to run pgAdmin, I get a script error in the UI, and console
>> > output as attached (sorry for the screenshot, I've yet to find a good
>> > way to copy/paste that info without losing the formatting).
>> >
>> > Thanks.
>> >
>> >
>> > On Mon, Jun 12, 2017 at 3:53 PM, Shruti B Iyer <siyer@pivotal.io> wrote:
>> >> Hi Hackers,
>> >>
>> >> Attached are the updated patches that apply on top of master.
>> >>
>> >> Thanks,
>> >> Shruti & Joao
>> >>
>> >>
>> >> On Mon, Jun 12, 2017 at 10:44 AM Dave Page <dpage@pgadmin.org> wrote:
>> >>>
>> >>> Hi Shruti
>> >>>
>> >>> On Mon, Jun 12, 2017 at 3:24 PM, Shruti B Iyer <siyer@pivotal.io>
>> >>> wrote:
>> >>> >
>> >>> > Hello Dave,
>> >>> >
>> >>> > Thanks for making those fixes and sharing them with us. We tried
>> >>> > applying
>> >>> > the patch and it looks like there are some missing file changes from
>> >>> > your
>> >>> > patch that were present in ours, like the Make.bat file changes. But
>> >>> > we
>> >>> > will
>> >>> > add them when we send you the new patches.
>> >>>
>> >>> Hmm, I wonder if I missed them because I applied the patch in a sub
>> >>> directory.
>> >>>
>> >>> > While trying to generate the new patches we realized some tests are
>> >>> > failing
>> >>> > in master branch due to an internal server error:
>> >>> >
>> >>> > 2017-06-12 10:04:11,938: INFO werkzeug: 127.0.0.1 - - [12/Jun/2017
>> >>> > 10:04:11]
>> >>> > "GET /browser/table/sql/1/1/12669/2200/81920 HTTP/1.1" 500 -
>> >>> > Traceback (most recent call last):
>> >>> >   File
>> >>> >
>> >>> >
>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>> >>> > line 2000, in __call__
>> >>> >     return self.wsgi_app(environ, start_response)
>> >>> >   File
>> >>> >
>> >>> >
>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>> >>> > line 1991, in wsgi_app
>> >>> >     response = self.make_response(self.handle_exception(e))
>> >>> >   File
>> >>> >
>> >>> >
>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>> >>> > line 1567, in handle_exception
>> >>> >     reraise(exc_type, exc_value, tb)
>> >>> >   File
>> >>> >
>> >>> >
>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>> >>> > line 1988, in wsgi_app
>> >>> >     response = self.full_dispatch_request()
>> >>> >   File
>> >>> >
>> >>> >
>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>> >>> > line 1641, in full_dispatch_request
>> >>> >     rv = self.handle_user_exception(e)
>> >>> >   File
>> >>> >
>> >>> >
>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>> >>> > line 1544, in handle_user_exception
>> >>> >     reraise(exc_type, exc_value, tb)
>> >>> >   File
>> >>> >
>> >>> >
>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>> >>> > line 1639, in full_dispatch_request
>> >>> >     rv = self.dispatch_request()
>> >>> >   File
>> >>> >
>> >>> >
>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>> >>> > line 1625, in dispatch_request
>> >>> >     return self.view_functions[rule.endpoint](**req.view_args)
>> >>> >   File
>> >>> >
>> >>> >
>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/views.py",
>> >>> > line 84, in view
>> >>> >     return self.dispatch_request(*args, **kwargs)
>> >>> >   File
>> >>> > "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/utils.py",
>> >>> > line 235, in dispatch_request
>> >>> >     return method(*args, **kwargs)
>> >>> >   File
>> >>> >
>> >>> >
>> >>> >
"/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>> >>> > line 315, in wrap
>> >>> >     return f(*args, **kwargs)
>> >>> >   File
>> >>> >
>> >>> >
>> >>> >
"/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>> >>> > line 2555, in sql
>> >>> >     data = self._formatter(did, scid, tid, data)
>> >>> >   File
>> >>> >
>> >>> >
>> >>> >
"/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>> >>> > line 1081, in _formatter
>> >>> >     data = self._columns_formatter(tid, data)
>> >>> >   File
>> >>> >
>> >>> >
>> >>> >
"/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>> >>> > line 663, in _columns_formatter
>> >>> >     column['attlen'] = matchObj.group(1)
>> >>> > AttributeError: 'NoneType' object has no attribute 'group'
>> >>> >
>> >>> > Was this introduced in a previous patch?
>> >>>
>> >>> Yes, it looks like it. For some reason it's not failing on the Jenkins
>> >>> server though. I'll ask Khushboo to fix it.
>> >>>
>> >>> > We will recreate the patches and send them ASAP.
>> >>>
>> >>> Thanks!
>> >>>
>> >>> > Thanks
>> >>> > Shruti & Joao
>> >>> >
>> >>> > On Mon, Jun 12, 2017 at 6:59 AM Dave Page <dpage@pgadmin.org> wrote:
>> >>> >>
>> >>> >> Hi
>> >>> >>
>> >>> >> OK, so Ashesh and I spend much of the morning on this.
>> >>> >>
>> >>> >> Patch 01 - Applied.
>> >>> >> Patch 02:
>> >>> >>
>> >>> >> - karma.conf.js wouldn't patch; I've manually handled that.
>> >>> >> - test-main.js wouldn't patch. The diff looked like it was trying
>> >>> >> to
>> >>> >> empty it; I have removed it instead.
>> >>> >> - The imports in pgAdmin4.py need to be made after the app root is
>> >>> >> added to the path.
>> >>> >> - The JS bundler should be in pgadmin/utils, not pgadmin/tools
>> >>> >> (which
>> >>> >> is intended for plugin modules)
>> >>> >> - The tests were failing following some changes Ashesh pushed
>> >>> >> earlier
>> >>> >> to add a client-side url_for function.
>> >>> >> - pgAdmin4.py was attempting to run the bundler on every startup.
>> >>> >> I've
>> >>> >> wrapped those called in "if config.DEBUG:" conditionals, as
>> >>> >> typically
>> >>> >> an installation for an end-user will be in a read-only directory.
>> >>> >>
>> >>> >> We've fixed all of that in the attached patch. I'm not sure why
>> >>> >> it's
>> >>> >> so much bigger than yours.
>> >>> >>
>> >>> >> The following issues are outstanding; please take a look at them:
>> >>> >>
>> >>> >> - There is no update to the Windows installer generation code
>> >>> >> (needed
>> >>> >> in 2 places unfortunately; Make.bat and Make-MinGW.bat).
>> >>> >>
>> >>> >> - The updates to the other packages call "yarn run webpacker" which
>> >>> >> is
>> >>> >> an undefined target.
>> >>> >>
>> >>> >> I haven't looked at patch 03 yet, but Ashesh did tell me it won't
>> >>> >> apply for him. Patch 4 is also untested at this stage.
>> >>> >>
>> >>> >> If the issues above can be fixed, we can get patch 2 applied then
>> >>> >> move
>> >>> >> on from there.
>> >>> >>
>> >>> >> I'll hold off on Harshal's patch for the Query Tool's load on
>> >>> >> demand
>> >>> >> to give you a chance to get this done.
>> >>> >>
>> >>> >> Thanks.
>> >>> >>
>> >>> >> On Sat, Jun 10, 2017 at 2:52 AM, George Gelashvili
>> >>> >> <ggelashvili@pivotal.io> wrote:
>> >>> >> > Hi Dave,
>> >>> >> >
>> >>> >> > Our patch touches code also changed by the patches that were
>> >>> >> > recently
>> >>> >> > committed.
>> >>> >> > That's likely what's causing this issue. We've rebased on top of
>> >>> >> > the
>> >>> >> > new
>> >>> >> > state of master.
>> >>> >> >
>> >>> >> > We had initially kept the yarn.lock .gitignored, but ran into an
>> >>> >> > issue
>> >>> >> > rather early on where an upgraded dependency introduced a
>> >>> >> > regression.
>> >>> >> > Checking-in the yarn.lock provides the "know your dependency
>> >>> >> > version"
>> >>> >> > benefit of vendorizing code without vendorization's drawback of
>> >>> >> > having
>> >>> >> > to
>> >>> >> > manually manage your dependencies.
>> >>> >> >
>> >>> >> > It is safe to delete a yarn.lock before applying a patch, as you
>> >>> >> > are
>> >>> >> > authoring master. It provides a history of the versions of each
>> >>> >> > dependency
>> >>> >> > that were working at the point in time of the commit. By
>> >>> >> > contrast,
>> >>> >> > package.json provides approximate versions and leaves room for
>> >>> >> > fixes/improvements by the dependency authors to be pulled in as
>> >>> >> > they
>> >>> >> > become
>> >>> >> > available.
>> >>> >> >
>> >>> >> > To run linter and tests:
>> >>> >> >
>> >>> >> > The tasks that Grunt used to manage are now defined as a set of
>> >>> >> > scripts
>> >>> >> > in
>> >>> >> > the package.json
>> >>> >> > After applying the patches--which may require deleting yarn.lock
>> >>> >> > for
>> >>> >> > the
>> >>> >> > first patch--you should cd web && yarn install
>> >>> >> >
>> >>> >> > Then yarn test will run the linter, jasmine specs, and python
>> >>> >> > tests
>> >>> >> > including feature tests, in that order, exiting early if there
>> >>> >> > are
>> >>> >> > failures/errors.
>> >>> >> > At the moment, the CheckForViewData test is failing on master as
>> >>> >> > well
>> >>> >> > as
>> >>> >> > in
>> >>> >> > each of these patches; that should be resolved as RM2477.
>> >>> >> >
>> >>> >> > Thanks!
>> >>> >> > George and Matt
>> >>> >> >
>> >>> >> >
>> >>> >> > On Thu, Jun 8, 2017 at 9:15 AM, Dave Page <dpage@pgadmin.org>
>> >>> >> > wrote:
>> >>> >> >>
>> >>> >> >> Hi George
>> >>> >> >>
>> >>> >> >> On Wed, Jun 7, 2017 at 10:21 PM, George Gelashvili
>> >>> >> >> <ggelashvili@pivotal.io> wrote:
>> >>> >> >> > Hi Dave,
>> >>> >> >> >
>> >>> >> >> > I split the linting out into an intermediate commit, and
>> >>> >> >> > rebased
>> >>> >> >> > on
>> >>> >> >> > top
>> >>> >> >> > of
>> >>> >> >> > master.
>> >>> >> >>
>> >>> >> >> Unfortunately, it still doesn't apply:
>> >>> >> >>
>> >>> >> >> error: patch failed: web/regression/javascript/test-main.js:1
>> >>> >> >> error: removal patch leaves file contents
>> >>> >> >> error: web/regression/javascript/test-main.js: patch does not
>> >>> >> >> apply
>> >>> >> >> Checking patch web/regression/requirements.txt...
>> >>> >> >> Checking patch web/webpack.config.js...
>> >>> >> >> Checking patch web/webpack.test.config.js...
>> >>> >> >> Checking patch web/yarn.lock...
>> >>> >> >> error: web/yarn.lock: already exists in working directory
>> >>> >> >> Applied patch .gitignore cleanly.
>> >>> >> >> Applied patch Make.bat cleanly.
>> >>> >> >> Applied patch README cleanly.
>> >>> >> >> Applied patch pkg/mac/build.sh cleanly.
>> >>> >> >> Applied patch pkg/pip/build.sh cleanly.
>> >>> >> >> Applied patch pkg/src/build.sh cleanly.
>> >>> >> >> Applied patch web/.eslintrc.js cleanly.
>> >>> >> >> Applied patch web/karma.conf.js cleanly.
>> >>> >> >> Applied patch web/package.json cleanly.
>> >>> >> >> Applied patch web/pgAdmin4.py cleanly.
>> >>> >> >> Applied patch web/pgadmin/static/jsx/components.jsx cleanly.
>> >>> >> >> Applied patch web/pgadmin/tools/javascript/__init__.py cleanly.
>> >>> >> >> Applied patch web/pgadmin/tools/javascript/javascript_bundler.py
>> >>> >> >> cleanly.
>> >>> >> >> Applied patch web/pgadmin/tools/javascript/tests/__init__.py
>> >>> >> >> cleanly.
>> >>> >> >> Applied patch
>> >>> >> >> web/pgadmin/tools/javascript/tests/test_javascript_bundler.py
>> >>> >> >> cleanly.
>> >>> >> >> Applied patch web/regression/README cleanly.
>> >>> >> >> Applied patch
>> >>> >> >> web/regression/javascript/jasmine_capture_warnings_beforeall.js
>> >>> >> >> cleanly.
>> >>> >> >> Applied patch web/regression/requirements.txt cleanly.
>> >>> >> >> Applied patch web/webpack.config.js cleanly.
>> >>> >> >> Applied patch web/webpack.test.config.js cleanly.
>> >>> >> >>
>> >>> >> >> The second (lint update) patch is even worse, with significant
>> >>> >> >> number
>> >>> >> >> change that just don't want to apply.
>> >>> >> >>
>> >>> >> >> Clearly yarn.lock needs to be removed from there repo.
>> >>> >> >>
>> >>> >> >> Once I can apply a version of this, how should I be running the
>> >>> >> >> linter
>> >>> >> >> and the unit tests?
>> >>> >> >>
>> >>> >> >> --
>> >>> >> >> Dave Page
>> >>> >> >> Blog: http://pgsnake.blogspot.com
>> >>> >> >> Twitter: @pgsnake
>> >>> >> >>
>> >>> >> >> EnterpriseDB UK: http://www.enterprisedb.com
>> >>> >> >> The Enterprise PostgreSQL Company
>> >>> >> >
>> >>> >> >
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> --
>> >>> >> Dave Page
>> >>> >> Blog: http://pgsnake.blogspot.com
>> >>> >> Twitter: @pgsnake
>> >>> >>
>> >>> >> EnterpriseDB UK: http://www.enterprisedb.com
>> >>> >> The Enterprise PostgreSQL Company
>> >>> >>
>> >>> >> --
>> >>> >> Sent via pgadmin-hackers mailing list
>> >>> >> (pgadmin-hackers@postgresql.org)
>> >>> >> To make changes to your subscription:
>> >>> >> http://www.postgresql.org/mailpref/pgadmin-hackers
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Dave Page
>> >>> Blog: http://pgsnake.blogspot.com
>> >>> Twitter: @pgsnake
>> >>>
>> >>> EnterpriseDB UK: http://www.enterprisedb.com
>> >>> The Enterprise PostgreSQL Company
>> >
>> >
>> >
>> > --
>> > Dave Page
>> > Blog: http://pgsnake.blogspot.com
>> > Twitter: @pgsnake
>> >
>> > EnterpriseDB UK: http://www.enterprisedb.com
>> > The Enterprise PostgreSQL Company
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
And then I find a problem. Sigh.

When running in the desktop runtime, under QtWekKit (the forked,
updated version that is by far the best of the browser engines we've
used), we get the attached error at startup. I don't see this under
QtWebEngine, though as we've already found, that's not usable for
other reasons.

Is this fixable?

On Tue, Jun 13, 2017 at 9:52 AM, Dave Page <dpage@pgadmin.org> wrote:
> Hi
>
> On Mon, Jun 12, 2017 at 7:22 PM, Shruti B Iyer <siyer@pivotal.io> wrote:
>> Hi Dave,
>>
>> We regenerated the patch to add new tasks to package.json to compile react
>> code for development and to not minimize it. This should fix the error you
>> captured in the screenshot.
>>
>> The new task to lint and bundle everything for development is:
>> yarn run bundle:dev
>>
>> The new task only bundle everything is:
>> yarn run webpacker:dev
>>
>> We also changed the task test:feature to bundle without optimization before
>> we start the tests.
>>
>> When we ran these commands in our machine, they did not display any error.
>> Is it possible that you forgot to run yarn install before running the
>> webpacker task? We are asking this because the errors look like missing node
>> packages.
>
> I did run an install, yes. This patch does work though, so applied - thanks!
>
> Could you answer my earlier question about the need for the delay in
> app_starter.py please?
>
> Thanks.
>
>> On Mon, Jun 12, 2017 at 12:15 PM Dave Page <dpage@pgadmin.org> wrote:
>>>
>>> To add to that; running the JS tests gives:
>>>
>>> ERROR in ./regression/javascript/history/query_history_entry_spec.jsx
>>> Module not found: Error: Can't resolve 'jasmine-enzyme' in
>>> '/Users/dpage/git/pgadmin4/web/regression/javascript/history'
>>>  @ ./regression/javascript/history/query_history_entry_spec.jsx 13:21-46
>>>
>>> ERROR in ./pgadmin/static/jsx/history/query_history_entry.jsx
>>> Module not found: Error: Can't resolve 'immutability-helper' in
>>> '/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
>>>  @ ./pgadmin/static/jsx/history/query_history_entry.jsx 13:26-56
>>>  @ ./regression/javascript/history/query_history_entry_spec.jsx
>>>
>>> ERROR in ./pgadmin/static/jsx/history/query_history_entry.jsx
>>> Module not found: Error: Can't resolve 'moment' in
>>> '/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
>>>  @ ./pgadmin/static/jsx/history/query_history_entry.jsx 17:14-31
>>>  @ ./regression/javascript/history/query_history_entry_spec.jsx
>>>
>>> ERROR in ./regression/javascript/history/query_history_spec.jsx
>>> Module not found: Error: Can't resolve 'jasmine-enzyme' in
>>> '/Users/dpage/git/pgadmin4/web/regression/javascript/history'
>>>  @ ./regression/javascript/history/query_history_spec.jsx 19:21-46
>>> webpack: Failed to compile.
>>> PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
>>>   Error: Cannot find module "immutability-helper"
>>>   at regression/javascript/history/query_history_entry_spec.jsx:30705
>>>
>>>
>>> PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
>>>   Error: Cannot find module "immutability-helper"
>>>   at regression/javascript/history/query_history_spec.jsx:30705
>>>
>>>
>>> error Command failed with exit code 1.
>>> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>>> this command.
>>> error Command failed with exit code 1.
>>> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>>> this command.
>>>
>>>
>>> Also, while I think of it, why the addition of the delay to
>>> app_starter.py?
>>>
>>>
>>> On Mon, Jun 12, 2017 at 5:12 PM, Dave Page <dpage@pgadmin.org> wrote:
>>> > Hi,
>>> >
>>> > So 01 and 02 are now committed :-).
>>> >
>>> > 03 has a couple of problems though (likely the same):
>>> >
>>> > - Running the webpacker results in:
>>> >
>>> > (pgadmin4)piranha:web dpage$ yarn run webpacker
>>> > yarn run v0.24.4
>>> > $ yarn run webpack -- --optimize-minimize --config webpack.config.js
>>> > yarn run v0.24.4
>>> > $ "/Users/dpage/git/pgadmin4/web/node_modules/.bin/webpack"
>>> > --optimize-minimize --config webpack.config.js
>>> > (node:19446) DeprecationWarning: loaderUtils.parseQuery() received a
>>> > non-string value which can be problematic, see
>>> > https://github.com/webpack/loader-utils/issues/56
>>> > parseQuery() will be replaced with getOptions() in the next major
>>> > version of loader-utils.
>>> > Hash: a5e75aa70eb6b09bdb78
>>> > Version: webpack 2.3.3
>>> > Time: 3983ms
>>> >              Asset     Size  Chunks             Chunk Names
>>> > reactComponents.js   222 kB       0  [emitted]  reactComponents
>>> >         history.js  1.58 kB       1  [emitted]  history
>>> >    [0] /Users/dpage/git/pgadmin4/web/~/process/browser.js 5.42 kB {0}
>>> > [built]
>>> >   [18] /Users/dpage/git/pgadmin4/web/~/react-dom/lib/ReactReconciler.js
>>> > 6.21 kB {0} [built]
>>> >   [19] /Users/dpage/git/pgadmin4/web/~/react/lib/React.js 2.69 kB {0}
>>> > [built]
>>> >   [31] /Users/dpage/git/pgadmin4/web/~/react/react.js 56 bytes {0}
>>> > [built]
>>> >   [80] ./js/history/history_collection.js 1.91 kB {1} [built]
>>> >   [81] ./jsx/history/query_history.jsx 3.65 kB {0} [built]
>>> >   [82] /Users/dpage/git/pgadmin4/web/~/react-dom/index.js 59 bytes {0}
>>> > [built]
>>> >   [83] ./js/history/index.js 690 bytes {1} [built]
>>> >   [84] ./jsx/components.jsx 599 bytes {0} [built]
>>> >   [85] ./jsx/history/query_history_entry.jsx 5.21 kB {0} [built]
>>> >  [113] /Users/dpage/git/pgadmin4/web/~/react-dom/lib/ReactDOM.js 5.14
>>> > kB {0} [built]
>>> >  [175] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactDOMFactories.js
>>> > 5.53 kB {0} [built]
>>> >  [176] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactPropTypes.js
>>> > 15.8 kB {0} [built]
>>> >  [177] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactPureComponent.js
>>> > 1.32 kB {0} [built]
>>> >  [178] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactVersion.js 350
>>> > bytes {0} [built]
>>> >     + 167 hidden modules
>>> >
>>> > ERROR in ./jsx/history/query_history_entry.jsx
>>> > Module not found: Error: Can't resolve 'immutability-helper' in
>>> > '/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
>>> >  @ ./jsx/history/query_history_entry.jsx 13:26-56
>>> >  @ ./jsx/history/query_history.jsx
>>> >  @ ./jsx/components.jsx
>>> >
>>> > ERROR in ./jsx/history/query_history_entry.jsx
>>> > Module not found: Error: Can't resolve 'moment' in
>>> > '/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
>>> >  @ ./jsx/history/query_history_entry.jsx 17:14-31
>>> >  @ ./jsx/history/query_history.jsx
>>> >  @ ./jsx/components.jsx
>>> > error Command failed with exit code 2.
>>> > info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>>> > this command.
>>> > error Command failed with exit code 1.
>>> > info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>>> > this command
>>> >
>>> >
>>> > - If I try to run pgAdmin, I get a script error in the UI, and console
>>> > output as attached (sorry for the screenshot, I've yet to find a good
>>> > way to copy/paste that info without losing the formatting).
>>> >
>>> > Thanks.
>>> >
>>> >
>>> > On Mon, Jun 12, 2017 at 3:53 PM, Shruti B Iyer <siyer@pivotal.io> wrote:
>>> >> Hi Hackers,
>>> >>
>>> >> Attached are the updated patches that apply on top of master.
>>> >>
>>> >> Thanks,
>>> >> Shruti & Joao
>>> >>
>>> >>
>>> >> On Mon, Jun 12, 2017 at 10:44 AM Dave Page <dpage@pgadmin.org> wrote:
>>> >>>
>>> >>> Hi Shruti
>>> >>>
>>> >>> On Mon, Jun 12, 2017 at 3:24 PM, Shruti B Iyer <siyer@pivotal.io>
>>> >>> wrote:
>>> >>> >
>>> >>> > Hello Dave,
>>> >>> >
>>> >>> > Thanks for making those fixes and sharing them with us. We tried
>>> >>> > applying
>>> >>> > the patch and it looks like there are some missing file changes from
>>> >>> > your
>>> >>> > patch that were present in ours, like the Make.bat file changes. But
>>> >>> > we
>>> >>> > will
>>> >>> > add them when we send you the new patches.
>>> >>>
>>> >>> Hmm, I wonder if I missed them because I applied the patch in a sub
>>> >>> directory.
>>> >>>
>>> >>> > While trying to generate the new patches we realized some tests are
>>> >>> > failing
>>> >>> > in master branch due to an internal server error:
>>> >>> >
>>> >>> > 2017-06-12 10:04:11,938: INFO werkzeug: 127.0.0.1 - - [12/Jun/2017
>>> >>> > 10:04:11]
>>> >>> > "GET /browser/table/sql/1/1/12669/2200/81920 HTTP/1.1" 500 -
>>> >>> > Traceback (most recent call last):
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> >>> > line 2000, in __call__
>>> >>> >     return self.wsgi_app(environ, start_response)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> >>> > line 1991, in wsgi_app
>>> >>> >     response = self.make_response(self.handle_exception(e))
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> >>> > line 1567, in handle_exception
>>> >>> >     reraise(exc_type, exc_value, tb)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> >>> > line 1988, in wsgi_app
>>> >>> >     response = self.full_dispatch_request()
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> >>> > line 1641, in full_dispatch_request
>>> >>> >     rv = self.handle_user_exception(e)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> >>> > line 1544, in handle_user_exception
>>> >>> >     reraise(exc_type, exc_value, tb)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> >>> > line 1639, in full_dispatch_request
>>> >>> >     rv = self.dispatch_request()
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> >>> > line 1625, in dispatch_request
>>> >>> >     return self.view_functions[rule.endpoint](**req.view_args)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/views.py",
>>> >>> > line 84, in view
>>> >>> >     return self.dispatch_request(*args, **kwargs)
>>> >>> >   File
>>> >>> > "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/utils.py",
>>> >>> > line 235, in dispatch_request
>>> >>> >     return method(*args, **kwargs)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> >
"/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>>> >>> > line 315, in wrap
>>> >>> >     return f(*args, **kwargs)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> >
"/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>>> >>> > line 2555, in sql
>>> >>> >     data = self._formatter(did, scid, tid, data)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> >
"/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>>> >>> > line 1081, in _formatter
>>> >>> >     data = self._columns_formatter(tid, data)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> >
"/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>>> >>> > line 663, in _columns_formatter
>>> >>> >     column['attlen'] = matchObj.group(1)
>>> >>> > AttributeError: 'NoneType' object has no attribute 'group'
>>> >>> >
>>> >>> > Was this introduced in a previous patch?
>>> >>>
>>> >>> Yes, it looks like it. For some reason it's not failing on the Jenkins
>>> >>> server though. I'll ask Khushboo to fix it.
>>> >>>
>>> >>> > We will recreate the patches and send them ASAP.
>>> >>>
>>> >>> Thanks!
>>> >>>
>>> >>> > Thanks
>>> >>> > Shruti & Joao
>>> >>> >
>>> >>> > On Mon, Jun 12, 2017 at 6:59 AM Dave Page <dpage@pgadmin.org> wrote:
>>> >>> >>
>>> >>> >> Hi
>>> >>> >>
>>> >>> >> OK, so Ashesh and I spend much of the morning on this.
>>> >>> >>
>>> >>> >> Patch 01 - Applied.
>>> >>> >> Patch 02:
>>> >>> >>
>>> >>> >> - karma.conf.js wouldn't patch; I've manually handled that.
>>> >>> >> - test-main.js wouldn't patch. The diff looked like it was trying
>>> >>> >> to
>>> >>> >> empty it; I have removed it instead.
>>> >>> >> - The imports in pgAdmin4.py need to be made after the app root is
>>> >>> >> added to the path.
>>> >>> >> - The JS bundler should be in pgadmin/utils, not pgadmin/tools
>>> >>> >> (which
>>> >>> >> is intended for plugin modules)
>>> >>> >> - The tests were failing following some changes Ashesh pushed
>>> >>> >> earlier
>>> >>> >> to add a client-side url_for function.
>>> >>> >> - pgAdmin4.py was attempting to run the bundler on every startup.
>>> >>> >> I've
>>> >>> >> wrapped those called in "if config.DEBUG:" conditionals, as
>>> >>> >> typically
>>> >>> >> an installation for an end-user will be in a read-only directory.
>>> >>> >>
>>> >>> >> We've fixed all of that in the attached patch. I'm not sure why
>>> >>> >> it's
>>> >>> >> so much bigger than yours.
>>> >>> >>
>>> >>> >> The following issues are outstanding; please take a look at them:
>>> >>> >>
>>> >>> >> - There is no update to the Windows installer generation code
>>> >>> >> (needed
>>> >>> >> in 2 places unfortunately; Make.bat and Make-MinGW.bat).
>>> >>> >>
>>> >>> >> - The updates to the other packages call "yarn run webpacker" which
>>> >>> >> is
>>> >>> >> an undefined target.
>>> >>> >>
>>> >>> >> I haven't looked at patch 03 yet, but Ashesh did tell me it won't
>>> >>> >> apply for him. Patch 4 is also untested at this stage.
>>> >>> >>
>>> >>> >> If the issues above can be fixed, we can get patch 2 applied then
>>> >>> >> move
>>> >>> >> on from there.
>>> >>> >>
>>> >>> >> I'll hold off on Harshal's patch for the Query Tool's load on
>>> >>> >> demand
>>> >>> >> to give you a chance to get this done.
>>> >>> >>
>>> >>> >> Thanks.
>>> >>> >>
>>> >>> >> On Sat, Jun 10, 2017 at 2:52 AM, George Gelashvili
>>> >>> >> <ggelashvili@pivotal.io> wrote:
>>> >>> >> > Hi Dave,
>>> >>> >> >
>>> >>> >> > Our patch touches code also changed by the patches that were
>>> >>> >> > recently
>>> >>> >> > committed.
>>> >>> >> > That's likely what's causing this issue. We've rebased on top of
>>> >>> >> > the
>>> >>> >> > new
>>> >>> >> > state of master.
>>> >>> >> >
>>> >>> >> > We had initially kept the yarn.lock .gitignored, but ran into an
>>> >>> >> > issue
>>> >>> >> > rather early on where an upgraded dependency introduced a
>>> >>> >> > regression.
>>> >>> >> > Checking-in the yarn.lock provides the "know your dependency
>>> >>> >> > version"
>>> >>> >> > benefit of vendorizing code without vendorization's drawback of
>>> >>> >> > having
>>> >>> >> > to
>>> >>> >> > manually manage your dependencies.
>>> >>> >> >
>>> >>> >> > It is safe to delete a yarn.lock before applying a patch, as you
>>> >>> >> > are
>>> >>> >> > authoring master. It provides a history of the versions of each
>>> >>> >> > dependency
>>> >>> >> > that were working at the point in time of the commit. By
>>> >>> >> > contrast,
>>> >>> >> > package.json provides approximate versions and leaves room for
>>> >>> >> > fixes/improvements by the dependency authors to be pulled in as
>>> >>> >> > they
>>> >>> >> > become
>>> >>> >> > available.
>>> >>> >> >
>>> >>> >> > To run linter and tests:
>>> >>> >> >
>>> >>> >> > The tasks that Grunt used to manage are now defined as a set of
>>> >>> >> > scripts
>>> >>> >> > in
>>> >>> >> > the package.json
>>> >>> >> > After applying the patches--which may require deleting yarn.lock
>>> >>> >> > for
>>> >>> >> > the
>>> >>> >> > first patch--you should cd web && yarn install
>>> >>> >> >
>>> >>> >> > Then yarn test will run the linter, jasmine specs, and python
>>> >>> >> > tests
>>> >>> >> > including feature tests, in that order, exiting early if there
>>> >>> >> > are
>>> >>> >> > failures/errors.
>>> >>> >> > At the moment, the CheckForViewData test is failing on master as
>>> >>> >> > well
>>> >>> >> > as
>>> >>> >> > in
>>> >>> >> > each of these patches; that should be resolved as RM2477.
>>> >>> >> >
>>> >>> >> > Thanks!
>>> >>> >> > George and Matt
>>> >>> >> >
>>> >>> >> >
>>> >>> >> > On Thu, Jun 8, 2017 at 9:15 AM, Dave Page <dpage@pgadmin.org>
>>> >>> >> > wrote:
>>> >>> >> >>
>>> >>> >> >> Hi George
>>> >>> >> >>
>>> >>> >> >> On Wed, Jun 7, 2017 at 10:21 PM, George Gelashvili
>>> >>> >> >> <ggelashvili@pivotal.io> wrote:
>>> >>> >> >> > Hi Dave,
>>> >>> >> >> >
>>> >>> >> >> > I split the linting out into an intermediate commit, and
>>> >>> >> >> > rebased
>>> >>> >> >> > on
>>> >>> >> >> > top
>>> >>> >> >> > of
>>> >>> >> >> > master.
>>> >>> >> >>
>>> >>> >> >> Unfortunately, it still doesn't apply:
>>> >>> >> >>
>>> >>> >> >> error: patch failed: web/regression/javascript/test-main.js:1
>>> >>> >> >> error: removal patch leaves file contents
>>> >>> >> >> error: web/regression/javascript/test-main.js: patch does not
>>> >>> >> >> apply
>>> >>> >> >> Checking patch web/regression/requirements.txt...
>>> >>> >> >> Checking patch web/webpack.config.js...
>>> >>> >> >> Checking patch web/webpack.test.config.js...
>>> >>> >> >> Checking patch web/yarn.lock...
>>> >>> >> >> error: web/yarn.lock: already exists in working directory
>>> >>> >> >> Applied patch .gitignore cleanly.
>>> >>> >> >> Applied patch Make.bat cleanly.
>>> >>> >> >> Applied patch README cleanly.
>>> >>> >> >> Applied patch pkg/mac/build.sh cleanly.
>>> >>> >> >> Applied patch pkg/pip/build.sh cleanly.
>>> >>> >> >> Applied patch pkg/src/build.sh cleanly.
>>> >>> >> >> Applied patch web/.eslintrc.js cleanly.
>>> >>> >> >> Applied patch web/karma.conf.js cleanly.
>>> >>> >> >> Applied patch web/package.json cleanly.
>>> >>> >> >> Applied patch web/pgAdmin4.py cleanly.
>>> >>> >> >> Applied patch web/pgadmin/static/jsx/components.jsx cleanly.
>>> >>> >> >> Applied patch web/pgadmin/tools/javascript/__init__.py cleanly.
>>> >>> >> >> Applied patch web/pgadmin/tools/javascript/javascript_bundler.py
>>> >>> >> >> cleanly.
>>> >>> >> >> Applied patch web/pgadmin/tools/javascript/tests/__init__.py
>>> >>> >> >> cleanly.
>>> >>> >> >> Applied patch
>>> >>> >> >> web/pgadmin/tools/javascript/tests/test_javascript_bundler.py
>>> >>> >> >> cleanly.
>>> >>> >> >> Applied patch web/regression/README cleanly.
>>> >>> >> >> Applied patch
>>> >>> >> >> web/regression/javascript/jasmine_capture_warnings_beforeall.js
>>> >>> >> >> cleanly.
>>> >>> >> >> Applied patch web/regression/requirements.txt cleanly.
>>> >>> >> >> Applied patch web/webpack.config.js cleanly.
>>> >>> >> >> Applied patch web/webpack.test.config.js cleanly.
>>> >>> >> >>
>>> >>> >> >> The second (lint update) patch is even worse, with significant
>>> >>> >> >> number
>>> >>> >> >> change that just don't want to apply.
>>> >>> >> >>
>>> >>> >> >> Clearly yarn.lock needs to be removed from there repo.
>>> >>> >> >>
>>> >>> >> >> Once I can apply a version of this, how should I be running the
>>> >>> >> >> linter
>>> >>> >> >> and the unit tests?
>>> >>> >> >>
>>> >>> >> >> --
>>> >>> >> >> Dave Page
>>> >>> >> >> Blog: http://pgsnake.blogspot.com
>>> >>> >> >> Twitter: @pgsnake
>>> >>> >> >>
>>> >>> >> >> EnterpriseDB UK: http://www.enterprisedb.com
>>> >>> >> >> The Enterprise PostgreSQL Company
>>> >>> >> >
>>> >>> >> >
>>> >>> >>
>>> >>> >>
>>> >>> >>
>>> >>> >> --
>>> >>> >> Dave Page
>>> >>> >> Blog: http://pgsnake.blogspot.com
>>> >>> >> Twitter: @pgsnake
>>> >>> >>
>>> >>> >> EnterpriseDB UK: http://www.enterprisedb.com
>>> >>> >> The Enterprise PostgreSQL Company
>>> >>> >>
>>> >>> >> --
>>> >>> >> Sent via pgadmin-hackers mailing list
>>> >>> >> (pgadmin-hackers@postgresql.org)
>>> >>> >> To make changes to your subscription:
>>> >>> >> http://www.postgresql.org/mailpref/pgadmin-hackers
>>> >>>
>>> >>>
>>> >>>
>>> >>> --
>>> >>> Dave Page
>>> >>> Blog: http://pgsnake.blogspot.com
>>> >>> Twitter: @pgsnake
>>> >>>
>>> >>> EnterpriseDB UK: http://www.enterprisedb.com
>>> >>> The Enterprise PostgreSQL Company
>>> >
>>> >
>>> >
>>> > --
>>> > Dave Page
>>> > Blog: http://pgsnake.blogspot.com
>>> > Twitter: @pgsnake
>>> >
>>> > EnterpriseDB UK: http://www.enterprisedb.com
>>> > The Enterprise PostgreSQL Company
>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Вложения

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Ashesh Vashi
Дата:
On Tue, Jun 13, 2017 at 2:47 PM, Dave Page <dpage@pgadmin.org> wrote:
And then I find a problem. Sigh.

When running in the desktop runtime, under QtWekKit (the forked,
updated version that is by far the best of the browser engines we've
used), we get the attached error at startup. I don't see this under
QtWebEngine, though as we've already found, that's not usable for
other reasons.

Is this fixable?
"
WebKit engine itself has not been updated since Qt 5.2 release. That's why it didn't support recent changes in Web standards that happened after 2013, including: new JavaScript language standard ES2015 (also known as ES6), as well as improvements in DOM API and CSS.
...

Could this be a reason?

-- Thanks, Ashesh

On Tue, Jun 13, 2017 at 9:52 AM, Dave Page <dpage@pgadmin.org> wrote:
> Hi
>
> On Mon, Jun 12, 2017 at 7:22 PM, Shruti B Iyer <siyer@pivotal.io> wrote:
>> Hi Dave,
>>
>> We regenerated the patch to add new tasks to package.json to compile react
>> code for development and to not minimize it. This should fix the error you
>> captured in the screenshot.
>>
>> The new task to lint and bundle everything for development is:
>> yarn run bundle:dev
>>
>> The new task only bundle everything is:
>> yarn run webpacker:dev
>>
>> We also changed the task test:feature to bundle without optimization before
>> we start the tests.
>>
>> When we ran these commands in our machine, they did not display any error.
>> Is it possible that you forgot to run yarn install before running the
>> webpacker task? We are asking this because the errors look like missing node
>> packages.
>
> I did run an install, yes. This patch does work though, so applied - thanks!
>
> Could you answer my earlier question about the need for the delay in
> app_starter.py please?
>
> Thanks.
>
>> On Mon, Jun 12, 2017 at 12:15 PM Dave Page <dpage@pgadmin.org> wrote:
>>>
>>> To add to that; running the JS tests gives:
>>>
>>> ERROR in ./regression/javascript/history/query_history_entry_spec.jsx
>>> Module not found: Error: Can't resolve 'jasmine-enzyme' in
>>> '/Users/dpage/git/pgadmin4/web/regression/javascript/history'
>>>  @ ./regression/javascript/history/query_history_entry_spec.jsx 13:21-46
>>>
>>> ERROR in ./pgadmin/static/jsx/history/query_history_entry.jsx
>>> Module not found: Error: Can't resolve 'immutability-helper' in
>>> '/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
>>>  @ ./pgadmin/static/jsx/history/query_history_entry.jsx 13:26-56
>>>  @ ./regression/javascript/history/query_history_entry_spec.jsx
>>>
>>> ERROR in ./pgadmin/static/jsx/history/query_history_entry.jsx
>>> Module not found: Error: Can't resolve 'moment' in
>>> '/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
>>>  @ ./pgadmin/static/jsx/history/query_history_entry.jsx 17:14-31
>>>  @ ./regression/javascript/history/query_history_entry_spec.jsx
>>>
>>> ERROR in ./regression/javascript/history/query_history_spec.jsx
>>> Module not found: Error: Can't resolve 'jasmine-enzyme' in
>>> '/Users/dpage/git/pgadmin4/web/regression/javascript/history'
>>>  @ ./regression/javascript/history/query_history_spec.jsx 19:21-46
>>> webpack: Failed to compile.
>>> PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
>>>   Error: Cannot find module "immutability-helper"
>>>   at regression/javascript/history/query_history_entry_spec.jsx:30705
>>>
>>>
>>> PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
>>>   Error: Cannot find module "immutability-helper"
>>>   at regression/javascript/history/query_history_spec.jsx:30705
>>>
>>>
>>> error Command failed with exit code 1.
>>> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>>> this command.
>>> error Command failed with exit code 1.
>>> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>>> this command.
>>>
>>>
>>> Also, while I think of it, why the addition of the delay to
>>> app_starter.py?
>>>
>>>
>>> On Mon, Jun 12, 2017 at 5:12 PM, Dave Page <dpage@pgadmin.org> wrote:
>>> > Hi,
>>> >
>>> > So 01 and 02 are now committed :-).
>>> >
>>> > 03 has a couple of problems though (likely the same):
>>> >
>>> > - Running the webpacker results in:
>>> >
>>> > (pgadmin4)piranha:web dpage$ yarn run webpacker
>>> > yarn run v0.24.4
>>> > $ yarn run webpack -- --optimize-minimize --config webpack.config.js
>>> > yarn run v0.24.4
>>> > $ "/Users/dpage/git/pgadmin4/web/node_modules/.bin/webpack"
>>> > --optimize-minimize --config webpack.config.js
>>> > (node:19446) DeprecationWarning: loaderUtils.parseQuery() received a
>>> > non-string value which can be problematic, see
>>> > https://github.com/webpack/loader-utils/issues/56
>>> > parseQuery() will be replaced with getOptions() in the next major
>>> > version of loader-utils.
>>> > Hash: a5e75aa70eb6b09bdb78
>>> > Version: webpack 2.3.3
>>> > Time: 3983ms
>>> >              Asset     Size  Chunks             Chunk Names
>>> > reactComponents.js   222 kB       0  [emitted]  reactComponents
>>> >         history.js  1.58 kB       1  [emitted]  history
>>> >    [0] /Users/dpage/git/pgadmin4/web/~/process/browser.js 5.42 kB {0}
>>> > [built]
>>> >   [18] /Users/dpage/git/pgadmin4/web/~/react-dom/lib/ReactReconciler.js
>>> > 6.21 kB {0} [built]
>>> >   [19] /Users/dpage/git/pgadmin4/web/~/react/lib/React.js 2.69 kB {0}
>>> > [built]
>>> >   [31] /Users/dpage/git/pgadmin4/web/~/react/react.js 56 bytes {0}
>>> > [built]
>>> >   [80] ./js/history/history_collection.js 1.91 kB {1} [built]
>>> >   [81] ./jsx/history/query_history.jsx 3.65 kB {0} [built]
>>> >   [82] /Users/dpage/git/pgadmin4/web/~/react-dom/index.js 59 bytes {0}
>>> > [built]
>>> >   [83] ./js/history/index.js 690 bytes {1} [built]
>>> >   [84] ./jsx/components.jsx 599 bytes {0} [built]
>>> >   [85] ./jsx/history/query_history_entry.jsx 5.21 kB {0} [built]
>>> >  [113] /Users/dpage/git/pgadmin4/web/~/react-dom/lib/ReactDOM.js 5.14
>>> > kB {0} [built]
>>> >  [175] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactDOMFactories.js
>>> > 5.53 kB {0} [built]
>>> >  [176] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactPropTypes.js
>>> > 15.8 kB {0} [built]
>>> >  [177] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactPureComponent.js
>>> > 1.32 kB {0} [built]
>>> >  [178] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactVersion.js 350
>>> > bytes {0} [built]
>>> >     + 167 hidden modules
>>> >
>>> > ERROR in ./jsx/history/query_history_entry.jsx
>>> > Module not found: Error: Can't resolve 'immutability-helper' in
>>> > '/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
>>> >  @ ./jsx/history/query_history_entry.jsx 13:26-56
>>> >  @ ./jsx/history/query_history.jsx
>>> >  @ ./jsx/components.jsx
>>> >
>>> > ERROR in ./jsx/history/query_history_entry.jsx
>>> > Module not found: Error: Can't resolve 'moment' in
>>> > '/Users/dpage/git/pgadmin4/web/pgadmin/static/jsx/history'
>>> >  @ ./jsx/history/query_history_entry.jsx 17:14-31
>>> >  @ ./jsx/history/query_history.jsx
>>> >  @ ./jsx/components.jsx
>>> > error Command failed with exit code 2.
>>> > info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>>> > this command.
>>> > error Command failed with exit code 1.
>>> > info Visit https://yarnpkg.com/en/docs/cli/run for documentation about
>>> > this command
>>> >
>>> >
>>> > - If I try to run pgAdmin, I get a script error in the UI, and console
>>> > output as attached (sorry for the screenshot, I've yet to find a good
>>> > way to copy/paste that info without losing the formatting).
>>> >
>>> > Thanks.
>>> >
>>> >
>>> > On Mon, Jun 12, 2017 at 3:53 PM, Shruti B Iyer <siyer@pivotal.io> wrote:
>>> >> Hi Hackers,
>>> >>
>>> >> Attached are the updated patches that apply on top of master.
>>> >>
>>> >> Thanks,
>>> >> Shruti & Joao
>>> >>
>>> >>
>>> >> On Mon, Jun 12, 2017 at 10:44 AM Dave Page <dpage@pgadmin.org> wrote:
>>> >>>
>>> >>> Hi Shruti
>>> >>>
>>> >>> On Mon, Jun 12, 2017 at 3:24 PM, Shruti B Iyer <siyer@pivotal.io>
>>> >>> wrote:
>>> >>> >
>>> >>> > Hello Dave,
>>> >>> >
>>> >>> > Thanks for making those fixes and sharing them with us. We tried
>>> >>> > applying
>>> >>> > the patch and it looks like there are some missing file changes from
>>> >>> > your
>>> >>> > patch that were present in ours, like the Make.bat file changes. But
>>> >>> > we
>>> >>> > will
>>> >>> > add them when we send you the new patches.
>>> >>>
>>> >>> Hmm, I wonder if I missed them because I applied the patch in a sub
>>> >>> directory.
>>> >>>
>>> >>> > While trying to generate the new patches we realized some tests are
>>> >>> > failing
>>> >>> > in master branch due to an internal server error:
>>> >>> >
>>> >>> > 2017-06-12 10:04:11,938: INFO werkzeug: 127.0.0.1 - - [12/Jun/2017
>>> >>> > 10:04:11]
>>> >>> > "GET /browser/table/sql/1/1/12669/2200/81920 HTTP/1.1" 500 -
>>> >>> > Traceback (most recent call last):
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> >>> > line 2000, in __call__
>>> >>> >     return self.wsgi_app(environ, start_response)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> >>> > line 1991, in wsgi_app
>>> >>> >     response = self.make_response(self.handle_exception(e))
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> >>> > line 1567, in handle_exception
>>> >>> >     reraise(exc_type, exc_value, tb)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> >>> > line 1988, in wsgi_app
>>> >>> >     response = self.full_dispatch_request()
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> >>> > line 1641, in full_dispatch_request
>>> >>> >     rv = self.handle_user_exception(e)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> >>> > line 1544, in handle_user_exception
>>> >>> >     reraise(exc_type, exc_value, tb)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> >>> > line 1639, in full_dispatch_request
>>> >>> >     rv = self.dispatch_request()
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/app.py",
>>> >>> > line 1625, in dispatch_request
>>> >>> >     return self.view_functions[rule.endpoint](**req.view_args)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/.pyenv/versions/2.7.10/envs/pgadmin/lib/python2.7/site-packages/flask/views.py",
>>> >>> > line 84, in view
>>> >>> >     return self.dispatch_request(*args, **kwargs)
>>> >>> >   File
>>> >>> > "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/utils.py",
>>> >>> > line 235, in dispatch_request
>>> >>> >     return method(*args, **kwargs)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>>> >>> > line 315, in wrap
>>> >>> >     return f(*args, **kwargs)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>>> >>> > line 2555, in sql
>>> >>> >     data = self._formatter(did, scid, tid, data)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>>> >>> > line 1081, in _formatter
>>> >>> >     data = self._columns_formatter(tid, data)
>>> >>> >   File
>>> >>> >
>>> >>> >
>>> >>> > "/Users/pivotal/workspace/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>>> >>> > line 663, in _columns_formatter
>>> >>> >     column['attlen'] = matchObj.group(1)
>>> >>> > AttributeError: 'NoneType' object has no attribute 'group'
>>> >>> >
>>> >>> > Was this introduced in a previous patch?
>>> >>>
>>> >>> Yes, it looks like it. For some reason it's not failing on the Jenkins
>>> >>> server though. I'll ask Khushboo to fix it.
>>> >>>
>>> >>> > We will recreate the patches and send them ASAP.
>>> >>>
>>> >>> Thanks!
>>> >>>
>>> >>> > Thanks
>>> >>> > Shruti & Joao
>>> >>> >
>>> >>> > On Mon, Jun 12, 2017 at 6:59 AM Dave Page <dpage@pgadmin.org> wrote:
>>> >>> >>
>>> >>> >> Hi
>>> >>> >>
>>> >>> >> OK, so Ashesh and I spend much of the morning on this.
>>> >>> >>
>>> >>> >> Patch 01 - Applied.
>>> >>> >> Patch 02:
>>> >>> >>
>>> >>> >> - karma.conf.js wouldn't patch; I've manually handled that.
>>> >>> >> - test-main.js wouldn't patch. The diff looked like it was trying
>>> >>> >> to
>>> >>> >> empty it; I have removed it instead.
>>> >>> >> - The imports in pgAdmin4.py need to be made after the app root is
>>> >>> >> added to the path.
>>> >>> >> - The JS bundler should be in pgadmin/utils, not pgadmin/tools
>>> >>> >> (which
>>> >>> >> is intended for plugin modules)
>>> >>> >> - The tests were failing following some changes Ashesh pushed
>>> >>> >> earlier
>>> >>> >> to add a client-side url_for function.
>>> >>> >> - pgAdmin4.py was attempting to run the bundler on every startup.
>>> >>> >> I've
>>> >>> >> wrapped those called in "if config.DEBUG:" conditionals, as
>>> >>> >> typically
>>> >>> >> an installation for an end-user will be in a read-only directory.
>>> >>> >>
>>> >>> >> We've fixed all of that in the attached patch. I'm not sure why
>>> >>> >> it's
>>> >>> >> so much bigger than yours.
>>> >>> >>
>>> >>> >> The following issues are outstanding; please take a look at them:
>>> >>> >>
>>> >>> >> - There is no update to the Windows installer generation code
>>> >>> >> (needed
>>> >>> >> in 2 places unfortunately; Make.bat and Make-MinGW.bat).
>>> >>> >>
>>> >>> >> - The updates to the other packages call "yarn run webpacker" which
>>> >>> >> is
>>> >>> >> an undefined target.
>>> >>> >>
>>> >>> >> I haven't looked at patch 03 yet, but Ashesh did tell me it won't
>>> >>> >> apply for him. Patch 4 is also untested at this stage.
>>> >>> >>
>>> >>> >> If the issues above can be fixed, we can get patch 2 applied then
>>> >>> >> move
>>> >>> >> on from there.
>>> >>> >>
>>> >>> >> I'll hold off on Harshal's patch for the Query Tool's load on
>>> >>> >> demand
>>> >>> >> to give you a chance to get this done.
>>> >>> >>
>>> >>> >> Thanks.
>>> >>> >>
>>> >>> >> On Sat, Jun 10, 2017 at 2:52 AM, George Gelashvili
>>> >>> >> <ggelashvili@pivotal.io> wrote:
>>> >>> >> > Hi Dave,
>>> >>> >> >
>>> >>> >> > Our patch touches code also changed by the patches that were
>>> >>> >> > recently
>>> >>> >> > committed.
>>> >>> >> > That's likely what's causing this issue. We've rebased on top of
>>> >>> >> > the
>>> >>> >> > new
>>> >>> >> > state of master.
>>> >>> >> >
>>> >>> >> > We had initially kept the yarn.lock .gitignored, but ran into an
>>> >>> >> > issue
>>> >>> >> > rather early on where an upgraded dependency introduced a
>>> >>> >> > regression.
>>> >>> >> > Checking-in the yarn.lock provides the "know your dependency
>>> >>> >> > version"
>>> >>> >> > benefit of vendorizing code without vendorization's drawback of
>>> >>> >> > having
>>> >>> >> > to
>>> >>> >> > manually manage your dependencies.
>>> >>> >> >
>>> >>> >> > It is safe to delete a yarn.lock before applying a patch, as you
>>> >>> >> > are
>>> >>> >> > authoring master. It provides a history of the versions of each
>>> >>> >> > dependency
>>> >>> >> > that were working at the point in time of the commit. By
>>> >>> >> > contrast,
>>> >>> >> > package.json provides approximate versions and leaves room for
>>> >>> >> > fixes/improvements by the dependency authors to be pulled in as
>>> >>> >> > they
>>> >>> >> > become
>>> >>> >> > available.
>>> >>> >> >
>>> >>> >> > To run linter and tests:
>>> >>> >> >
>>> >>> >> > The tasks that Grunt used to manage are now defined as a set of
>>> >>> >> > scripts
>>> >>> >> > in
>>> >>> >> > the package.json
>>> >>> >> > After applying the patches--which may require deleting yarn.lock
>>> >>> >> > for
>>> >>> >> > the
>>> >>> >> > first patch--you should cd web && yarn install
>>> >>> >> >
>>> >>> >> > Then yarn test will run the linter, jasmine specs, and python
>>> >>> >> > tests
>>> >>> >> > including feature tests, in that order, exiting early if there
>>> >>> >> > are
>>> >>> >> > failures/errors.
>>> >>> >> > At the moment, the CheckForViewData test is failing on master as
>>> >>> >> > well
>>> >>> >> > as
>>> >>> >> > in
>>> >>> >> > each of these patches; that should be resolved as RM2477.
>>> >>> >> >
>>> >>> >> > Thanks!
>>> >>> >> > George and Matt
>>> >>> >> >
>>> >>> >> >
>>> >>> >> > On Thu, Jun 8, 2017 at 9:15 AM, Dave Page <dpage@pgadmin.org>
>>> >>> >> > wrote:
>>> >>> >> >>
>>> >>> >> >> Hi George
>>> >>> >> >>
>>> >>> >> >> On Wed, Jun 7, 2017 at 10:21 PM, George Gelashvili
>>> >>> >> >> <ggelashvili@pivotal.io> wrote:
>>> >>> >> >> > Hi Dave,
>>> >>> >> >> >
>>> >>> >> >> > I split the linting out into an intermediate commit, and
>>> >>> >> >> > rebased
>>> >>> >> >> > on
>>> >>> >> >> > top
>>> >>> >> >> > of
>>> >>> >> >> > master.
>>> >>> >> >>
>>> >>> >> >> Unfortunately, it still doesn't apply:
>>> >>> >> >>
>>> >>> >> >> error: patch failed: web/regression/javascript/test-main.js:1
>>> >>> >> >> error: removal patch leaves file contents
>>> >>> >> >> error: web/regression/javascript/test-main.js: patch does not
>>> >>> >> >> apply
>>> >>> >> >> Checking patch web/regression/requirements.txt...
>>> >>> >> >> Checking patch web/webpack.config.js...
>>> >>> >> >> Checking patch web/webpack.test.config.js...
>>> >>> >> >> Checking patch web/yarn.lock...
>>> >>> >> >> error: web/yarn.lock: already exists in working directory
>>> >>> >> >> Applied patch .gitignore cleanly.
>>> >>> >> >> Applied patch Make.bat cleanly.
>>> >>> >> >> Applied patch README cleanly.
>>> >>> >> >> Applied patch pkg/mac/build.sh cleanly.
>>> >>> >> >> Applied patch pkg/pip/build.sh cleanly.
>>> >>> >> >> Applied patch pkg/src/build.sh cleanly.
>>> >>> >> >> Applied patch web/.eslintrc.js cleanly.
>>> >>> >> >> Applied patch web/karma.conf.js cleanly.
>>> >>> >> >> Applied patch web/package.json cleanly.
>>> >>> >> >> Applied patch web/pgAdmin4.py cleanly.
>>> >>> >> >> Applied patch web/pgadmin/static/jsx/components.jsx cleanly.
>>> >>> >> >> Applied patch web/pgadmin/tools/javascript/__init__.py cleanly.
>>> >>> >> >> Applied patch web/pgadmin/tools/javascript/javascript_bundler.py
>>> >>> >> >> cleanly.
>>> >>> >> >> Applied patch web/pgadmin/tools/javascript/tests/__init__.py
>>> >>> >> >> cleanly.
>>> >>> >> >> Applied patch
>>> >>> >> >> web/pgadmin/tools/javascript/tests/test_javascript_bundler.py
>>> >>> >> >> cleanly.
>>> >>> >> >> Applied patch web/regression/README cleanly.
>>> >>> >> >> Applied patch
>>> >>> >> >> web/regression/javascript/jasmine_capture_warnings_beforeall.js
>>> >>> >> >> cleanly.
>>> >>> >> >> Applied patch web/regression/requirements.txt cleanly.
>>> >>> >> >> Applied patch web/webpack.config.js cleanly.
>>> >>> >> >> Applied patch web/webpack.test.config.js cleanly.
>>> >>> >> >>
>>> >>> >> >> The second (lint update) patch is even worse, with significant
>>> >>> >> >> number
>>> >>> >> >> change that just don't want to apply.
>>> >>> >> >>
>>> >>> >> >> Clearly yarn.lock needs to be removed from there repo.
>>> >>> >> >>
>>> >>> >> >> Once I can apply a version of this, how should I be running the
>>> >>> >> >> linter
>>> >>> >> >> and the unit tests?
>>> >>> >> >>
>>> >>> >> >> --
>>> >>> >> >> Dave Page
>>> >>> >> >> Blog: http://pgsnake.blogspot.com
>>> >>> >> >> Twitter: @pgsnake
>>> >>> >> >>
>>> >>> >> >> EnterpriseDB UK: http://www.enterprisedb.com
>>> >>> >> >> The Enterprise PostgreSQL Company
>>> >>> >> >
>>> >>> >> >
>>> >>> >>
>>> >>> >>
>>> >>> >>
>>> >>> >> --
>>> >>> >> Dave Page
>>> >>> >> Blog: http://pgsnake.blogspot.com
>>> >>> >> Twitter: @pgsnake
>>> >>> >>
>>> >>> >> EnterpriseDB UK: http://www.enterprisedb.com
>>> >>> >> The Enterprise PostgreSQL Company
>>> >>> >>
>>> >>> >> --
>>> >>> >> Sent via pgadmin-hackers mailing list
>>> >>> >> (pgadmin-hackers@postgresql.org)
>>> >>> >> To make changes to your subscription:
>>> >>> >> http://www.postgresql.org/mailpref/pgadmin-hackers
>>> >>>
>>> >>>
>>> >>>
>>> >>> --
>>> >>> Dave Page
>>> >>> Blog: http://pgsnake.blogspot.com
>>> >>> Twitter: @pgsnake
>>> >>>
>>> >>> EnterpriseDB UK: http://www.enterprisedb.com
>>> >>> The Enterprise PostgreSQL Company
>>> >
>>> >
>>> >
>>> > --
>>> > Dave Page
>>> > Blog: http://pgsnake.blogspot.com
>>> > Twitter: @pgsnake
>>> >
>>> > EnterpriseDB UK: http://www.enterprisedb.com
>>> > The Enterprise PostgreSQL Company
>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
On Tue, Jun 13, 2017 at 11:22 AM, Ashesh Vashi
<ashesh.vashi@enterprisedb.com> wrote:
> On Tue, Jun 13, 2017 at 2:47 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> And then I find a problem. Sigh.
>>
>> When running in the desktop runtime, under QtWekKit (the forked,
>> updated version that is by far the best of the browser engines we've
>> used), we get the attached error at startup. I don't see this under
>> QtWebEngine, though as we've already found, that's not usable for
>> other reasons.
>>
>> Is this fixable?
>
> As per 'http://qtwebkit.blogspot.in/2016/08/qtwebkit-im-back.html':
> "
> WebKit engine itself has not been updated since Qt 5.2 release. That's why
> it didn't support recent changes in Web standards that happened after 2013,
> including: new JavaScript language standard ES2015 (also known as ES6), as
> well as improvements in DOM API and CSS.
> ...
> "
>
> Could this be a reason?

For the old webkit, certainly, but if you read further down, the
version we're using has been updated and does now claim to support
most of ES2015.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Ashesh Vashi
Дата:


--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company


http://www.linkedin.com/in/asheshvashi


On Tue, Jun 13, 2017 at 3:56 PM, Dave Page <dpage@pgadmin.org> wrote:
On Tue, Jun 13, 2017 at 11:22 AM, Ashesh Vashi
<ashesh.vashi@enterprisedb.com> wrote:
> On Tue, Jun 13, 2017 at 2:47 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> And then I find a problem. Sigh.
>>
>> When running in the desktop runtime, under QtWekKit (the forked,
>> updated version that is by far the best of the browser engines we've
>> used), we get the attached error at startup. I don't see this under
>> QtWebEngine, though as we've already found, that's not usable for
>> other reasons.
>>
>> Is this fixable?
>
> As per 'http://qtwebkit.blogspot.in/2016/08/qtwebkit-im-back.html':
> "
> WebKit engine itself has not been updated since Qt 5.2 release. That's why
> it didn't support recent changes in Web standards that happened after 2013,
> including: new JavaScript language standard ES2015 (also known as ES6), as
> well as improvements in DOM API and CSS.
> ...
> "
>
> Could this be a reason?

For the old webkit, certainly, but if you read further down, the
version we're using has been updated and does now claim to support
most of ES2015.
This is in one of the comment section.

"This branch is 1099 commits ahead, 7251 commits behind WebKit:master."

-- Thanks, Ashesh

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Surinder Kumar
Дата:

On Tue, Jun 13, 2017 at 3:56 PM, Dave Page <dpage@pgadmin.org> wrote:
On Tue, Jun 13, 2017 at 11:22 AM, Ashesh Vashi
<ashesh.vashi@enterprisedb.com> wrote:
> On Tue, Jun 13, 2017 at 2:47 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> And then I find a problem. Sigh.
>>
>> When running in the desktop runtime, under QtWekKit (the forked,
>> updated version that is by far the best of the browser engines we've
>> used), we get the attached error at startup. I don't see this under
>> QtWebEngine, though as we've already found, that's not usable for
>> other reasons.
>>
>> Is this fixable?
>
> As per 'http://qtwebkit.blogspot.in/2016/08/qtwebkit-im-back.html':
> "
> WebKit engine itself has not been updated since Qt 5.2 release. That's why
> it didn't support recent changes in Web standards that happened after 2013,
> including: new JavaScript language standard ES2015 (also known as ES6), as
> well as improvements in DOM API and CSS.
> ...
> "
>
> Could this be a reason?

For the old webkit, certainly, but if you read further down, the
version we're using has been updated and does now claim to support
most of ES2015.
​In fact the modern browsers don't support ES6 JS so the JS files containing ES6 code are first transpiled using babel into JS that browsers supports.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
On Tue, Jun 13, 2017 at 11:31 AM, Surinder Kumar
<surinder.kumar@enterprisedb.com> wrote:
>
> On Tue, Jun 13, 2017 at 3:56 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> On Tue, Jun 13, 2017 at 11:22 AM, Ashesh Vashi
>> <ashesh.vashi@enterprisedb.com> wrote:
>> > On Tue, Jun 13, 2017 at 2:47 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>
>> >> And then I find a problem. Sigh.
>> >>
>> >> When running in the desktop runtime, under QtWekKit (the forked,
>> >> updated version that is by far the best of the browser engines we've
>> >> used), we get the attached error at startup. I don't see this under
>> >> QtWebEngine, though as we've already found, that's not usable for
>> >> other reasons.
>> >>
>> >> Is this fixable?
>> >
>> > As per 'http://qtwebkit.blogspot.in/2016/08/qtwebkit-im-back.html':
>> > "
>> > WebKit engine itself has not been updated since Qt 5.2 release. That's
>> > why
>> > it didn't support recent changes in Web standards that happened after
>> > 2013,
>> > including: new JavaScript language standard ES2015 (also known as ES6),
>> > as
>> > well as improvements in DOM API and CSS.
>> > ...
>> > "
>> >
>> > Could this be a reason?
>>
>> For the old webkit, certainly, but if you read further down, the
>> version we're using has been updated and does now claim to support
>> most of ES2015.
>
> In fact the modern browsers don't support ES6 JS so the JS files containing
> ES6 code are first transpiled using babel into JS that browsers supports.

Well, we *could* do that, but are we? I'm not sure the current code
does anything more than lint and webpack it.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Surinder Kumar
Дата:
On Tue, Jun 13, 2017 at 4:05 PM, Dave Page <dpage@pgadmin.org> wrote:
On Tue, Jun 13, 2017 at 11:31 AM, Surinder Kumar
<surinder.kumar@enterprisedb.com> wrote:
>
> On Tue, Jun 13, 2017 at 3:56 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> On Tue, Jun 13, 2017 at 11:22 AM, Ashesh Vashi
>> <ashesh.vashi@enterprisedb.com> wrote:
>> > On Tue, Jun 13, 2017 at 2:47 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>
>> >> And then I find a problem. Sigh.
>> >>
>> >> When running in the desktop runtime, under QtWekKit (the forked,
>> >> updated version that is by far the best of the browser engines we've
>> >> used), we get the attached error at startup. I don't see this under
>> >> QtWebEngine, though as we've already found, that's not usable for
>> >> other reasons.
>> >>
>> >> Is this fixable?
>> >
>> > As per 'http://qtwebkit.blogspot.in/2016/08/qtwebkit-im-back.html':
>> > "
>> > WebKit engine itself has not been updated since Qt 5.2 release. That's
>> > why
>> > it didn't support recent changes in Web standards that happened after
>> > 2013,
>> > including: new JavaScript language standard ES2015 (also known as ES6),
>> > as
>> > well as improvements in DOM API and CSS.
>> > ...
>> > "
>> >
>> > Could this be a reason?
>>
>> For the old webkit, certainly, but if you read further down, the
>> version we're using has been updated and does now claim to support
>> most of ES2015.
>
> In fact the modern browsers don't support ES6 JS so the JS files containing
> ES6 code are first transpiled using babel into JS that browsers supports.

Well, we *could* do that, but are we? I'm not sure the current code
does anything more than lint and webpack it.
​Yes. babel is used in webpack config which converts JSX, JS and react JS library code into browser supportable JS code and put them into generated directory which we are then imported in sqleditor.js

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
On Tue, Jun 13, 2017 at 11:47 AM, Surinder Kumar
<surinder.kumar@enterprisedb.com> wrote:
> On Tue, Jun 13, 2017 at 4:05 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> On Tue, Jun 13, 2017 at 11:31 AM, Surinder Kumar
>> <surinder.kumar@enterprisedb.com> wrote:
>> >
>> > On Tue, Jun 13, 2017 at 3:56 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>
>> >> On Tue, Jun 13, 2017 at 11:22 AM, Ashesh Vashi
>> >> <ashesh.vashi@enterprisedb.com> wrote:
>> >> > On Tue, Jun 13, 2017 at 2:47 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >> >>
>> >> >> And then I find a problem. Sigh.
>> >> >>
>> >> >> When running in the desktop runtime, under QtWekKit (the forked,
>> >> >> updated version that is by far the best of the browser engines we've
>> >> >> used), we get the attached error at startup. I don't see this under
>> >> >> QtWebEngine, though as we've already found, that's not usable for
>> >> >> other reasons.
>> >> >>
>> >> >> Is this fixable?
>> >> >
>> >> > As per 'http://qtwebkit.blogspot.in/2016/08/qtwebkit-im-back.html':
>> >> > "
>> >> > WebKit engine itself has not been updated since Qt 5.2 release.
>> >> > That's
>> >> > why
>> >> > it didn't support recent changes in Web standards that happened after
>> >> > 2013,
>> >> > including: new JavaScript language standard ES2015 (also known as
>> >> > ES6),
>> >> > as
>> >> > well as improvements in DOM API and CSS.
>> >> > ...
>> >> > "
>> >> >
>> >> > Could this be a reason?
>> >>
>> >> For the old webkit, certainly, but if you read further down, the
>> >> version we're using has been updated and does now claim to support
>> >> most of ES2015.
>> >
>> > In fact the modern browsers don't support ES6 JS so the JS files
>> > containing
>> > ES6 code are first transpiled using babel into JS that browsers
>> > supports.
>>
>> Well, we *could* do that, but are we? I'm not sure the current code
>> does anything more than lint and webpack it.
>
> Yes. babel is used in webpack config which converts JSX, JS and react JS
> library code into browser supportable JS code and put them into generated
> directory which we are then imported in sqleditor.js

Ahh, yes - I see it (still getting my head around this stuff). So,
perhaps we need a different transform to support webkit?


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
George Gelashvili
Дата:
We learned that the underlying issue was related to react-dom's SyntheticEvent.augmentClass function being undefined.

This seems to be caused by attempted property assignment after the SyntheticEvent had been replaced by a Proxy of itself. This works fine in Chromium et al, but QtWebKit doesn't deal with Proxy Event objects well.
Moving the augmentClass definition and assignment up above the Proxy stuff resolves the issue in a PR to React: https://github.com/facebook/react/pull/10011

This has a decent chance of being rejected, as QtWebKit appears to be losing support.

While and if this is being sorted out, we vendorized React, as one does. Here are patches on the version we were using previously, and the fix from the above PR.

We started talking to some Pivotal folks about QtWebKit to see if we can fix the Proxy Event issue in the browser. 
We are also looking into replacements for QtWebKit. 

Thanks!
George and Sarah

On Tue, Jun 13, 2017 at 7:19 AM, Dave Page <dpage@pgadmin.org> wrote:
On Tue, Jun 13, 2017 at 11:47 AM, Surinder Kumar
<surinder.kumar@enterprisedb.com> wrote:
> On Tue, Jun 13, 2017 at 4:05 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> On Tue, Jun 13, 2017 at 11:31 AM, Surinder Kumar
>> <surinder.kumar@enterprisedb.com> wrote:
>> >
>> > On Tue, Jun 13, 2017 at 3:56 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>
>> >> On Tue, Jun 13, 2017 at 11:22 AM, Ashesh Vashi
>> >> <ashesh.vashi@enterprisedb.com> wrote:
>> >> > On Tue, Jun 13, 2017 at 2:47 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >> >>
>> >> >> And then I find a problem. Sigh.
>> >> >>
>> >> >> When running in the desktop runtime, under QtWekKit (the forked,
>> >> >> updated version that is by far the best of the browser engines we've
>> >> >> used), we get the attached error at startup. I don't see this under
>> >> >> QtWebEngine, though as we've already found, that's not usable for
>> >> >> other reasons.
>> >> >>
>> >> >> Is this fixable?
>> >> >
>> >> > As per 'http://qtwebkit.blogspot.in/2016/08/qtwebkit-im-back.html':
>> >> > "
>> >> > WebKit engine itself has not been updated since Qt 5.2 release.
>> >> > That's
>> >> > why
>> >> > it didn't support recent changes in Web standards that happened after
>> >> > 2013,
>> >> > including: new JavaScript language standard ES2015 (also known as
>> >> > ES6),
>> >> > as
>> >> > well as improvements in DOM API and CSS.
>> >> > ...
>> >> > "
>> >> >
>> >> > Could this be a reason?
>> >>
>> >> For the old webkit, certainly, but if you read further down, the
>> >> version we're using has been updated and does now claim to support
>> >> most of ES2015.
>> >
>> > In fact the modern browsers don't support ES6 JS so the JS files
>> > containing
>> > ES6 code are first transpiled using babel into JS that browsers
>> > supports.
>>
>> Well, we *could* do that, but are we? I'm not sure the current code
>> does anything more than lint and webpack it.
>
> Yes. babel is used in webpack config which converts JSX, JS and react JS
> library code into browser supportable JS code and put them into generated
> directory which we are then imported in sqleditor.js

Ahh, yes - I see it (still getting my head around this stuff). So,
perhaps we need a different transform to support webkit?


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Вложения

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
Hi George

On Tue, Jun 20, 2017 at 10:29 PM, George Gelashvili
<ggelashvili@pivotal.io> wrote:
> We learned that the underlying issue was related to react-dom's
> SyntheticEvent.augmentClass function being undefined.
>
> This seems to be caused by attempted property assignment after the
> SyntheticEvent had been replaced by a Proxy of itself. This works fine in
> Chromium et al, but QtWebKit doesn't deal with Proxy Event objects well.
> Moving the augmentClass definition and assignment up above the Proxy stuff
> resolves the issue in a PR to React:
> https://github.com/facebook/react/pull/10011
>
> This has a decent chance of being rejected, as QtWebKit appears to be losing
> support.
>
> While and if this is being sorted out, we vendorized React, as one does.
> Here are patches on the version we were using previously, and the fix from
> the above PR.

Thanks - committed.

> We started talking to some Pivotal folks about QtWebKit to see if we can fix
> the Proxy Event issue in the browser.
> We are also looking into replacements for QtWebKit.

Yeah, so here's the current state of play there:

- Some major Linuxes don't seem to have added QtWebEngine to their packages yet.

- QtWebEngine has multiple issues under Windows; it's *very* slow, and
doesn't play nicely with some graphics cards and Remote Desktop.

- QtWebKit (official) has rendering issues, and has been deprecated by Qt.

- QtWebKit (annulen) fixes the rendering issues, and generally works
well, but is very slow on Windows (though not as bad as QtWebEngine).

- QtWebKit (annulen) is a fork, which may or may not live for long.
It's also still quite far behind the latest WebKit code.

- ActiveQt is looking extremely promising on Windows, embedding IE as
the browser. It's speed is on par with QtWebKit on Mac. We're
currently working on handling multiple tabs/windows and sharing
cookies between them.

- Electron and Node-Webkit are performant options, but don't support
tabs, and may not even support multiple windows in the same session.

Neel is currently working on the ActiveQt option for Windows. I've
been very impressed by its speed, and of course, JS support is per the
installed version of IE. If that pans out, we could potentially move
back to QtWebEngine on Linux/Mac (where the latest versions may well
be improved), and use ActiveQt on Windows, thus dropping WebKit
altogether.

Another option would be to help get the annulen QtWebKit port up to
par; fix the performance issues on Windows, and get it up to the
latest WebKit code. That seems like it would take much more work, and
I don't think our team has the capacity for that. If yours does, then
it's certainly worth exploring.

Ashesh is also planning to spend a little more time looking more
deeply at Electron/Node-Webkit as well as other options, once he's
finished his current work.

Other thoughts/experiences are definitely welcome.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Sarah McAlear
Дата:
Hello!

Thank you for committing the patch! 

We are currently looking into CEF (https://bitbucket.org/chromiumembedded/cef) as an alternative to QTWebKit. So far it looks promising. It works on all platforms. It is the base for Google Chrome, so it should be maintained for some time to come. Version 60 is currently in development. At this point we are developing a prototype for Mac as a proof of concept. We will keep you posted as we go. 

We are able to launch the server in one terminal and launch our browser app in another and use pgAdmin from that app. 

It would be useful to have a framework to follow to decide what library will be used to support pgAdmin in the future. What metrics are you currently using? What data should we collect on prototypes in order to help the selection process?

Thanks!
João & Sarah

On Wed, Jun 21, 2017 at 6:37 AM, Dave Page <dpage@pgadmin.org> wrote:
Hi George

On Tue, Jun 20, 2017 at 10:29 PM, George Gelashvili
<ggelashvili@pivotal.io> wrote:
> We learned that the underlying issue was related to react-dom's
> SyntheticEvent.augmentClass function being undefined.
>
> This seems to be caused by attempted property assignment after the
> SyntheticEvent had been replaced by a Proxy of itself. This works fine in
> Chromium et al, but QtWebKit doesn't deal with Proxy Event objects well.
> Moving the augmentClass definition and assignment up above the Proxy stuff
> resolves the issue in a PR to React:
> https://github.com/facebook/react/pull/10011
>
> This has a decent chance of being rejected, as QtWebKit appears to be losing
> support.
>
> While and if this is being sorted out, we vendorized React, as one does.
> Here are patches on the version we were using previously, and the fix from
> the above PR.

Thanks - committed.

> We started talking to some Pivotal folks about QtWebKit to see if we can fix
> the Proxy Event issue in the browser.
> We are also looking into replacements for QtWebKit.

Yeah, so here's the current state of play there:

- Some major Linuxes don't seem to have added QtWebEngine to their packages yet.

- QtWebEngine has multiple issues under Windows; it's *very* slow, and
doesn't play nicely with some graphics cards and Remote Desktop.

- QtWebKit (official) has rendering issues, and has been deprecated by Qt.

- QtWebKit (annulen) fixes the rendering issues, and generally works
well, but is very slow on Windows (though not as bad as QtWebEngine).

- QtWebKit (annulen) is a fork, which may or may not live for long.
It's also still quite far behind the latest WebKit code.

- ActiveQt is looking extremely promising on Windows, embedding IE as
the browser. It's speed is on par with QtWebKit on Mac. We're
currently working on handling multiple tabs/windows and sharing
cookies between them.

- Electron and Node-Webkit are performant options, but don't support
tabs, and may not even support multiple windows in the same session.

Neel is currently working on the ActiveQt option for Windows. I've
been very impressed by its speed, and of course, JS support is per the
installed version of IE. If that pans out, we could potentially move
back to QtWebEngine on Linux/Mac (where the latest versions may well
be improved), and use ActiveQt on Windows, thus dropping WebKit
altogether.

Another option would be to help get the annulen QtWebKit port up to
par; fix the performance issues on Windows, and get it up to the
latest WebKit code. That seems like it would take much more work, and
I don't think our team has the capacity for that. If yours does, then
it's certainly worth exploring.

Ashesh is also planning to spend a little more time looking more
deeply at Electron/Node-Webkit as well as other options, once he's
finished his current work.

Other thoughts/experiences are definitely welcome.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

От
Dave Page
Дата:
Hi

On Wed, Jun 21, 2017 at 3:23 PM, Sarah McAlear <smcalear@pivotal.io> wrote:
> Hello!
>
> Thank you for committing the patch!
>
> We are currently looking into CEF
> (https://bitbucket.org/chromiumembedded/cef) as an alternative to QTWebKit.
> So far it looks promising. It works on all platforms. It is the base for
> Google Chrome, so it should be maintained for some time to come. Version 60
> is currently in development. At this point we are developing a prototype for
> Mac as a proof of concept. We will keep you posted as we go.

Cool - we looked at CEF before, but...

> We are able to launch the server in one terminal and launch our browser app
> in another and use pgAdmin from that app.

... if memory serves, the problem we found was that on Windows it's
built using VC++ 2015, which doesn't play nicely with Python which
uses 2013 (as do the PostgreSQL utilities). Moving everything to 2015
would be non-trivial to say the least.

> It would be useful to have a framework to follow to decide what library will
> be used to support pgAdmin in the future. What metrics are you currently
> using? What data should we collect on prototypes in order to help the
> selection process?

Oh, it's highly scientific :-p. As the biggest issue between the
options is finding one which will work with our set of dependencies,
and supports new windows/tearable tabs (if it were no longer to be
embedded in our runtime), it's really down to:

- Getting a startup time of ~20 seconds or less in my test VM and on
my 16GB i7 SSD based desktop under Windows 10
- Ensuring that node expansion/load times are basically instant with a
local database server.

> Thanks!
> João & Sarah
>
> On Wed, Jun 21, 2017 at 6:37 AM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi George
>>
>> On Tue, Jun 20, 2017 at 10:29 PM, George Gelashvili
>> <ggelashvili@pivotal.io> wrote:
>> > We learned that the underlying issue was related to react-dom's
>> > SyntheticEvent.augmentClass function being undefined.
>> >
>> > This seems to be caused by attempted property assignment after the
>> > SyntheticEvent had been replaced by a Proxy of itself. This works fine
>> > in
>> > Chromium et al, but QtWebKit doesn't deal with Proxy Event objects well.
>> > Moving the augmentClass definition and assignment up above the Proxy
>> > stuff
>> > resolves the issue in a PR to React:
>> > https://github.com/facebook/react/pull/10011
>> >
>> > This has a decent chance of being rejected, as QtWebKit appears to be
>> > losing
>> > support.
>> >
>> > While and if this is being sorted out, we vendorized React, as one does.
>> > Here are patches on the version we were using previously, and the fix
>> > from
>> > the above PR.
>>
>> Thanks - committed.
>>
>> > We started talking to some Pivotal folks about QtWebKit to see if we can
>> > fix
>> > the Proxy Event issue in the browser.
>> > We are also looking into replacements for QtWebKit.
>>
>> Yeah, so here's the current state of play there:
>>
>> - Some major Linuxes don't seem to have added QtWebEngine to their
>> packages yet.
>>
>> - QtWebEngine has multiple issues under Windows; it's *very* slow, and
>> doesn't play nicely with some graphics cards and Remote Desktop.
>>
>> - QtWebKit (official) has rendering issues, and has been deprecated by Qt.
>>
>> - QtWebKit (annulen) fixes the rendering issues, and generally works
>> well, but is very slow on Windows (though not as bad as QtWebEngine).
>>
>> - QtWebKit (annulen) is a fork, which may or may not live for long.
>> It's also still quite far behind the latest WebKit code.
>>
>> - ActiveQt is looking extremely promising on Windows, embedding IE as
>> the browser. It's speed is on par with QtWebKit on Mac. We're
>> currently working on handling multiple tabs/windows and sharing
>> cookies between them.
>>
>> - Electron and Node-Webkit are performant options, but don't support
>> tabs, and may not even support multiple windows in the same session.
>>
>> Neel is currently working on the ActiveQt option for Windows. I've
>> been very impressed by its speed, and of course, JS support is per the
>> installed version of IE. If that pans out, we could potentially move
>> back to QtWebEngine on Linux/Mac (where the latest versions may well
>> be improved), and use ActiveQt on Windows, thus dropping WebKit
>> altogether.
>>
>> Another option would be to help get the annulen QtWebKit port up to
>> par; fix the performance issues on Windows, and get it up to the
>> latest WebKit code. That seems like it would take much more work, and
>> I don't think our team has the capacity for that. If yours does, then
>> it's certainly worth exploring.
>>
>> Ashesh is also planning to spend a little more time looking more
>> deeply at Electron/Node-Webkit as well as other options, once he's
>> finished his current work.
>>
>> Other thoughts/experiences are definitely welcome.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company