Skip to content

mgr/dashboard: Fixed documentation link on RGW page - #24612

Merged
LenzGr merged 1 commit into
ceph:masterfrom
Tinatinak:fix_bug24548
Oct 23, 2018
Merged

LenzGr merged 1 commit into
ceph:masterfrom
Tinatinak:fix_bug24548

Conversation

@Tinatinak

@Tinatinak Tinatinak commented Oct 16, 2018 •

Copy link
Copy Markdown
Contributor

Fixes: https://tracker.ceph.com/issues/24548

Signed-off-by: Tina Kallio [email protected]

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

@LenzGr

LenzGr commented Oct 16, 2018

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Can you please amend the title of this PR and the git commit message to refer to the component and a description of the problem you're addressing, e.g.:

mgr/dashboard: Fixed documentation link on RGW page

Fixes: https://tracker.ceph.com/issues/24548

Signed-off-by: Tina Kallio <[email protected]>

@Tinatinak Tinatinak changed the title Fixes: https://tracker.ceph.com/issues/24548 mgr/dashboard: Fixed documentation link on RGW page Oct 16, 2018

@ricardoasmarques ricardoasmarques left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

linting errors

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Linting Error:
ERROR: /ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-501/rgw-501.component.ts[30, 1]: Exceeds maximum line length of 100

You can check linting errors by running npm run lint

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unit tests are also failing due to a missing import:

FAIL  src/app/ceph/rgw/rgw-501/rgw-501.component.spec.ts
  ● Rgw501Component › should create

    StaticInjectorError(DynamicTestModule)[HttpClient]: 
      StaticInjectorError(Platform: core)[HttpClient]: 
        NullInjectorError: No provider for HttpClient!

You can execute unit tests by running npm run test

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The linting error is now fixed. However, I still have problems running the unit tests. It looks like this. Is this related to the missing import or is this something else?

tina@tina-VirtualBox:~/ceph/src/pybind/mgr/dashboard/frontend$ npm run test

> [email protected] test /home/tina/ceph/src/pybind/mgr/dashboard/frontend
> jest --watch

Error: watch /home/tina/ceph/src/pybind/mgr/dashboard/frontend ENOSPC
    at FSWatcher.start (fs.js:1382:19)
    at Object.fs.watch (fs.js:1408:11)
    at NodeWatcher.watchdir (/home/tina/ceph/src/pybind/mgr/dashboard/frontend/node_modules/sane/src/node_watcher.js:175:20)
    at new NodeWatcher (/home/tina/ceph/src/pybind/mgr/dashboard/frontend/node_modules/sane/src/node_watcher.js:45:8)
    at createWatcher (/home/tina/ceph/src/pybind/mgr/dashboard/frontend/node_modules/jest-haste-map/build/index.js:768:23)
    at Array.map (<anonymous>)
    at HasteMap._watch (/home/tina/ceph/src/pybind/mgr/dashboard/frontend/node_modules/jest-haste-map/build/index.js:919:44)
    at _buildPromise._buildFileMap.then.then.hasteMap (/home/tina/ceph/src/pybind/mgr/dashboard/frontend/node_modules/jest-haste-map/build/index.js:343:23)
    at <anonymous>
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `jest --watch`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/tina/.npm/_logs/2018-10-16T19_55_22_998Z-debug.log

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you try "npm run test:ci"?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe a problem with the npm version, try:

source ~/ceph/build/src/pybind/mgr/dashboard/node-env/bin/activate
npm test

If this doesn't fix the problem, try to remove the node_modules:

rm -r ~/ceph/src/pybind/mgr/dashboard/frontend/node_modules
npm install
npm test

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Possible reason: jestjs/jest#3254
If you are using VS Code, the best solution, would be to blacklist most of the directories from the watch feature. I have done this and can help you with it.

Otherwise you might need to run the command they suggest.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, that seems to be the problem, since it works when I close down VS Code. But it is a bit unpractical to close it down every time I want to run the tests, so I'd be happy if you could show me how to blacklist the directories, tspmelo.

I've fixed the import issue so now the code passes npm run test and npm run lint. However I still have problems with something called lint:prettier. I'm unfamiliar with this tool, but could this be something as simple as an indention? I can't see my mistake now but I will go through it again tomorrow.

tina@tina-VirtualBox:~/ceph/src/pybind/mgr/dashboard/frontend$ npm run lint

> [email protected] lint /home/tina/ceph/src/pybind/mgr/dashboard/frontend
> npm run lint:tslint && npm run lint:prettier && npm run lint:html


> [email protected] lint:tslint /home/tina/ceph/src/pybind/mgr/dashboard/frontend
> ng lint ceph-dashboard ceph-dashboard-e2e



All files pass linting.

> [email protected] lint:prettier /home/tina/ceph/src/pybind/mgr/dashboard/frontend
> prettier --list-different "{src,e2e}/**/*.{ts,scss}"

src/app/ceph/rgw/rgw-501/rgw-501.component.ts
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] lint:prettier: `prettier --list-different "{src,e2e}/**/*.{ts,scss}"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] lint:prettier script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/tina/.npm/_logs/2018-10-17T20_44_06_884Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] lint: `npm run lint:tslint && npm run lint:prettier && npm run lint:html`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/tina/.npm/_logs/2018-10-17T20_44_06_902Z-debug.log

@ricardoasmarques ricardoasmarques left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@LenzGr
LenzGr merged commit 709e65e into ceph:master Oct 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants