-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #656 from iExecBlockchainComputing/release/8.3.0
Release/8.3.0
- Loading branch information
Showing
75 changed files
with
2,486 additions
and
1,560 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
FROM eclipse-temurin:11.0.20_8-jre-focal | ||
FROM eclipse-temurin:11.0.21_9-jre-focal | ||
|
||
ARG jar | ||
|
||
RUN test -n "$jar" | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y curl \ | ||
&& apt-get install -y --no-install-recommends curl \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN groupadd --system appuser \ | ||
&& useradd -g appuser -s /sbin/nologin -c "Docker image user" appuser | ||
|
||
WORKDIR /app | ||
COPY $jar iexec-core.jar | ||
RUN chown -R appuser:appuser /app | ||
|
||
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/iexec-core.jar"] | ||
USER appuser | ||
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "iexec-core.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
@Library('[email protected].3') _ | ||
@Library('[email protected].4') _ | ||
buildJavaProject( | ||
buildInfo: getBuildInfo(), | ||
integrationTestsEnvVars: [], | ||
shouldPublishJars: true, | ||
shouldPublishDockerImages: true, | ||
dockerfileDir: '.', | ||
buildContext: '.') | ||
shouldPublishDockerImages: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
version=8.2.3 | ||
iexecCommonVersion=8.3.0 | ||
iexecCommonsPocoVersion=3.1.0 | ||
iexecBlockchainAdapterVersion=8.2.0 | ||
iexecResultVersion=8.2.0 | ||
iexecSmsVersion=8.3.0 | ||
version=8.3.0 | ||
iexecCommonVersion=8.3.1 | ||
iexecCommonsPocoVersion=3.2.0 | ||
iexecBlockchainAdapterVersion=8.3.0 | ||
iexecResultVersion=8.3.0 | ||
iexecSmsVersion=8.4.0 | ||
|
||
nexusUser | ||
nexusPassword |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
plugins { | ||
id 'java-library' | ||
id 'io.freefair.lombok' | ||
id 'jacoco' | ||
id 'maven-publish' | ||
} | ||
|
||
dependencies { | ||
implementation "com.iexec.commons:iexec-commons-poco:$iexecCommonsPocoVersion" | ||
implementation "com.iexec.common:iexec-common:$iexecCommonVersion" | ||
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2' | ||
testRuntimeOnly("org.junit.platform:junit-platform-launcher") | ||
} | ||
|
||
java { | ||
sourceCompatibility = "11" | ||
targetCompatibility = "11" | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
|
||
tasks.withType(Test).configureEach { | ||
finalizedBy tasks.jacocoTestReport | ||
useJUnitPlatform() | ||
} | ||
|
||
// sonarqube code coverage requires jacoco XML report | ||
jacocoTestReport { | ||
reports { | ||
xml.required = true | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
from components.java | ||
} | ||
} | ||
repositories { | ||
maven { | ||
credentials { | ||
username nexusUser | ||
password nexusPassword | ||
} | ||
url = project.hasProperty("nexusUrl")? project.nexusUrl: '' | ||
} | ||
} | ||
} |
107 changes: 107 additions & 0 deletions
107
iexec-core-library/src/main/java/com/iexec/core/api/SchedulerClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
/* | ||
* Copyright 2023-2023 IEXEC BLOCKCHAIN TECH | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.iexec.core.api; | ||
|
||
import com.iexec.common.config.PublicConfiguration; | ||
import com.iexec.common.config.WorkerModel; | ||
import com.iexec.common.replicate.ComputeLogs; | ||
import com.iexec.common.replicate.ReplicateStatusUpdate; | ||
import com.iexec.common.replicate.ReplicateTaskSummary; | ||
import com.iexec.commons.poco.eip712.entity.EIP712Challenge; | ||
import com.iexec.commons.poco.notification.TaskNotification; | ||
import com.iexec.commons.poco.notification.TaskNotificationType; | ||
import com.iexec.core.logs.TaskLogsModel; | ||
import com.iexec.core.metric.PlatformMetric; | ||
import com.iexec.core.task.TaskModel; | ||
import feign.Headers; | ||
import feign.Param; | ||
import feign.RequestLine; | ||
|
||
import java.security.Signature; | ||
import java.util.List; | ||
|
||
public interface SchedulerClient { | ||
@RequestLine("GET /metrics") | ||
PlatformMetric getMetrics(); | ||
|
||
@RequestLine("GET /version") | ||
String getCoreVersion(); | ||
|
||
// region /workers | ||
@RequestLine("GET /workers/challenge?walletAddress={walletAddress}") | ||
String getChallenge(@Param("walletAddress") String walletAddress); | ||
|
||
@RequestLine("POST /workers/login?walletAddress={walletAddress}") | ||
String login(@Param("walletAddress") String walletAddress, Signature signature); | ||
|
||
@RequestLine("POST /workers/ping") | ||
@Headers("Authorization: {authorization}") | ||
String ping(@Param("authorization") String authorization); | ||
|
||
@RequestLine("POST /workers/register") | ||
@Headers("Authorization: {authorization}") | ||
void registerWorker(@Param("authorization") String authorization, WorkerModel model); | ||
|
||
@RequestLine("GET /workers/config") | ||
PublicConfiguration getPublicConfiguration(); | ||
|
||
@RequestLine("GET /workers/computing") | ||
@Headers("Authorization: {authorization}") | ||
List<String> getComputingTasks(@Param("authorization") String authorization); | ||
// endregion | ||
|
||
// region /replicates | ||
@RequestLine("GET /replicates/available?blockNumber={blockNumber}") | ||
@Headers("Authorization: {authorization}") | ||
ReplicateTaskSummary getAvailableReplicateTaskSummary( | ||
@Param("authorization") String authorization, @Param("blockNumber") long blockNumber); | ||
|
||
@RequestLine("GET /replicates/interrupted?blockNumber={blockNumber}") | ||
@Headers("Authorization: {authorization}") | ||
List<TaskNotification> getMissedTaskNotifications( | ||
@Param("authorization") String authorization, @Param("blockNumber") long blockNumber); | ||
|
||
@RequestLine("POST /replicates/{chainTaskId}/updateStatus") | ||
@Headers("Authorization: {authorization}") | ||
TaskNotificationType updateReplicateStatus( | ||
@Param("authorization") String authorization, | ||
@Param("chainTaskId") String chainTaskId, | ||
ReplicateStatusUpdate replicateStatusUpdate | ||
); | ||
// endregion | ||
|
||
// region /tasks | ||
@RequestLine("GET /tasks/{chainTaskId}") | ||
TaskModel getTask(@Param("chainTaskId") String chainTaskId); | ||
|
||
@RequestLine("GET /tasks/logs/challenge?address={address}") | ||
EIP712Challenge getTaskLogsChallenge(@Param("address") String address); | ||
|
||
@Headers("Authorization: {authorization}") | ||
@RequestLine("GET /tasks/{chainTaskId}/logs") | ||
TaskLogsModel getTaskLogs( | ||
@Param("chainTaskId") String chainTaskId, | ||
@Param("authorization") String authorization); | ||
|
||
@Headers("Authorization: {authorization}") | ||
@RequestLine("GET /tasks/{chainTaskId}/replicates/{walletAddress}/logs") | ||
ComputeLogs getComputeLogs( | ||
@Param("chainTaskId") String chainTaskId, | ||
@Param("walletAddress") String walletAddress, | ||
@Param("authorization") String authorization); | ||
// endregion | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.