Skip to content

Redefines experiamental RPCAPI batch_status#1304

Merged
matsduf merged 6 commits into
zonemaster:developfrom
matsduf:update-rpcapi
May 28, 2025
Merged

Redefines experiamental RPCAPI batch_status#1304
matsduf merged 6 commits into
zonemaster:developfrom
matsduf:update-rpcapi

Conversation

@matsduf

@matsduf matsduf commented Oct 30, 2024

Copy link
Copy Markdown
Contributor

Purpose

Current get_batch_job_result is not optimal for repeated checking the status of a large batch since always included the test ID of finished tests. This PR redefines experimental batch_status which is only an alias for get_batch_job_result. With the new definition the response is by default minimal and only including the numbers.

This is a document change only. When this has been reviewed it will also be implemented in Zonemaster-Backend.

Context

zonemaster/zonemaster-backend/issues/960

zonemaster/zonemaster-backend#1215 (implementation)

How to test this PR

Review.

@matsduf matsduf added the A-Documentation Area: Documentation only. label Oct 30, 2024
@matsduf matsduf added this to the v2024.2 milestone Oct 30, 2024
@mattias-p

Copy link
Copy Markdown
Member

Looks great. It would be nice if we could also use the terminology from zonemaster/zonemaster-backend#960 to the extent that it's not too much trouble.

mattias-p
mattias-p previously approved these changes Nov 4, 2024

@mattias-p mattias-p left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I had a closer look at this. Nothing is wrong but I have a few suggestions on how it could be improved. Ultimately I think this is update fills an important gap in the API.

Comment thread docs/public/using/backend/rpcapi-reference.md Outdated
Comment thread docs/public/using/backend/rpcapi-reference.md Outdated
Comment thread docs/public/using/backend/rpcapi-reference.md Outdated
Comment thread docs/public/using/backend/rpcapi-reference.md Outdated
Comment thread docs/public/using/backend/rpcapi-reference.md
@matsduf matsduf modified the milestones: v2024.2, v2025.1 Nov 6, 2024
marc-vanderwal
marc-vanderwal previously approved these changes Nov 7, 2024

@marc-vanderwal marc-vanderwal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good.

I suggest that we address that comment about the type of the batch_id parameter in a different PR. I’ll handle that.

Never mind, the documentation already states: “When a method expects an integer arguments (sic), numbers encoded in strings are also accepted and used transparently, and numbers with fractions are rounded to the nearest integer.”

* [API method: add_batch_job](#api-method-add_batch_job)
* [API method: get_batch_job_result](#api-method-get_batch_job_result)
* [API method: get_test_params](#api-method-get_test_params)
* [API method: batch_status](#api-method-batch_status)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not get_batch_status instead? To be consistent with (most) other methods.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I decided to reuse the already defined name batch_status. It is there, but experimental. I felt that we had already decided on those names.

At the end of the current version of the document you find

## Experimental API methods

There are also some experimental API methods documented only by name:

* system_versions
* conf_profiles
* conf_languages
* lookup_address_records
* lookup_delegation_data
* job_create
* job_status
* job_results
* job_params
* domain_history
* user_create
* batch_create
* batch_status

mattias-p
mattias-p previously approved these changes Nov 7, 2024

@mattias-p mattias-p left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good to me.

It seems I forgot to mention a couple of minor nits in my last review, so I'm adding them here. Sorry about that. But I don't want to stall this PR so I'm approving anyways.

Comment thread docs/public/using/backend/rpcapi-reference.md Outdated
Comment thread docs/public/using/backend/rpcapi-reference.md Outdated
Co-authored-by: Mattias Päivärinta <mattias@paivarinta.se>
@matsduf matsduf dismissed stale reviews from mattias-p and marc-vanderwal via 73ac0c6 November 11, 2024 15:34
mattias-p
mattias-p previously approved these changes Nov 11, 2024
marc-vanderwal
marc-vanderwal previously approved these changes May 7, 2025
matsduf added a commit to matsduf/zonemaster-backend that referenced this pull request May 12, 2025
* Makes API get_batch_job_result documented as deprecated. See PR
  zonemaster/zonemaster#1304
* Redefines API batch_status. See the same PR.

zmb() is updated to be able to use the updated batch_status().
* Clarifies JSON examples
* Corrects that empty lists of test IDs are never included in
  a response.
* Clarifies that empty lists of test IDs are never included in
  responses.
* No change of logic.
@matsduf matsduf dismissed stale reviews from marc-vanderwal and mattias-p via 942b439 May 12, 2025 17:00
@matsduf

matsduf commented May 12, 2025

Copy link
Copy Markdown
Contributor Author
  • Clarifies JSON examples
  • Corrects that empty lists of test IDs are never included in
    a response.
  • Clarifies that empty lists of test IDs are never included in
    responses.
  • No change of logic.

@matsduf

matsduf commented May 20, 2025

Copy link
Copy Markdown
Contributor Author

@mattias-p, please re-review.

@matsduf matsduf merged commit 5cb0ca8 into zonemaster:develop May 28, 2025
@matsduf matsduf deleted the update-rpcapi branch May 28, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Documentation Area: Documentation only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants