Skip to content

Commit

Permalink
Merge branch 'release-1.160.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanChupin committed Aug 1, 2024
2 parents d60e1d2 + 839508d commit 2bf225c
Show file tree
Hide file tree
Showing 143 changed files with 8,313 additions and 6,252 deletions.
41 changes: 40 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,45 @@
# Changelog

## v1.159.0 (11/06/2024)
## v1.160.0 (01/08/2024)

### Features:
- [#5657](https://github.com/telstra/open-kilda/pull/5657) GUI fix for gui switch-datatable and switch-detail components [**gui**]

### Bug Fixes:
- [#5704](https://github.com/telstra/open-kilda/pull/5704) fix QR code image display issue in 2FA screen (Issue: [#5703](https://github.com/telstra/open-kilda/issues/5703)) [**gui**]

### Improvements:
- [#5696](https://github.com/telstra/open-kilda/pull/5696) [TEST]: Regular Flow: New interaction approach(switches) [**tests**]
- [#5697](https://github.com/telstra/open-kilda/pull/5697) [TEST]: 5694: Improvement: Error verification [**tests**]
- [#5698](https://github.com/telstra/open-kilda/pull/5698) [TEST]: Improvement: Flaky test: Path: toString() throws NPE [**tests**]
- [#5706](https://github.com/telstra/open-kilda/pull/5706) [TEST]: Improvement: Fix test discrepancies [**tests**]
- [#5707](https://github.com/telstra/open-kilda/pull/5707) [TEST]: Improvement: Server42: Flakiness during parallel execution [**tests**]
- [#5708](https://github.com/telstra/open-kilda/pull/5708) [TEST]: Improvement: Flaky tests(global timeout/single switchTriplet) [**tests**]
- [#5579](https://github.com/telstra/open-kilda/pull/5579) [TEST]: 5569: Y-Flow: Server42: Adding TCs [**tests**]
- [#5712](https://github.com/telstra/open-kilda/pull/5712) [TEST]: Improvement: Refactoring tests to be applicable to hardware env [**tests**]
- [#5714](https://github.com/telstra/open-kilda/pull/5714) [TEST]: Improvement: Cleanup: ISL recovering: Flaky tests [**tests**]
- [#5717](https://github.com/telstra/open-kilda/pull/5717) Add API to flush reroute for pending flow (fix response)
- [#5674](https://github.com/telstra/open-kilda/pull/5674) [TEST]: Regular Flows: MaxLatency, ThrottlingReroute, PinnedFlow specs are refactored with new approach [**tests**]
- [#5681](https://github.com/telstra/open-kilda/pull/5681) [TEST]: Regular Flows: MirrorEndpoints, IntentionalReroute, MultiReroute and FlowValidationNegative specs were refactored with new approach [**tests**]
- [#5686](https://github.com/telstra/open-kilda/pull/5686) [TEST]: Regular Flows: PartialUpdate, QinQFlow, VxlanFlow specs were refactored with new approach [**tests**]
- [#5687](https://github.com/telstra/open-kilda/pull/5687) [TEST]: Regular Flow: Autoreroute, Protected(v1/v2), Swap: New approach for flow interaction [**tests**]
- [#5688](https://github.com/telstra/open-kilda/pull/5688) [TEST]: Cleanup: Updating calls to be with autocleanup [**tests**]
- [#5690](https://github.com/telstra/open-kilda/pull/5690) [TEST]: Regular Flow: New interaction approach(additional specs) [**tests**]
- [#5692](https://github.com/telstra/open-kilda/pull/5692) [TEST]: Refactor regular flows in Switches specs: pt1: [**tests**]
- [#5693](https://github.com/telstra/open-kilda/pull/5693) [TEST]: Improvement: Y-Flow: Stats: Flaky test [**tests**]

### Other changes:
- [#5700](https://github.com/telstra/open-kilda/pull/5700) [TEST]: 5390: Fix some broken / flaky tests after refactoring [**tests**]
- [#5702](https://github.com/telstra/open-kilda/pull/5702) Flush reroute queue with stuck flow

For the complete list of changes, check out [the commit log](https://github.com/telstra/open-kilda/compare/v1.159.0...v1.160.0).

### Affected Components:
gui

---

## v1.159.0 (17/06/2024)

### Improvements:
- [#5637](https://github.com/telstra/open-kilda/pull/5637) 5560: [TEST]: Eliminate cleanup sections part 1 (Issue: [#5560](https://github.com/telstra/open-kilda/issues/5560)) [**tests**]
Expand Down
5 changes: 4 additions & 1 deletion src-gui/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/logs/
tmp/
.deps/

.angular/

# Gradle specific

Expand Down Expand Up @@ -30,6 +30,7 @@ src/main/webapp/ui/*.js
src/main/webapp/ui/*.js.map
src/main/webapp/ui/*.js.LICENSE.txt
ui/node_modules
ui/.angular
ui/package-lock.json
src/main/webapp/ui/index.html
src/main/webapp/ui/icon-*.*.png
Expand All @@ -51,6 +52,8 @@ src/main/webapp/ui/runtime.js.map
src/main/webapp/ui/scripts.js
src/main/webapp/ui/scripts.js.map
src/main/webapp/ui/styles.js
src/main/webapp/ui/styles.css
src/main/webapp/ui/assets-images-*.png
src/main/webapp/ui/styles.js.map
src/main/webapp/ui/vendor.js
src/main/webapp/ui/vendor.js.map
Expand Down
1 change: 1 addition & 0 deletions src-gui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ build/libs/${APP}.war: .deps/node .deps/resources
[ -e src/main/webapp/lib/css/bootstrap.min.css ] || wget -O src/main/webapp/lib/css/bootstrap.min.css https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css
[ -e src/main/webapp/lib/javascript/bootstrap.min.js ] || wget -O src/main/webapp/lib/javascript/bootstrap.min.js https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js
[ -e src/main/webapp/lib/javascript/jquery-3.5.1.min.js ] || wget -O src/main/webapp/lib/javascript/jquery-3.5.1.min.js https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.js
[ -e src/main/webapp/lib/javascript/qrcode.min.js ] || wget -O src/main/webapp/lib/javascript/qrcode.min.js https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js

.deps:
mkdir -p .deps
Expand Down
2 changes: 1 addition & 1 deletion src-gui/src/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
<property name="allowMissingReturnTag" value="true"/>
<property name="minLineCount" value="2"/>
<property name="allowedAnnotations"
value="Override, Bean, Test, Given, When, Then, And, Before, After, BeforeClass, AfterClass"/>
value="Override, Bean, Test, Given, When, Then, And, Before, BeforeEach, After, BeforeClass, AfterClass"/>
<property name="allowThrowsTagsForSubclasses" value="true"/>
<property name="tokens" value="METHOD_DEF,ANNOTATION_FIELD_DEF"/>
</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.openkilda.dao.repository.VersionRepository;

import com.ibatis.common.jdbc.ScriptRunner;

import org.apache.commons.collections4.CollectionUtils;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.Resource;
Expand All @@ -32,17 +32,14 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

import java.math.BigInteger;

import java.sql.Connection;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.sql.DataSource;
Expand All @@ -52,21 +49,21 @@ public class DatabaseConfigurator {

@PersistenceContext
private EntityManager entityManager;

private static final Logger LOGGER = Logger.getLogger(DatabaseConfigurator.class);

private static final String SCRIPT_FILE_PREFIX = "import-script_";
private static final String SCRIPT_FILE_SUFFIX = ".sql";
private static final String SCRIPT_LOCATION = "db";

private ResourceLoader resourceLoader;

private VersionRepository versionEntityRepository;
private final ResourceLoader resourceLoader;

private final VersionRepository versionEntityRepository;

private final DataSource dataSource;

private DataSource dataSource;

public DatabaseConfigurator(@Autowired final VersionRepository versionRepository, final DataSource dataSource,
final ResourceLoader resourceLoader, EntityManager em) {
final ResourceLoader resourceLoader, EntityManager em) {
this.versionEntityRepository = versionRepository;
this.dataSource = dataSource;
this.resourceLoader = resourceLoader;
Expand All @@ -81,16 +78,16 @@ public void init() {

private void loadInitialData() {
List<Long> versionNumberList = versionEntityRepository.findAllVersionNumber();
if (versionNumberList.size() == 0) {

if (CollectionUtils.isEmpty(versionNumberList)) {
try {

List<VersionEntity> list = new ArrayList<VersionEntity>();
List<Long> newVersionList = new ArrayList<Long>();
List<Object[]> results = entityManager.createNativeQuery("SELECT v.version_id ,"
+ "v.version_deployment_date, v.version_number FROM version v").getResultList();
for (Object[] perTestEntity :results) {

for (Object[] perTestEntity : results) {
VersionEntity versionEntity = new VersionEntity();
versionEntity.setVersionId(BigInteger.valueOf(Long.valueOf(
(perTestEntity[0].toString()))).longValue());
Expand All @@ -108,34 +105,34 @@ private void loadInitialData() {
}
InputStream inputStream = null;
try {
ClassLoader loader = getClass().getClassLoader();
ClassLoader loader = getClass().getClassLoader();
PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(loader);
Resource[] resources = resolver.getResources("classpath:" + SCRIPT_LOCATION + "/*");
List<String> dbScripts = Arrays.stream(resources)
.map(Resource::getFilename)
.collect(Collectors.toList());
ArrayList<Long> sortedList = new ArrayList<Long>();
for (String scriptFile : dbScripts) {
for (String scriptFile : dbScripts) {
String scriptFileName = scriptFile.replaceFirst("[.][^.]+$", "");
String[] scriptNumber = scriptFileName.split("_");
Long scriptVersionNumber = Long.valueOf(scriptNumber[1]);
sortedList.add(scriptVersionNumber);
}
Collections.sort(sortedList);
for (Long scriptFileNumber : sortedList) {
for (Long scriptFileNumber : sortedList) {
if (!versionNumberList.isEmpty()) {
if (!versionNumberList.contains(scriptFileNumber)) {
inputStream = resourceLoader.getResource("classpath:" + SCRIPT_LOCATION + "/"
+ SCRIPT_FILE_PREFIX + scriptFileNumber + SCRIPT_FILE_SUFFIX).getInputStream();
inputStream = resourceLoader.getResource("classpath:" + SCRIPT_LOCATION + "/"
+ SCRIPT_FILE_PREFIX + scriptFileNumber + SCRIPT_FILE_SUFFIX).getInputStream();
if (inputStream != null) {
runScript(inputStream);
} else {
break;
}
}
} else {
inputStream = resourceLoader.getResource("classpath:" + SCRIPT_LOCATION + "/"
+ SCRIPT_FILE_PREFIX + scriptFileNumber + SCRIPT_FILE_SUFFIX).getInputStream();
inputStream = resourceLoader.getResource("classpath:" + SCRIPT_LOCATION + "/"
+ SCRIPT_FILE_PREFIX + scriptFileNumber + SCRIPT_FILE_SUFFIX).getInputStream();
if (inputStream != null) {
runScript(inputStream);
} else {
Expand Down
Loading

0 comments on commit 2bf225c

Please sign in to comment.