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(sd): add process steps for sd creation #1189

Merged
merged 8 commits into from
Jan 31, 2025
Merged

Conversation

Phil91
Copy link
Member

@Phil91 Phil91 commented Nov 28, 2024

Description

  • add await response steps for the self description creation process
  • add retrigger processes for the await response steps

Why

To be able to display the current progress of the sd document recreation a await step has been added for the self description creation process

Issue

Refs: #1182

Checklist

  • I have followed the contributing guidelines
  • I have performed IP checks for added or updated 3rd party libraries
  • I have created and linked IP issues or requested their creation by a committer
  • I have performed a self-review of my own code
  • I have successfully tested my changes locally
  • I have added tests that prove my changes work
  • I have checked that new and existing tests pass locally with my changes
  • I have commented my code, particularly in hard-to-understand areas

@Phil91 Phil91 requested review from ntruchsess and evegufy November 28, 2024 12:11
@Phil91 Phil91 added this to the Release 25.03 milestone Nov 28, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
16.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@Phil91 Phil91 force-pushed the feature/1182-sd branch 2 times, most recently from 64c6989 to 25f04c3 Compare January 23, 2025 14:40
@ntruchsess ntruchsess self-assigned this Jan 30, 2025
{
con.SelfDescriptionMessage = data.Message!;
con.DateLastChanged = DateTimeOffset.UtcNow;
});
}

var processData = await connectorsRepository.GetProcessDataForConnectorId(data.ExternalId);
if (processData == null)
Copy link
Contributor

Choose a reason for hiding this comment

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

this check processData == null guarantees that the subsequent call to CreateManualProcessData will throw NorFoundException. I suspect this is not intended ;-)

}

var processData = await companyRepository.GetProcessDataForCompanyIdId(data.ExternalId);
if (processData == null)
Copy link
Contributor

Choose a reason for hiding this comment

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

same here - checking processData == null seems to be incorrect.

Copy link
Contributor

@ntruchsess ntruchsess left a comment

Choose a reason for hiding this comment

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

In my previous review I mention 2 null checks that seem to be incorrect. I've fixed those but apparently this is not covered by unit-tests. Can you please double check and add respective test-code for those null-checks?
Please be aware that I did rebase and recreate the migration.

if (context.ProcessStepTypeId.HasValue)
{
context.ProcessRepositories.GetInstance<IProcessStepRepository<TProcessTypeId, TProcessStepTypeId>>().AttachAndModifyProcessSteps(
ModifyStepStatusRange(context.ProcessSteps.Where(step => step.ProcessStepTypeId.Equals(context.ProcessStepTypeId.Value)), ProcessStepStatusId.FAILED, message));

Check warning

Code scanning / CodeQL

Dereferenced variable may be null Warning

Variable
context.ProcessStepTypeId
may be null at this access because it has a nullable type.
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
6.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@ntruchsess ntruchsess merged commit ce4aa6a into main Jan 31, 2025
10 of 11 checks passed
@ntruchsess ntruchsess deleted the feature/1182-sd branch January 31, 2025 08:14
Phil91 added a commit that referenced this pull request Jan 31, 2025
* feat(sd): add process steps for sd creation + retrigger
* update framework minor version
* add and adjust unit tests
Refs: #1182
---------
Co-authored-by: Norbert Truchsess <[email protected]>
Phil91 added a commit that referenced this pull request Jan 31, 2025
* feat(sd): add process steps for sd creation + retrigger
* update framework minor version
* add and adjust unit tests
Refs: #1182
---------
Co-authored-by: Norbert Truchsess <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: USER READY
Development

Successfully merging this pull request may close these issues.

2 participants