Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: document jobconfig file #56

Open
wants to merge 32 commits into
base: master
Choose a base branch
from

Conversation

sbliven
Copy link
Member

@sbliven sbliven commented Oct 14, 2024

Add documentation for jobconfig.json file

Update .gitignore
- Remove trailing spaces
- Wrap long lines
- A couple minor markdown syntax fixes
@sbliven sbliven self-assigned this Oct 14, 2024
@sbliven
Copy link
Member Author

sbliven commented Oct 21, 2024

#56

Documents scicat-backend-next#1463
@sbliven sbliven marked this pull request as draft October 29, 2024 14:10
- Document ValidateAction changes (#1473)
- Convert examples to YAML (#1463)
Comment on lines 297 to 322
- RABBITMQ\_ENABLED:
Flag to enable/disable RabbitMQ consumer.
accepted values: "yes", "no"
_deprecated_. Will be removed in future releases.
_default_: no
_format_: string

- RABBITMQ\_HOSTNAME:
The hostname of the RabbitMQ message broker. Only required if RabbitMQ is enabled.
_deprecated_. Will be removed in future releases.
_default_: no default
_default_: string

- RABBITMQ\_USERNAME:
The username used to authenticate to the RabbitMQ message broker. Only required if
RabbitMQ is enabled.
_deprecated_. Will be removed in future releases.
_default_: no default
_format_: string

- RABBITMQ\_PASSWORD:
The password used to authenticate to the RabbitMQ message broker. Only required if
RabbitMQ is enabled.
_deprecated_. Will be removed in future releases.
_default_: no default
_format_: string
Copy link
Member

Choose a reason for hiding this comment

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

Why are these marked as deprecated?

@@ -280,7 +280,7 @@ before running the backend. A basic rabbitMQ set up in the component-config.loca

```
The exchange and the binding key must be named `jobs.write` and `jobqueue` respectively, the queue name can take any value.
The backend expects and exchange called `jobs.write` to publish jobs messages to bound with that key.
The backend expects an exchange called `jobs.write` to publish jobs messages to bound with that key.
Copy link
Member

Choose a reason for hiding this comment

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

Is the Connecting Scicat to RabbitMQ section still needed?

sbliven added a commit to SciCatProject/scicat-backend-next that referenced this pull request Feb 26, 2025
## Description
Allows jobs to validate properties of the dataset.

## Motivation
The `validate` action currently allows operators to enforce attributes
of the DTO.

However, many jobs depend on `jobParams.datasetLists` to link a job to
certain datasets. This allows validation of properties on datasets
associated with the dataset.

The motivating example would be checking datasetLifecycle properties for
certain jobs. These are currently hard-coded for special job types. This
would allow them to be applied to custom job types as well.

```
configVersion: v1.0
jobs:
  - jobType: custom_archive
    create:
      auth: "#datasetAccess"
      actions:
        - actionType: validate
          datasets:
            datasetlifecycle.archivable:
              const: true
```

## Changes:

* Add `datasets` property to validate actions (only in `create`
operations) to validate linked dataset properties

## Tests included

(WIP pending tests and documentation)

- [x] Included for each change/fix?
- [x] Passing? <!-- Merge will not be approved unless tests pass -->

## Documentation
- [x] swagger documentation updated (required for API changes)
- [x] official documentation updated

### official documentation info
Docs are included in
SciCatProject/documentation#56
@sbliven sbliven changed the title [WIP] Document jobconfig file feat: document jobconfig file Mar 4, 2025
@sbliven sbliven marked this pull request as ready for review March 4, 2025 16:13
@sbliven
Copy link
Member Author

sbliven commented Mar 4, 2025

For those wanting to read the rendered doc pages, I suggest starting with job configuration, authorization and testing


#### Validate

The `validate` action is used to check validate requests to the job endpoints. It is
Copy link
Member

Choose a reason for hiding this comment

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

Is this sentence correct? Should it be check and validate or just to validate requests perhaps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready
Development

Successfully merging this pull request may close these issues.

4 participants