Skip to content

Uniform use of job#1090

Closed
ghost wants to merge 2 commits into
developfrom
unknown repository
Closed

Uniform use of job#1090
ghost wants to merge 2 commits into
developfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Mar 13, 2023

Copy link
Copy Markdown

Purpose

The API has been updated with new methods job_* (#1054, #1083) . A test can now be referred as a job. It would then make sense to rename test_id to job_id. This PR does that for the new API methods.

Context

#1084

Changes

  • documentation (API.md)
  • tests (t/test01.t and t/lifecycle.t)
  • implementation (RPCAPI.pm, DB.pm, SQLite.pm, MySQL.pm, PostgreSQL.pm)
  • deprecate (planned removal v2024.1) test_id API documentation

How to test this PR

Unit tests should pass.

@ghost ghost added this to the v2023.1 milestone Mar 13, 2023
@ghost ghost requested review from hannaeko, marc-vanderwal, matsduf and tgreenx March 13, 2023 13:24

@matsduf matsduf 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.

What is a "job" and what is a "test"? I think it is unclear in the API document. It starts by saying "Health checks are called tests in Zonemaster lingo" so what we store in the database are those "test results" or "job results"? The job is there to run a test and that would result in a "test result". If so, "test-id" is more reasonable than "job-id". The test remains when the job has completed.

I think this should be clarified in the API document.

@ghost

ghost commented Mar 14, 2023

Copy link
Copy Markdown
Author

What is a "job" and what is a "test"?

The way I see it, a job runs some tests. The tests are the one from the specification.

@matsduf

matsduf commented Mar 15, 2023

Copy link
Copy Markdown
Contributor

What is a "job" and what is a "test"?

The way I see it, a job runs some tests. The tests are the one from the specification.

At the top of the API document it says "Health checks are called tests in Zonemaster lingo."

The user "runs a domain test" and gets the "test result"?

First we had too much "test", now it seems like we are loosing the connecting to tests.

@matsduf

matsduf commented Apr 17, 2023

Copy link
Copy Markdown
Contributor

I looked through the API document, and I do not think that "job result" is a good term. A job is run and a test result comes out. If we communicate that it is a Job Result, then it is less understandable than Test Result. But it is fine to say that a job has been created.

If you look for a test result, what should the identifier be? "Test ID" or "Job ID"? Here I think Test ID is probably easier to understand, but Job ID will work.

If the outcome of a Job is a Test Result, then the method should rather be job_outcome or test_result than job_results.

When the user runs (orders) a domain test, a Job is created and then there will be Test Result to present to the user.

@ghost

ghost commented Sep 27, 2023

Copy link
Copy Markdown
Author

Closing this PR. The renaming might happen once the new RPCAPI is stabilized.

@ghost ghost closed this Sep 27, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant