Skip to content

Conversation

despadam
Copy link
Member

@despadam despadam commented May 19, 2025

Description

Updating src/jobs/interceptors/create-job-v3-mapping.interceptor.ts for improved backwards compatibility.

Motivation

#1776 (topic 2)

Fixes

Changes:

  • If username is not provided in jobParams (v3 dto) then we assign the jobs to the currently signed in user.
  • If ownerGroup is not provided in jobParams (v3 dto) then, depending on the job auth configuration:
    • For #datasetOwner we retrieve the ownerGroup of the first dataset in datasetList, since for this job config all chosen datasets should have the same ownerGroup as the job.
    • For #datasetAccess we pick the first common group of both accessGroups and ownerGroups of all chosen datasets

Tests included

  • Included for each change/fix?
  • Passing?

Documentation

  • swagger documentation updated (required for API changes)
  • official documentation updated

official documentation info

SciCatProject/documentation#74

Copy link
Member

@sbliven sbliven left a comment

Choose a reason for hiding this comment

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

I found some more edge cases that need to be fixed.

@despadam despadam requested a review from sbliven May 26, 2025 08:10
Copy link
Member

@sbliven sbliven left a comment

Choose a reason for hiding this comment

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

This looks good now. I did some manual testing and didn't see any issues.

@sbliven sbliven removed their assignment May 28, 2025
@despadam despadam merged commit 6051861 into master May 30, 2025
13 checks passed
@despadam despadam deleted the 1776-fix-v3-interceptor branch May 30, 2025 12:11
@despadam despadam mentioned this pull request Jun 3, 2025
4 tasks
github-merge-queue bot pushed a commit that referenced this pull request Jun 3, 2025
<!--
Follow semantic-release guidelines for the PR title, which is used in
the changelog.

Title should follow the format `<type>(<scope>): <subject>`, where
- Type is one of:
build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|BREAKING
CHANGE
- Scope (optional) describes the place of the change (eg a particular
milestone) and is usually omitted
- subject should be a non-capitalized one-line description in present
imperative tense and not ending with a period

See
https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines
for more details.
-->

## Description
<!-- Short description of the pull request -->
- #1954
- #1913
- #1931
- #1934

## Motivation
<!-- Background on use case, changes needed -->
- #1937
- #1776
(topic 2)
- #1927

## Fixes
<!-- Please provide a list of the issues fixed by this PR -->

## Changes:
<!-- Please provide a list of the changes implemented by this PR -->

## Tests included

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

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

### official documentation info
<!-- If you have updated the official documentation, please provide PR #
and URL of the updated pages -->
totopoloco pushed a commit that referenced this pull request Jun 16, 2025
* update ownerUser, ownerGroup logic

* fix some tests

* update tests

* tests done

* fixes after review

* last fixes

* fix lint error
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.

2 participants