summaryrefslogtreecommitdiff
path: root/docs
Commit message (Collapse)AuthorAge
* docs: Refresh the guide for Ubuntu 20.04Stephen Finucane2021-02-20
| | | | | | | Nothing changes wrt package names, which is nice. We take the opportunity to clarify some wording, however. Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Update docs to point to v3.0.0 releaseStephen Finucane2021-02-20
| | | | Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Random Python 3 updatesStephen Finucane2021-02-20
| | | | | | | Correct some documentation examples and other things to reflect the new, Python 3-only world. Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Note UTF-8 requirements for databasesStephen Finucane2021-02-20
| | | | | | | | MySQL 5.3 defaulted to 'latin1' encoding, meaning users would need to explicitly configure their databases to use 'utf8'. Call this out. Signed-off-by: Stephen Finucane <stephen@that.guru> Closes: #393
* docs: Update reno for stable/3.0Stephen Finucane2020-12-13
| | | | Signed-off-by: Stephen Finucane <stephen@that.guru>
* REST: Null out previous, current relation infoStephen Finucane2020-12-13
| | | | | | | | | | | | | | | | | These fields don't work like we expect them to. Because we're linking to a non-idempotent entity, an instance of 'relation', what we're storing in either of these fields is subject to change as patches are added and removed. This makes the information pretty much useless after the fact. It's best to just state the patch and request that people query the information themselves if necessary. We don't want to remove the field entirely from the API - that would be a truly breaking change - so instead we null it out like we do for patch tags. In a v2 API (i.e. a major version bump) we can remove this entirely. A small bug with the schema generation is corrected. Signed-off-by: Stephen Finucane <stephen@that.guru> Related: #379
* requirements: Update doc requirementsStephen Finucane2020-10-01
| | | | Signed-off-by: Stephen Finucane <stephen@that.guru>
* management: introduce replacerelations commandRohit Sarkar2020-08-10
| | | | | | | | | | | | | The replacerelations script is used to ingest relations into Patchwork's patch database. A patch groups file is taken as input, which on each line contains a space separated list of patchwork ids denoting a relation. All the existing relations in Patchwork's database are removed and the relations read from the patch groups file are ingested. Signed-off-by: Rohit Sarkar <rohitsarkar5398@gmail.com> [dja: pep8, drop relations directory as empty dirs don't get stored by git, comment about how lines are generated.] Signed-off-by: Daniel Axtens <dja@axtens.net>
* docs: Bump sphinxcontrib-openapi to 0.7.0Stephen Finucane2020-05-08
| | | | | | | | This picks up an important fix [1] we want for our docs build. [1] https://github.com/sphinx-contrib/openapi/pull/87 Signed-off-by: Stephen Finucane <stephen@that.guru>
* trivial: Rename 'CoverLetter' references to 'Cover'Stephen Finucane2020-04-26
| | | | | | | We're going to be doing some model surgery shortly. Do the necessary renaming of variables ahead of this. Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Update sphinxcontrib-openapiStephen Finucane2020-04-18
| | | | | | | | | No changes necessary, thankfully, though there is a feature gap here that we will need 0.7.0 to close [1] :( [1] https://github.com/sphinx-contrib/openapi/pull/87 Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Resolve issues with 'relations'Stephen Finucane2020-04-18
| | | | | | | | | | | Two issues here: - 'PATCH /patches/{id}' and 'PUT /patches/{id}' expect a list of integers on the 'related' field - not strings - 'GET /patches' and 'GET /patches/{id}' return a list of embedded patch objects on the 'related' field - not strings Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Resolve issues with 'events'Stephen Finucane2020-04-18
| | | | | | | | | | | | | | Four things to change here: - The response is any array that can contain any type of event, not one of them. - The 'actor' field is nullable. - The 'cover' field of the 'cover-created' event is an embedded cover letter, not a string. - The specifications for the 'current_delegate' and 'previous_delegate' fields of the 'patch-delegated' field were apparently invalid. Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Resolve issues with 'comments'Stephen Finucane2020-04-18
| | | | | | | Each header in the 'headers' field can be either a string or a list value. Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Resolve issues with 'patches'Stephen Finucane2020-04-18
| | | | | | | | | | Two issues: - Errors are reported as a mapping of the field name to an array of errors, not a string. - We were attempting to validate an invalid request. Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Resolve issues with 'covers'Stephen Finucane2020-04-18
| | | | | | | | | | | Two issues to correct: - Each header in the 'headers' field can be either a string or a list value. - We state that the 'content' field will always have content but our tests were configuring otherwise. Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Resolve issues with 'bundles'Stephen Finucane2020-04-18
| | | | | | | Errors are reported as a mapping of the field name to an array of errors, not a string. Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Resolve issues with 'projects'Stephen Finucane2020-04-18
| | | | | | | | | Two issues here: - The ID in '/projects/{id}' can be either an integer or a string. - We were attempting to validate an invalid request. Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Resolve issues with 'patches'Stephen Finucane2020-04-18
| | | | | | | | | | | | | | Four issues to resolve: - The 'tags' field is a key-value mapping, not an array. - Each header in the 'headers' field can be either a string or a list value. - Errors are reported as a mapping of the field name to an array of errors, not a string. - The security type information isn't complete and doesn't account for security types. Skip it for now. Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Move common path parameters to parentStephen Finucane2020-04-18
| | | | | | | | | Turns out you don't have to nest common elements under individual routes [1]. Less duplication and more sensible docs = winning. [1] https://swagger.io/specification/#pathItemObject Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Make embedded fields nullable by defaultStephen Finucane2020-04-18
| | | | | | | | | | | As discussed at [1], "subtypes can add restrictions, but they cannot relax restrictions that are already in place." These fields need to be marked nullable and then "subclassed" to set non-nullability if required. [1] https://github.com/OAI/OpenAPI-Specification/issues/1368 Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Add schema validation to 'generate-schemas' toolStephen Finucane2020-04-18
| | | | | | Just to make sure we're not generating garbage. Signed-off-by: Stephen Finucane <stephen@that.guru>
* api: allow filtering patches and covers by msgidDaniel Axtens2020-04-14
| | | | | | | | | | | | | | | | | | | | In the process of fixing the previous bug, I realised that: a) /api/patches/msgid is a perfectly reasonable thing to attempt b) We have no way of finding a patch by message id in the API We can't actualy make /api/patches/msgid work because it may not be unique, but we can add a filter. I'm shoehorning this into stable/2.2, even though it's technically an API change: it's minor, not incompatible and in hindsight a glaring hole. Cc: Michael Ellerman <mpe@ellerman.id.au> Tested-by: Jeremy Kerr <jk@ozlabs.org> Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com> Reviewed-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Daniel Axtens <dja@axtens.net>
* Additional Python 2.7 cleanupsStephen Finucane2020-04-09
| | | | Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Remove references to Python 2.7Stephen Finucane2020-04-08
| | | | Signed-off-by: Stephen Finucane <stephen@that.guru>
* Replace references to Django 1.11 docsStephen Finucane2020-04-08
| | | | | | | This is a straight forward swap, thankfully. Django 2.2 is chosen as it's the latest LTS. Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Reference Patchwork 2.2 tarballsStephen Finucane2020-04-08
| | | | | | This is what users will want right now. Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Update reno for stable/2.2Stephen Finucane2020-04-05
| | | | Signed-off-by: Stephen Finucane <stephen@that.guru>
* REST: Add patch relationsMete Polat2020-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | View relations and add/update/delete them as a maintainer. Maintainers can only create relations of patches which are part of a project they maintain. Because this is a writable many-many nested relationship, it behaves a little unusually. In short: - All operations use PATCH to the 'related' field of a patch - To relate a patch to another patch, say 7 to 19, either: PATCH /api/patch/7 related := [19] PATCH /api/patch/19 related := [7] - To delete a patch from a relation, say 1, 21 and 42 are related but we only want it to be 1 and 42: PATCH /api/patch/21 related := [] * You _cannot_ remove a patch from a relation by patching another patch in the relation: I'm trying to avoid read-modify-write loops. * Relations that would be left with just 1 patch are deleted. This is only ensured in the API - the admin interface will let you do this. - Break-before-make: if you have [1, 12, 24] and [7, 15, 42] and you want to end up with [1, 12, 15, 42], you have to remove 15 from the second relation first: PATCH /api/patch/1 related := [15] will fail with 409 Conflict. Instead do: PATCH /api/patch/15 related := [] PATCH /api/patch/1 related := [15] -> 200 OK, [1, 12, 15, 42] and [7, 42] are the resulting relations Signed-off-by: Mete Polat <metepolat2000@gmail.com> Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Daniel Axtens <dja@axtens.net>
* docs: Reference current list-idStephen Finucane2020-02-28
| | | | | | | | We've updated our fixtures to use this newer version, meaning we no longer need to pass an explicit '--list-id' argument. Lovely. Signed-off-by: Stephen Finucane <stephen@that.guru> Fixes: 9a0b5992 ("fixtures: Update Patchwork list ID")
* Update jinja2 from 2.10.1 to 2.11.1pyup-bot2020-02-27
|
* docs: Update schemas to reflect latest changes in templateStephen Finucane2020-02-27
| | | | | | | | Looks like I forgot to run the 'generate-schema' script beforehand. Fix that now. Signed-off-by: Stephen Finucane <stephen@that.guru> Fixes: cd3a2ce8 ("REST: Allow configuration of user settings via API")
* docs: set the GID in the .env filePranav Annam2020-02-17
| | | | | | | | | | | | | | | The .env file needs the UID and GID for a working docker-compose build. If you follow the current instructions, the docker build fails with a clear error message: 'You must define GID in .env' It is still good to update documentation to reduce the burden on new contributors to run into this build failure first. Signed-off-by: Pranav Annam <pranavannam@gmail.com> [simply provide bash command in docs, reworked commit message] Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: Daniel Axtens <dja@axtens.net>
* docs: Bump API version in docs to 1.2Stephen Finucane2019-12-27
| | | | Signed-off-by: Stephen Finucane <stephen@that.guru>
* REST: Allow configuration of user settings via APIStephen Finucane2019-12-24
| | | | | | Expose the embedded UserProfile field via the REST API. Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Add missing series index schemaMete Polat2019-12-08
| | | | | | Fixes: 7d8e24bc84bd ("docs: Start documenting API using OpenAPI") Signed-off-by: Mete Polat <metepolat2000@gmail.com> Reviewed-by: Stephen Finucane <stephen@that.guru>
* REST: Add 'actor' field to '/events' modelJohan Herland2019-12-01
| | | | | | | | Signed-off-by: Johan Herland <johan@herland.net> Reviewed-by: Stephen Finucane <stephen@that.guru> Acked-by: Daniel Axtens <dja@axtens.net> Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Closes: #73
* docs: Only include 'order' filter in '/events/' for v1.2+Stephen Finucane2019-11-30
| | | | | | | | Even though we don't actually version this thing, don't document for older versions of the API lest people using older deployments get confused. Signed-off-by: Stephen Finucane <stephen@that.guru>
* api: support filtering patches by hashDaniel Axtens2019-11-30
| | | | | | | | | | | | | | | | | This is a feature that the XML-RPC API has, and which is used in the wild [1], so support it in the REST API. I tried to version the new filter field, but it's not at all clear how to do this with django-filters. The best way I could find requires manually manipulating request.GET, which seems to defeat the point of django-filters. So document it for 1.2, and have it work on older versions as an undocumented feature. [1] https://git.kernel.org/pub/scm/linux/kernel/git/mricon/korg-helpers.git/tree/git-patchwork-bot.py?id=104e7374e1be8458e6d2e82478625a7bf8c822ff Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org> Signed-off-by: Daniel Axtens <dja@axtens.net> Acked-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
* docs: Fix note about the required Postfix rightsAli Alnubani2019-11-30
| | | | | | | | | | | | | | The permissions for the user running the postfix process are not the ones used for external file or command delivery by default. The ones defined by default_privs are (in case the aliases(5) file that is owned by root was being used). A privileged user or the postfix owner should not be used in this case. See http://www.postfix.org/postconf.5.html#default_privs and local(8). Signed-off-by: Ali Alnubani <alialnu@mellanox.com> Reviewed-by: Stephen Finucane <stephen@that.guru>
* docs: Fix link to deployment guideAli Alnubani2019-10-29
| | | | | | | | The old format redirects to a nonexistent page when there are multiple versions of the docs. Signed-off-by: Ali Alnubani <alialnu@mellanox.com> Signed-off-by: Daniel Axtens <dja@axtens.net>
* docs: bump the copyright year in the docsDaniel Axtens2019-10-18
| | | | | | | It's 2019. It's almost 2020, in fact! Signed-off-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Stephen Finucane <stephen@that.guru>
* docs: document snowpatch as an API clientDaniel Axtens2019-10-18
| | | | | | | | Snowpatch is one of the few publically visible API clients. Document it in the clients list. Signed-off-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Stephen Finucane <stephen@that.guru>
* REST: Allow creating, updating, deleting of bundlesStephen Finucane2019-10-17
| | | | | | | | | | Allow users to create a new bundle, change the name, public flag and patches of an existing bundle, and delete an existing bundle. Some small nits with existing tests are resolved. Signed-off-by: Stephen Finucane <stephen@that.guru> Closes: #316
* Use secrets and fall back to random.SystemRandom for keysJeremy Cline2019-10-17
| | | | | | | | | | | | | | | | | | The random module uses the Mersenne Twister pseudorandom number generator and is not a cryptographically secure random number generator[0]. The secrets[1] module is intended for generating cryptographically strong random numbers, so recommend using that to generate the secret key. It's new in Python 3, so if it's unavailable fall back to using the ``os.urandom()`` backed implementation of random. NOTE(stephenfin): Modified to include change to 'config.yaml'. Also renamed reno to just stick with hyphens for filenames. [0] https://docs.python.org/3/library/random.html [1] https://docs.python.org/3/library/secrets.html Signed-off-by: Jeremy Cline <jcline@redhat.com> Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Rename and make 'generate_schema' executableStephen Finucane2019-10-05
| | | | | | A small Python 3 issue is resolved. Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Add documentation for pre-commitStephen Finucane2019-09-27
| | | | | | Explain what it is and why you should use it. Signed-off-by: Stephen Finucane <stephen@that.guru>
* Update sphinxcontrib-openapi from 0.4.0 to 0.5.0pyup-bot2019-09-09
|
* docs: Use '>=' in OpenAPI schema templateStephen Finucane2019-09-09
| | | | | | | This is consistent with how we're doing checks for v1.2 and reads a little better, IMO. Signed-off-by: Stephen Finucane <stephen@that.guru>
* Drop support for Python 3.4, add Python 3.7Stephen Finucane2019-09-08
| | | | | | | It's no longer supported upstream and the *second* last Ubuntu LTS release provides something newer. Time to move on. Signed-off-by: Stephen Finucane <stephen@that.guru>