-
Notifications
You must be signed in to change notification settings - Fork 24
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
user story #2456007: [Jenkins plugin] unit to runner keep backward compatibility #224
user story #2456007: [Jenkins plugin] unit to runner keep backward compatibility #224
Conversation
...tions-sdk/src/main/java/com/hp/octane/integrations/uft/MbtDiscoveryResultDispatcherImpl.java
Outdated
Show resolved
Hide resolved
...rations-sdk/src/main/java/com/hp/octane/integrations/uft/MbtDiscoveryResultPreparerImpl.java
Outdated
Show resolved
Hide resolved
@@ -32,4 +32,18 @@ public static boolean isUnitToRunnerRelationDefined(EntitiesService entitiesServ | |||
List<Entity> entities = entitiesService.getEntities(workspaceId, "metadata/fields", Arrays.asList(condition1, condition2), Collections.emptyList()); | |||
return !entities.isEmpty(); | |||
} | |||
|
|||
public static boolean isNewRunner(EntitiesService entitiesService, Long workspaceId, String runnerId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I see, these new 2 methods are used only to check the unit to runner experiment status. So, you can combine them to a single method since it is used in multiple locations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, one is experiment and the second should identify if it is an old runner or newly created
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
List<String> fields = new ArrayList<>(Arrays.asList(EntityConstants.MbtUnit.ID_FIELD, EntityConstants.MbtUnit.NAME_FIELD, | ||
EntityConstants.MbtUnit.DESCRIPTION_FIELD, EntityConstants.MbtUnit.REPOSITORY_PATH_FIELD)); | ||
if (bUnitToRunner) { | ||
if (unitToRunnerEnabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This a general question and sorry for its length.
What will happen in the following scenario? It is relevant to both plugin and FTE:
- A user creates a new MBT test runner (Jenkins or FTE).
- Discovery creates all the units in Octane. The units are connected to both the test runner and the scm repository
- The user deletes the test runner. As a result, the link to the test runner will be deleted but the units will still be connected to the scm repository
- Now the user creates a new test runner with the same repository as before. Will the units be linked to the ew test runner before running the discovery? If not, this flow will not update the test runner link on the old units
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, units will connect to the new runner, as in FTE
No description provided.