Skip to content

Commit

Permalink
First commit: migrating the resource identifier with the entities + t…
Browse files Browse the repository at this point in the history
…est cases

- Includes new module with:
    - Most of the model entities
    - Code-functionality of the resource identification
    - Test cases that validate the above functionality
- Necesary  changes in the pipelining code (actions) to make all pass-work
  • Loading branch information
augustocristian committed Nov 14, 2024
1 parent aaeedb7 commit dc83cd1
Show file tree
Hide file tree
Showing 32 changed files with 2,301 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
java-version: '16'
cache: 'maven'

- name: Build Annotation project
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
- uses: javiertuya/branch-snapshots-action@v1.2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
java-version: '8'
java-version: '16'
mvn-deploy-args: '-P publish-github -DskipTests=true -Dmaven.test.failure.ignore=false -U --no-transfer-progress'
delete-old-snapshots: true
min-snapshots-to-keep: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
distribution: 'temurin'
java-version: '8'
java-version: '16'
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME # env variable for username in deploy
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
Expand Down
22 changes: 19 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,29 @@
</organization>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>16</maven.compiler.source>
<maven.compiler.target>16</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<modules>
<module>retorch-annotations</module>
<module>retorch-orchestration</module>
</modules>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.16</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -71,7 +83,7 @@
<developers>
<developer>
<name>Cristian Augusto</name>
<url>http://giis.uniovi.es</url>
<url>http://www.augustocristian.es</url>
</developer>
<developer>
<name>Claudio de la Riva</name>
Expand All @@ -81,6 +93,10 @@
<name>Javier Tuya</name>
<url>http://giis.uniovi.es</url>
</developer>
<developer>
<name>Jesús Morán</name>
<url>http://giis.uniovi.es</url>
</developer>
</developers>
<licenses>
<license>
Expand Down
40 changes: 40 additions & 0 deletions retorch-orchestration/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
23 changes: 23 additions & 0 deletions retorch-orchestration/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>retorch-orchestration</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8
8 changes: 8 additions & 0 deletions retorch-orchestration/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
4 changes: 4 additions & 0 deletions retorch-orchestration/.settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
90 changes: 90 additions & 0 deletions retorch-orchestration/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.github.giis-uniovi</groupId>
<artifactId>retorch</artifactId>
<version>1.1.1-SNAPSHOT</version>
</parent>
<artifactId>retorch-orchestration</artifactId>
<packaging>jar</packaging>
<name>retorch-orchestration</name>
<description>Multimodule maven project template, module without dependencies</description>
<url>http://github.com/giis-uniovi/samples-giis-template</url>
<organization>
<name>Software Engineering Research Group (GIIS) - Universidad de Oviedo, ES</name>
<url>http://giis.uniovi.es/</url>
</organization>
<properties>
<!--Separate all dependencies by a blank line to avoid problems creating combined dependencies in dependabot.-->
<jacksonjson.version>2.18.1</jacksonjson.version>

<mockito.version>5.14.2</mockito.version>

<logback-classic.version>1.5.12</logback-classic.version>

</properties>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency><!-- This package allows to serialize the resources -->
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jacksonjson.version}</version>
</dependency>
<dependency><!-- Mockito is used to get the logs and check that the errors appear https://mvnrepository.com/artifact/org.mockito/mockito-core -->
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback-classic.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.giis-uniovi</groupId>
<artifactId>retorch-annotations</artifactId>
<version>1.1.1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>16</source>
<target>16</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"mockElasticResource": {
"hierarchyParent": [],
"replaceable": ["lightElasticResource","heavyInElasRest"],
"elasticityModel": {
"elasticityID": "elasModelmockElasticResource",
"elasticity": 50,
"elasticityCost": 0.0
},
"resourceType": "LOGICAL",
"resourceID": "mockElasticResource",
"minimalCapacities": [
{
"name": "memory",
"quantity": 0.5
},
{
"name": "processor",
"quantity": 2
}
],
"dockerImage": "someplaceholder1[IMG:]docker.someImage"
},
"heavyInElasRest": {
"hierarchyParent": [
"parentAllInelastic"
],
"replaceable": [],
"elasticityModel": {
"elasticityID": "elasModelHeavyInElasRest",
"elasticity": 1,
"elasticityCost": 50.0
},
"resourceType": "LOGICAL",
"resourceID": "heavyInElasRest",
"minimalCapacities": [
{
"name": "memory",
"quantity": 4
},
{
"name": "processor",
"quantity": 0.6
}
],
"dockerImage": "someplaceholder2[IMG:]docker.someImage"
},
"lightElasticResource": {
"hierarchyParent": [],
"replaceable": [],
"elasticityModel": {
"elasticityID": "elasModelLightElasticResource",
"elasticity": 35,
"elasticityCost": 15.0
},
"resourceType": "LOGICAL",
"resourceID": "lightElasticResource",
"minimalCapacities": [
{
"name": "memory",
"quantity": 1
},
{
"name": "processor",
"quantity": 0.5
}
],
"dockerImage": "someplaceholder3[IMG:]docker.someImage"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
agentCIName=any
sut-wait-html=<title>FullTeaching</title>
sut-location=$WORKSPACE
docker-frontend-name=https://full-teaching-
docker-frontend-port=5000
external-binded-port=
external-frontend-url=
testsBasePath=somepath/somedir/
Loading

0 comments on commit dc83cd1

Please sign in to comment.