Skip to content

feat: document jobconfig file #56

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

Merged
merged 36 commits into from
Mar 28, 2025
Merged

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)
@@ -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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. This PR focuses on the Development section, but we should also update operator docs. I'm not sure what's happening with that section after the reorganization. Maybe we can leave it as an open issue to be improved after this PR?

Copy link
Member

Choose a reason for hiding this comment

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

Ok, I will create an issue for Operator docs for Jobs and I am leaving this part as is for now.

Copy link
Member

Choose a reason for hiding this comment

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

#64

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

@despadam despadam merged commit 86887a5 into SciCatProject:master Mar 28, 2025
@despadam despadam deleted the jobconfig branch March 28, 2025 14:38
@sbliven sbliven moved this from Ready to Done in Core Release Jobs Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants