Skip to content

Commit

Permalink
Updated based on code review.
Browse files Browse the repository at this point in the history
* Guard adding incrementer to the job with the isUuiIdInstanceEnabled
* Set uuideInstanceEnabled to true by default since it is now the default incrementer
  • Loading branch information
cppwfs committed Oct 22, 2024
1 parent 49f4183 commit 7c50c0a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ public Job getObject() throws Exception {
.start(createFlow())
.end())
.end();
builder.incrementer(new UuidIncrementer());
if(this.composedTaskProperties.isUuidInstanceEnabled()) {
builder.incrementer(new UuidIncrementer());
}
return builder.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ public class ComposedTaskProperties {
/**
* Allows a single ComposedTaskRunner instance to be re-executed without
* changing the parameters. It does this by applying a {@code run.id} with a UUid.
* Default is false.
* Default is true.
* Set this option to `true` when running multiple instances of the same composed task definition at the same time.
*/
private boolean uuidInstanceEnabled = false;
private boolean uuidInstanceEnabled = true;

/**
* The platform property that will be used for each task in the workflow when it is launched.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void gettersAndSetters() throws URISyntaxException{
assertThat(properties.getDataflowServerPassword()).isEqualTo("bar");
assertThat(properties.getDataflowServerAccessToken()).isEqualTo("foobar");
assertThat(properties.isSkipTlsCertificateVerification()).isTrue();
assertThat(properties.isUuidInstanceEnabled()).isFalse();
assertThat(properties.isUuidInstanceEnabled()).isTrue();
properties.setUuidInstanceEnabled(true);
assertThat(properties.isUuidInstanceEnabled()).isTrue();
}
Expand Down

0 comments on commit 7c50c0a

Please sign in to comment.