Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

common/options: validate see-also #42845

Merged
merged 2 commits into from Aug 24, 2021
Merged

common/options: validate see-also #42845

merged 2 commits into from Aug 24, 2021

Conversation

tchaikov
Copy link
Contributor

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

Checklist

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

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

Copy link
Member

@ideepika ideepika left a comment

Choose a reason for hiding this comment

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

tested locally, lgtm!

Copy link
Member

@ideepika ideepika left a comment

Choose a reason for hiding this comment

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

shaman failure looks related,

Traceback (most recent call last):
  File "/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/arm64/AVAILABLE_ARCH/arm64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-7149-g46305a89/rpm/el8/BUILD/ceph-17.0.0-7149-g46305a89/src/common/options/y2c.py", line 366, in <module>
    main()
  File "/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/arm64/AVAILABLE_ARCH/arm64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-7149-g46305a89/rpm/el8/BUILD/ceph-17.0.0-7149-g46305a89/src/common/options/y2c.py", line 360, in main
    translate(opts)
  File "/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/arm64/AVAILABLE_ARCH/arm64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-7149-g46305a89/rpm/el8/BUILD/ceph-17.0.0-7149-g46305a89/src/common/options/y2c.py", line 249, in translate
    with open(opts.input) as infile, \
FileNotFoundError: [Errno 2] No such file or directory: '/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/arm64/AVAILABLE_ARCH/arm64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-7149-g46305a89/rpm/el8/BUILD/ceph-17.0.0-7149-g46305a89/aarch64-redhat-linux-gnu/src/common/options/mds-client.yaml'

https://shaman.ceph.com/builds/ceph/wip-deepika-testing-2021-08-23-1343/

@tchaikov
Copy link
Contributor Author

no, the build failure is not related

make[2]: *** Deleting file 'src/common/options/mds-client.yaml'
[  1%] Generating mds-client.yaml
CMake Error at configure_file.cmake:1 (configure_file):
  configure_file Problem configuring file


make[2]: *** 

@tchaikov tchaikov requested a review from a team as a code owner August 23, 2021 14:10
@tchaikov tchaikov requested review from avanthakkar, aaryanporwal and Waadkh7 and removed request for a team August 23, 2021 14:10
@tchaikov
Copy link
Contributor Author

sorry, i was wrong. it is related. but i still don't get why.

@tchaikov
Copy link
Contributor Author

@tchaikov tchaikov force-pushed the wip-51483 branch 4 times, most recently from 9455b84 to c08bcc1 Compare August 23, 2021 14:51
@tchaikov
Copy link
Contributor Author

@tchaikov
Copy link
Contributor Author

@tchaikov
Copy link
Contributor Author

@ideepika could you take another look?

@ideepika
Copy link
Member

@tchaikov make check failure is related, can you fix it:

  3/243 Test   #1: validate-options ..........................***Failed    0.11 sec
[Errno 2] No such file or directory: ' /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/global.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/cephfs-mirror.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/crimson.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/mgr.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/mds.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/mds-client.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/mon.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/osd.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/rbd.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/rbd-mirror.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/immutable-object-cache.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/rgw.yaml'

        Start  37: unittest_base64

y2c.py is like a compiler which translates .yaml to .cc and .h files,
it does not have access to all .yaml files. to validate the dangling
see-also issue, we need to do this with a "linker".

in this change, validate-options.py is introduced to check if any of
option name included by the see-also property is valid.

Fixes: https://tracker.ceph.com/issues/51483
Signed-off-by: Kefu Chai <kchai@redhat.com>
as FindPython3.cmake only sets Python3_EXECUTABLE for us, we should
stick with Python3_EXECUTABLE instead of Python_EXECUTABLE.

Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov
Copy link
Contributor Author

@tchaikov make check failure is related, can you fix it:

  3/243 Test   #1: validate-options ..........................***Failed    0.11 sec
[Errno 2] No such file or directory: ' /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/global.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/cephfs-mirror.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/crimson.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/mgr.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/mds.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/mds-client.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/mon.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/osd.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/rbd.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/rbd-mirror.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/immutable-object-cache.yaml /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/common/options/rgw.yaml'

        Start  37: unittest_base64

@ideepika fixed.

@tchaikov tchaikov requested a review from ideepika August 24, 2021 15:18
Copy link
Member

@ideepika ideepika left a comment

Choose a reason for hiding this comment

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

lgtm!

@tchaikov tchaikov merged commit ea890d7 into ceph:master Aug 24, 2021
@tchaikov tchaikov deleted the wip-51483 branch August 24, 2021 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants