When running things by hand it's nice to reuse the same build of
implements over and over, but for the casual contributor
who may need to run implements as part of adding a new API we want to
ensure the tool being run is up-to-date with the repo.
Cleaning the binary first is a quick and dirty way of getting there.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Specifically, this provides examples of the newly standardized
methods for marking deprecated and preview as well as telling
the user how to update the api-status docs.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Add new rules to build/run the implements tool via the test container,
an only the implements tool, when apiage is to be run and the
implements.json is not present.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
The rules added to the makefile help contributors and maintainers follow
the recent api stability policy by allowing one to check the state,
update the state (using the git tags for versioning info) and update
only the generated markdown doc.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
The implements tool just does static code (ast) analysis. Support
running it in the container, but on its own in the case you only
want the implements tool output.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
It is kind of pointless to let the tool run if no source data is
present, so treat empty/missing source as an error.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
We no longer support ceph luminous, and have not for a while. This
test case was kept separately from the others because it didn't function
correctly when tested against luminous clusters. As part of the effort
to remove the unsupported build tags, there's no longer even a reason
to keep this as it's own file with the tags removed, so merge it
together.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Luminous and mimic have not been supported for a few releases now.
There's no need to keep these build tags any more.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Luminous and mimic have not been supported for a few releases now.
There's no need to keep these build tags any more.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This is a workaround for the common test flake:
```
=== RUN TestMirroring
mirror_workflow_test.go:63:
Error Trace: mirror_workflow_test.go:63
Error: Received unexpected error:
rados: ret=-95, Operation not supported:
"Module 'mirroring' is not enabled (required by command 'fs snapshot
mirror enable'): use `ceph mgr module enable mirroring` to enable it"
Test: TestMirroring
```
at even though we've certainly requested the mode be enabled the mgr
has apparently not fully processed the request and the module is
not yet available. We add a half-second sleep after each call
to hopefully give the mgr time enough to completely enable the module.
A future improvement would be to poll the mgr until we know it is ready to
use the cephfs mirroring module, but that would take some research and
(probably) new API calls. So this is a temporary workaround just
to try and reduce the number of test flakes sooner rather than later.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
We can now get an s3 user from the rgw admin ops API with its access
key. No validation on the key is performed other than not being empty.
Closes: https://github.com/ceph/go-ceph/issues/600
Signed-off-by: Sébastien Han <seb@redhat.com>
It's too easy to forget to triage a PR with the API label, and then
if the PR looks good and is approved the mergify system will merge
it. Move to using an explicit "no-API" label for marking the PR as truly
not having API changes and not requiring a 2nd review.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
While working on this patch series new APIs were added to the rbd/admin
package. This patch includes them in the initial set of apis being
tracked.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
The file api-status.json is designed to track changes to the go-ceph
APIs, especially the 'deprecated' and 'preview' apis. It also stores
lists of stable apis so that we can see if something new but not
explicitly stable appears.
The api-status.md file is actually meant to be read by users of go-ceph
so to help make decisions about the use of new preview apis or
deprecated apis. It is generated from api-status.json.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This tool can be run as part of our CI as a mechanism to check that
(some) of the policy requirements are being met. It can also be run by
humans as part of the process to update the tracked API information.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Now that 'implements' has rudimentary support for these packages we can
gather information on them just like the C based ones.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Return to trying to install castxml into the container image when
possible. This now appears to work (and function) on the centos 8 based
images.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Because there will be a lot of stable functions we only report on them
in the json report as the text report is more meant for summaries.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
The go source (ast) visitor will now keep track of all public functions it
finds putting them into lists by category: deprecated, preview, stable.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Do more than collect names, because we're going to need more information
to feed to the eventual check tool.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Teach the implements tool how to detect functions marked deprecated and
marked preview in the go-ceph codebase. Especially helpful will be the
JSON output which can, in the future, be added to a tool-chain that
helps track when deprecated functions are to be removed and when preview
functions should become stable.
Note that this change ONLY implements the detection of
preview/deprecated based on the doc comments.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
These functions let one add various rbd tasks that are done
asynchronously in the background. Also added tests for the same.
Signed-off-by: Rakshith R <rar@redhat.com>
ImageSpec type has been added to work with rbd task api.
It consists of optional pool & namespace and image name/id.
[pool/][namespace/]image[Name/id].
Added unit tests.
Signed-off-by: Rakshith R <rar@redhat.com>
Added two apis AddUserCap() and RemoveUserCap() to add/remove the
capabilities from RGW user.
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
The previous code was somewhat dependent on always having the ceph
version build tag set first. Change the code to use a function so that
constructing the build tags is no longer order dependent and relocate
the actual tag stetting if-statements to below the various function
definitions.
Signed-off-by: John Mulligan <jmulligan@redhat.com>