The intended workflow is to update the Go source code and then run `make
api-promote` which will detect the changes to the ceph_preview tag(s) in
the sources and then promote apis from preview to stable in the
tracking json.
I explicitly do not want apiage.py (or the makefile) to make changes to
the source code. The contributor may or may not want to make changes
incrementally, also some times a preview function may be moved to
another source file. Plus, I simply think this is a job for a human.
But we can avoid having to edit the JSON and markdown files afterward.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Promote an API from preview to stable, after the build tags are removed
from the Go source code. This mode can be used to help move apis that
are now stable out of preview state in our api-status.json file.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Add a new "Getting in Touch" with the go-ceph team section. This more
closely reflects the reality of our preference for direct async channels
(discussions, issues), indirect async channels (the ceph lists) and then
the sync chat which we really haven't been adhering to for quite some
time.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Right now this workflow needs to be run manually and it will generate
some files that are archived. The plan is to build upon this as a base
eventually teaching the workflow how to automatically file an issue
reporting on what API updates are needed after each release.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Find preview apis that should become stable. Find deprecated apis that
should be removed. Have a mode to convert between the low level json
report and some markdown that could be pasted into an issue.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
For those packages without any preview/deprecated APIs we used to
include a header despite any content under it. We could instead
mention the state in a meaningful sentence.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
A recent change in revive broke the package-comments rule when .go files
are input individually.
(see https://github.com/mgechev/revive/pull/694)
See the comment within for more info.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
In order to simplify the workflow for contributors we'll continue to ask
people to run `make api-update` when contributing new APIs. This will
record the API in our api-status files. However, it will now use a
placeholder value without a real version number. If a PR is filed and
is not accepted before the next scheduled release the maintenance team
will not have to ask the contributor to update the API versions
to correct the numbers.
Instead, we need to run the new `make api-fix-versions` rule at least
once before a release to replace the placeholder versions with real
version numbers.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Fixes: #718
This change adds a new "fix-versions" mode to apiage.py, as well as the
ability to set placeholder version values when adding a new API. The
fix-versions mode replaces placeholder versions with real version
numbers. When fixing versions, the --fix-filter-pkg & --fix-filter-func
options can be used to narrow down what APIs will be fixed in case not
all version placeholder should be fixed to the same values.
Note that the placeholders being with a '$' character and look a bit
like a shell variable. However, the text is simply a reminder - only the
'$' prefix is significant. This indicates that the field is a
placeholder.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
All the C functions needed by cephfs/admin package come from
one of the other go-ceph packages (rados, cephfs, etc) there's
no good reason to have this unused import in these files.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Now that we have support for testing APIs from pre-release Ceph
versions lets convert the current 'ceph_ci_untested' tag into
corresponding pre-release version tags.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
When run against Ceph built out of 'main' development branch our
test-suite fails to find corresponding code name. Therefore we
include 'main' also to the expected list of versions.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
When archiving, use the latest version of the archive action and use
it's ability to archive an entire directory.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This change follows the upstream deprecation of AT_NO_ATTR_SYNC in
favor of the standard AT_STATX_DONT_SYNC.
Fixes: #741
Signed-off-by: Sven Anderson <sven@redhat.com>
Lower the frequency of updates. The monthly update is documented to
occur on the first of the month, which works better with our
every-other-month release cadence.
Automatically apply the "no-API" label. Do not add a rebase label, which
has not relevance to the go-ceph workflow.
Use the prefix "go-ceph:" which is what we normally use for changes only
to the go.mode, etc.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Add support for getting the alignment (stripe size) in bytes for pools that require/support it.
Fixes#739
This commit adds two new API calls to IOContext, one to know if the pool requires alignment and
the second one to get the stripe size in bytes:
RequiresAlignment() (bool, error)
Alignment() (uint64, error)
Signed-off-by: Daniel M. Lambea <dmlambea@tenerife.es>
Don't change the build tags variable to include the -tags option at the
start. It's a bit confusing. Replace it with a function that returns
the option + the tags themselves for use on a go command line.
This fixes the remaining shellcheck errors in entrypoint.sh.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Because the package name should be a proper "list" and is used in
multiple places, take shellcheck's warning to heart and replace it
with a proper bash array. Use a common function for generating said
array.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
For this one single case, it feels like overkill to use an array
or other fancy technique. Just silence shellcheck on this instance.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This change add a new bucket struct field, so we can use rgw.admin.API.GetBucketInfo()
to get a bucket's num_shards.
Format bucket.go.
Signed-off-by: oneto1 <644739768@qq.com>
The librbd API for mirroring-related operations changed substantially between
Nautilus and Octopus. Due to this, go-ceph had previously only implemented
mirroring functionality if built against Octopus client libraries. This patch
implements equivalent functionality for use with Nautilus clients.
Signed-off-by: Sanford Miller <smiller@digitalocean.com>
Updates the Go version of the module with `go mod tidy -go 1.17`,
which also adds some explicit requirements in order to support lazy
module loading.
Signed-off-by: Sven Anderson <sven@redhat.com>
Following the mirroring setup there used to be a file named 'token'
holding the bootstrap token left out in sources. We could instead
provide the token via standard output and display it for any further
debugging purpose.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>