New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Oct 23, 2018

Conversation

Projects
None yet
5 participants
@Tinatinak
Contributor

Tinatinak commented Oct 16, 2018

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

Signed-off-by: Tina Kallio tina.kallio@gmail.com

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

@LenzGr LenzGr requested review from ricardoasmarques, tspmelo and Exotelis Oct 16, 2018

@LenzGr

This comment has been minimized.

Contributor

LenzGr commented Oct 16, 2018

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 <tina.kallio@gmail.com>

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

@ricardoasmarques

linting errors

}
const releaseName = this.cephReleaseNamePipe.transform(summary.version);
this.docsUrl = `http://docs.ceph.com/docs/${releaseName}/mgr/dashboard/#enabling-the-object-gateway-management-frontend`;

This comment has been minimized.

@ricardoasmarques

ricardoasmarques Oct 16, 2018

Member

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

This comment has been minimized.

@ricardoasmarques

ricardoasmarques Oct 16, 2018

Member

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

This comment has been minimized.

@Tinatinak

Tinatinak Oct 16, 2018

Contributor

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

> ceph-dashboard@0.0.0 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! ceph-dashboard@0.0.0 test: `jest --watch`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ceph-dashboard@0.0.0 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

This comment has been minimized.

@tspmelo

tspmelo Oct 16, 2018

Contributor

can you try "npm run test:ci"?

This comment has been minimized.

@ricardoasmarques

ricardoasmarques Oct 17, 2018

Member

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

This comment has been minimized.

@tspmelo

tspmelo Oct 17, 2018

Contributor

Possible reason: facebook/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.

This comment has been minimized.

@Tinatinak

Tinatinak Oct 17, 2018

Contributor

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

> ceph-dashboard@0.0.0 lint /home/tina/ceph/src/pybind/mgr/dashboard/frontend
> npm run lint:tslint && npm run lint:prettier && npm run lint:html


> ceph-dashboard@0.0.0 lint:tslint /home/tina/ceph/src/pybind/mgr/dashboard/frontend
> ng lint ceph-dashboard ceph-dashboard-e2e



All files pass linting.

> ceph-dashboard@0.0.0 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! ceph-dashboard@0.0.0 lint:prettier: `prettier --list-different "{src,e2e}/**/*.{ts,scss}"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ceph-dashboard@0.0.0 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! ceph-dashboard@0.0.0 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 ceph-dashboard@0.0.0 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

@Tinatinak Tinatinak force-pushed the Tinatinak:fix_bug24548 branch from bc83b40 to 2c79640 Oct 16, 2018

mgr/dashboard: Fixed documentation link on RGW page
Fixes: https://tracker.ceph.com/issues/24548

Signed-off-by: Tina Kallio <tina.kallio@gmail.com>

@Tinatinak Tinatinak force-pushed the Tinatinak:fix_bug24548 branch from 2c79640 to 601a429 Oct 18, 2018

@LenzGr LenzGr merged commit 709e65e into ceph:master Oct 23, 2018

5 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment