Skip to content

Commit

Permalink
Merge branch 'master' into crioux-stripe/add-rebatch-remote-observable
Browse files Browse the repository at this point in the history
  • Loading branch information
crioux-stripe authored Jan 10, 2025
2 parents da26b36 + 9ddcd1b commit 263a0d4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @calvin681 @sundargates @Andyz26 @hmitnflx @fdc-ntflx @dtrager02
* @calvin681 @Andyz26 @hmitnflx @fdc-ntflx @dtrager02
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,11 @@ public UpdateJobClusterArtifactRequest(

this.clusterName = clusterName;
this.artifactName = artifact;
this.jobJarUrl = jobJarUrl != null ? jobJarUrl : "http://" + artifact;
// [Note] in the legacy setup this artifact field is used to host the job jar url field (it maps to the
// json property "url".
this.jobJarUrl = jobJarUrl != null ?
jobJarUrl :
(artifact.startsWith("http://") || artifact.startsWith("https://") ? artifact : "http://" + artifact);
this.version = version;
this.skipSubmit = skipSubmit;
this.user = user;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,40 @@ public void testJobClusterMigrationConfigUpdate() throws Exception {
verify(jobStoreMock, times(1)).createJobCluster(any());
}

@Test
public void testJobClusterArtifactUpdateBackCompat() throws Exception {
String clusterName = "testJobClusterArtifactUpdateBackCompat";
UpdateJobClusterArtifactRequest req = new UpdateJobClusterArtifactRequest(
clusterName,
"http://path1/artifact1-1.zip",
null,
"1",
true,
"user");
assertEquals("http://path1/artifact1-1.zip", req.getArtifactName());
assertEquals("http://path1/artifact1-1.zip", req.getjobJarUrl());

UpdateJobClusterArtifactRequest req2 = new UpdateJobClusterArtifactRequest(
clusterName,
"artifact1-1.zip",
null,
"1",
true,
"user");
assertEquals("artifact1-1.zip", req2.getArtifactName());
assertEquals("http://artifact1-1.zip", req2.getjobJarUrl());

UpdateJobClusterArtifactRequest req3 = new UpdateJobClusterArtifactRequest(
clusterName,
"https://path1/artifact1-1.zip",
null,
"1",
true,
"user");
assertEquals("https://path1/artifact1-1.zip", req3.getArtifactName());
assertEquals("https://path1/artifact1-1.zip", req3.getjobJarUrl());
}

@Test
public void testJobClusterArtifactUpdate() throws Exception {
TestKit probe = new TestKit(system);
Expand Down

0 comments on commit 263a0d4

Please sign in to comment.