Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
58e52f0
SED-4429 initial draft of mapping fragments to plans
cmisev Feb 6, 2026
d14ca08
Merge branch 'master' into SED-4429-step-ap-ide
cmisev Feb 12, 2026
fbad6b5
SED-4429 fix: remove unused dependencies, gemini code review inputs
cmisev Feb 12, 2026
0a7306a
SED-4429 fix: dependencies
cmisev Feb 12, 2026
12349f4
Merge branch 'master' into SED-4429-step-ap-ide
cmisev Feb 12, 2026
7911b28
SED-4539 basic plan add, remove, modify
cmisev Mar 13, 2026
99c2105
SED-4539 refactor additional field handling
cmisev Mar 13, 2026
364d3b4
SED-4539 simplify Fragment structure
cmisev Mar 13, 2026
9ee49db
Merge branch 'master' into SED-4539-automation-package-collection-and…
cmisev Mar 13, 2026
b9ace31
SED-4539 cleaner string manipulations
cmisev Mar 17, 2026
6b3ad60
SED-4539 generic PatchableYamlArtefactDeserializer
cmisev Mar 19, 2026
289beaa
Merge branch 'master' into SED-4539-automation-package-collection-and…
cmisev Mar 19, 2026
177b99d
SED-4539 fix trivial review issues
cmisev Mar 19, 2026
9caa1f5
SED-4539 fix trivial review issues
cmisev Mar 19, 2026
12b840a
SED-4539 remove unnecessary serializationregistryaware
cmisev Mar 19, 2026
3b47d4c
SED-4539 Exception handling
cmisev Mar 20, 2026
a0507b4
SED-4539 Exception handling
cmisev Mar 20, 2026
5a19c9b
Merge branch 'master' into SED-4539-automation-package-collection-and…
cmisev Mar 20, 2026
3169fc0
SED-4539 Define Collections as Patchable
cmisev Mar 20, 2026
9db55ab
SED-4539 Define Collections as Patchable
cmisev Mar 20, 2026
c07d009
Merge branch 'master' into SED-4539-automation-package-collection-and…
cmisev Mar 24, 2026
26ca44e
Merge branch 'master' into SED-4539-automation-package-collection-and…
cmisev Apr 2, 2026
e3200c3
SED-4539 WIP Refactor
cmisev Apr 10, 2026
1d0de2c
SED-4539 refactor: introduce PatchingContext
cmisev Apr 13, 2026
fbaf665
Merge branch 'master' into SED-4539-automation-package-collection-and…
cmisev Apr 13, 2026
d007114
SED-4539 fix: unit tests
cmisev Apr 13, 2026
1a591b3
SED-4539 feat: extend patchable to additionalFields
cmisev Apr 13, 2026
dc93ae4
SED-4539 remove superfluous location aware tree parser
cmisev Apr 13, 2026
62b6f6e
SED-4539 fix review comments
cmisev Apr 16, 2026
6fda7fe
Merge branch 'master' into SED-4539-automation-package-collection-and…
cmisev Apr 16, 2026
7fcd655
SED-4539 modify parameters
cmisev Apr 20, 2026
2893c14
Merge branch 'master' into SED-4539-automation-package-collection-and…
cmisev Apr 20, 2026
e6e9c0a
SED-4539 plan format fixes, re-read ap in test, function reading
cmisev May 4, 2026
210507a
Merge remote-tracking branch 'origin/SED-4539-automation-package-coll…
cmisev May 4, 2026
7949029
SED-4539 consistency check for added parameters
cmisev May 4, 2026
5449983
SED-4539 improved error message
cmisev May 4, 2026
0562593
SED-4539 keyword loading and WIP on composite keyword loading
cmisev May 4, 2026
76aefd7
SED-4539 Fix getCollection idempotence
cl-exense May 5, 2026
f2f8efc
SED-4539 fix parameter editing
cmisev May 6, 2026
75751c4
Merge remote-tracking branch 'origin/SED-4539-automation-package-coll…
cmisev May 6, 2026
9b25e37
SED-4539 improve parameter editing unit test
cmisev May 6, 2026
72affeb
SED-4678 refactor test classes/resources layout, rename module (#640)
cl-exense May 9, 2026
dc2884b
Merge remote-tracking branch 'origin/master' into SED-4539-automation…
cl-exense May 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions step-automation-packages/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@
<module>step-automation-packages-manager</module>
<module>step-automation-packages-client</module>
<module>step-automation-packages-controller</module>
<module>step-automation-packages-collections</module>
</modules>

<properties>
</properties>

</project>

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ch.exense.step</groupId>
<artifactId>step-automation-packages</artifactId>
<version>0.0.0-SNAPSHOT</version>
</parent>

<artifactId>step-automation-packages-collections</artifactId>

<dependencies>
<dependency>
<groupId>ch.exense.step</groupId>
<artifactId>step-plans-base-artefacts</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ch.exense.step</groupId>
<artifactId>step-automation-packages-yaml</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.exense.step</groupId>
<artifactId>step-plans-core</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.exense.step</groupId>
<artifactId>step-functions-plugins-jmeter-def</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't checked it, but is this one actually required?

<groupId>ch.exense.step</groupId>
<artifactId>step-functions-plugins-node-def</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.exense.step</groupId>
<artifactId>step-automation-packages-controller</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*******************************************************************************
* Copyright (C) 2026, exense GmbH
*
* This file is part of STEP
*
* STEP is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* STEP is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with STEP. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
package step.core.collections;

import step.automation.packages.yaml.AutomationPackageYamlFragmentManager;
import step.core.collections.inmemory.InMemoryCollectionFactory;
import step.core.plans.Plan;
import step.functions.Function;
import step.parameter.Parameter;

import java.io.IOException;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;

public class AutomationPackageCollectionFactory implements CollectionFactory {

private final InMemoryCollectionFactory baseFactory;
private final AutomationPackageYamlFragmentManager fragmentManager;
private final Map<String, Collection<?>> collectionsByName = new ConcurrentHashMap<>();

public AutomationPackageCollectionFactory(Properties properties, AutomationPackageYamlFragmentManager fragmentManager) {
this.fragmentManager = fragmentManager;
this.baseFactory = new InMemoryCollectionFactory(properties);
}

@Override
@SuppressWarnings("unchecked")
public <T> Collection<T> getCollection(String name, Class<T> entityClass) {
return (Collection<T>) collectionsByName.computeIfAbsent(name, (_name) -> {
if (Plan.class.isAssignableFrom(entityClass)) {
return new AutomationPackagePlanCollection(fragmentManager);
} else if (Parameter.class.isAssignableFrom(entityClass)) {
return new AutomationPackageParameterCollection(fragmentManager);
} else if (Function.class.isAssignableFrom(entityClass)) {
return new AutomationPackageFunctionCollection(fragmentManager);
}
return baseFactory.getCollection(name, entityClass);
});
}

@SuppressWarnings("rawtypes")
@Override
public Collection<EntityVersion> getVersionedCollection(String name) {
// TODO: I'm pretty sure the previous implementation was incorrect.
// Fix this once we need it and know what the correct implementation is.
throw new UnsupportedOperationException();
}

@Override
public void close() throws IOException {
baseFactory.close();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*******************************************************************************
* Copyright (C) 2026, exense GmbH
*
* This file is part of STEP
*
* STEP is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* STEP is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with STEP. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
package step.core.collections;

import step.automation.packages.model.YamlAutomationPackageKeyword;
import step.automation.packages.yaml.AutomationPackageYamlFragmentManager;
import step.core.collections.inmemory.InMemoryCollection;
import step.functions.Function;

public class AutomationPackageFunctionCollection extends InMemoryCollection<Function> implements Collection<Function> {


private final AutomationPackageYamlFragmentManager fragmentManager;

public AutomationPackageFunctionCollection(AutomationPackageYamlFragmentManager fragmentManager) {
super(true, YamlAutomationPackageKeyword.KEYWORDS_ENTITY_NAME);
this.fragmentManager = fragmentManager;
initialzeRecordsFromFragments(fragmentManager);
}

private void initialzeRecordsFromFragments(AutomationPackageYamlFragmentManager fragmentManager) {
// initialization into the collection memory. Calls super save to avoid calling fragmentManager.savePlan
fragmentManager.getBusinessObjects(Function.class).forEach(super::save);
}

@Override
public Function save(Function p){
return super.save(fragmentManager.saveFunction(p));
}

@Override
public void save(Iterable<Function> iterable) {
for (Function p : iterable) {
save(p);
}
}

@Override
public void remove(Filter filter) {
find(filter, null, null, null, 0).forEach(fragmentManager::removeFunction);
super.remove(filter);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*******************************************************************************
* Copyright (C) 2026, exense GmbH
*
* This file is part of STEP
*
* STEP is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* STEP is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with STEP. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
package step.core.collections;

import step.automation.packages.yaml.AutomationPackageYamlFragmentManager;
import step.core.collections.inmemory.InMemoryCollection;
import step.parameter.Parameter;
import step.parameter.automation.AutomationPackageParameter;

public class AutomationPackageParameterCollection extends InMemoryCollection<Parameter> implements Collection<Parameter> {


private final AutomationPackageYamlFragmentManager fragmentManager;

public AutomationPackageParameterCollection(AutomationPackageYamlFragmentManager fragmentManager) {
super(true, Parameter.ENTITY_NAME);
this.fragmentManager = fragmentManager;
initialzeRecordsFromFragments(fragmentManager);
}

private void initialzeRecordsFromFragments(AutomationPackageYamlFragmentManager fragmentManager) {
// initialization into the collection memory. Calls super save to avoid calling fragmentManager.savePlan
fragmentManager.getBusinessObjects(Parameter.class).forEach(super::save);
}

@Override
public Parameter save(Parameter parameter){
return super.save(fragmentManager.saveAdditionalFieldObject(parameter, context -> AutomationPackageParameter.forContext(context, parameter), Parameter.ENTITY_NAME));
}

@Override
public void save(Iterable<Parameter> iterable) {
for (Parameter p : iterable) {
save(p);
}
}

@Override
public void remove(Filter filter) {
find(filter, null, null, null, 0).forEach(parameter ->
fragmentManager.removeAdditionalFieldObject(parameter, Parameter.ENTITY_NAME)
);
super.remove(filter);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*******************************************************************************
* Copyright (C) 2026, exense GmbH
*
* This file is part of STEP
*
* STEP is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* STEP is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with STEP. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
package step.core.collections;

import step.automation.packages.yaml.AutomationPackageYamlFragmentManager;
import step.core.collections.inmemory.InMemoryCollection;
import step.core.plans.Plan;
import step.plans.parser.yaml.YamlPlan;

public class AutomationPackagePlanCollection extends InMemoryCollection<Plan> implements Collection<Plan> {


private final AutomationPackageYamlFragmentManager fragmentManager;

public AutomationPackagePlanCollection(AutomationPackageYamlFragmentManager fragmentManager) {
super(true, YamlPlan.PLANS_ENTITY_NAME);
this.fragmentManager = fragmentManager;
initialzeRecordsFromFragments(fragmentManager);
}

private void initialzeRecordsFromFragments(AutomationPackageYamlFragmentManager fragmentManager) {
// initialization into the collection memory. Calls super save to avoid calling fragmentManager.savePlan
fragmentManager.getBusinessObjects(Plan.class).forEach(super::save);
}

@Override
public Plan save(Plan p){
return super.save(fragmentManager.savePlan(p));
}

@Override
public void save(Iterable<Plan> iterable) {
for (Plan p : iterable) {
save(p);
}
}

@Override
public void remove(Filter filter) {
find(filter, null, null, null, 0).forEach(fragmentManager::removePlan);
super.remove(filter);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package step.core.collections;

import org.junit.Assert;
import org.junit.Test;
import step.core.plans.Plan;
import step.plans.parser.yaml.YamlPlan;

import java.util.Properties;

public class AutomationPackageCollectionFactoryTest extends AutomationPackageCollectionTestBase {

@Test
public void testCollectionIdempotence() {
AutomationPackageCollectionFactory cf = new AutomationPackageCollectionFactory(new Properties(), fragmentManager);
Collection<Plan> c1 = cf.getCollection(YamlPlan.PLANS_ENTITY_NAME, Plan.class);
Assert.assertTrue(c1.estimatedCount() > 0); // just for good measure
Collection<Plan> c2 = cf.getCollection(YamlPlan.PLANS_ENTITY_NAME, Plan.class);
Assert.assertSame(c1, c2);
}
}
Loading