Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

remove workflow-service-sdk dependency from prebuilt-tasks #492

Merged
merged 3 commits into from
Aug 3, 2023

Conversation

anludke
Copy link
Contributor

@anludke anludke commented Aug 3, 2023

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story (FLPATH-xxxx):
Fixes #

Change type

  • New feature
  • Bug fix
  • Unit tests
  • Integration tests
  • CI
  • Documentation
  • Auto-generated SDK code

Impacted services

  • Workflow Service
  • Notification Service

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.

Comment on lines 23 to 25
import static com.redhat.parodos.tasks.project.consts.ProjectAccessRequestConstant.ACCESS_REQUEST_APPROVAL_USERNAMES;
import static com.redhat.parodos.tasks.project.consts.ProjectAccessRequestConstant.ACCESS_REQUEST_ESCALATION_USERNAME;
import static com.redhat.parodos.tasks.project.consts.ProjectAccessRequestConstant.ACCESS_REQUEST_ID;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: static import are not allowed in production code according to code style doc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to define this class here and in

I see @AllArgsConstructor and @NoArgsConstructor are missing here. Maybe we can define this class here and then use it in workflow-service (since it depends on prebuilt-tasks module).

WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@AllArgsConstructor and @NoArgsConstructor are not really needed here as we built the object only once to make the api call in the task. On the other hand, the DTOs in workflow-service are meant for the APIs within which can also evolve. I'm in favour of keeping this class in prebuilt-tasks although it's a duplicate because we can easily remove the entire task if no longer needed with no impact in the APIs in workflow-service. Another point, it's consistency. If we move it in prebuilt-tasks, others in request and response from parodos/workflow-service/src/main/java/com/redhat/parodos/project/dto/* should be moved too but there are not used in any task.

@Builder
@AllArgsConstructor
@NoArgsConstructor
public class AccessResponseDTO {
Copy link
Contributor

Choose a reason for hiding this comment

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

similar as above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same explanation above

@Builder
@AllArgsConstructor
@NoArgsConstructor
public class AccessStatusResponseDTO {
Copy link
Contributor

Choose a reason for hiding this comment

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

similar as above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same explanation above

Comment on lines -43 to -49
workflow:
url: "${WORKFLOW_SERVER_URL:http://localhost:8080}"
auth:
basic:
user: test
password: test

Copy link
Contributor

Choose a reason for hiding this comment

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

to better understand: why is this change needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's been removed actually. It was needed to create the api client with the sdk approach.

@gciavarrini
Copy link
Contributor

/lgtm

@openshift-ci
Copy link

openshift-ci bot commented Aug 3, 2023

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 4a541fd into main Aug 3, 2023
4 checks passed
@openshift-merge-robot openshift-merge-robot deleted the FLPATH-544 branch August 3, 2023 15:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants