Skip to content

Commit

Permalink
Preventing concurrent deployments against an environment [#256] - see [
Browse files Browse the repository at this point in the history
…#111] also
  • Loading branch information
shantstepanian committed Dec 4, 2019
1 parent 6afff86 commit f3035a0
Show file tree
Hide file tree
Showing 21 changed files with 1,508 additions and 1,041 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
## 8.0.0

### Functionality Improvements
#111: Preventing concurrent deploys against a given schema


### Technical Improvements
Upgrading to JDK 8 bytecode

Upgrading to JGraphT 1.3.0 (first required JDK 8 dependency)

### Bug Fixes
Expand All @@ -16,14 +19,20 @@ Correcting error messages on graph cycles for complex databases

### Functionality Improvements
#239: MongoDB productionization: collection now treated as an incremental change type, reverse-engineering support, clean functionality built

#231 #233: Correct reverse-engineering of table indices to their correct tables

#232 #233: Support reverse-engineering of triggers

#231 #235: Removing redundant unique indexes for Oracle Primary Key reverse-engineering

#236: Support Character Set Encoding for Oracle Reverse Engineering

Allowing valid special characters (e.g. #) to be in object names, as certain RDBMS platforms also allow them

### Technical Improvements
DB2 build updated to use the new Docker Hub coordinates from IBM

#252: Optimize Images 610.60kb -> 448.30kb (26.58%) and fix typo

### Bug Fixes
Expand All @@ -34,7 +43,9 @@ DB2 build updated to use the new Docker Hub coordinates from IBM

### Functionality Improvements
#182: Adding Hibernate reverse-engineering API. See [ORM Integration docs](https://goldmansachs.github.io/obevo/orm-integration.html) for more details.

#221 #223 #225: Oracle reverse-engineering improvements - unicode characters, nested tables, types, comments

#228: PostgreSQL improvements for kata - reverse-engineering, in-memory databases

### Technical Improvements
Expand All @@ -53,20 +64,26 @@ DB2 build updated to use the new Docker Hub coordinates from IBM

### Bug Fixes
#212: Fixing inability to handle DB2 reorg exceptions during static data queries. Previously, reorg detection only worked on update statements

#210 #213: Oracle - ignoring DATABASE LINKs during reverse-engineering, instead of erroring out. Separate ticket #186 is there for DATABASE LINK and materialized view support


## 7.0.0 and 7.0.1 (same release; had to redo it due to Maven SDLC issues)

### Functionality Improvements
#199: Adding support for PostgreSQL roles and extensions in the environment setup step

#202: Add option to export graph representation to a file

#196: Adding UUID support for CSV data loads for PostgreSQL

Initial MySQL support (still in Alpha)

### Technical Improvements
Moving more of the code over to Kotlin

#153: Refactor of dependency implementation

#193: Docker onboarding for testing

### Bug Fixes
Expand All @@ -82,6 +99,7 @@ Moving more of the code over to Kotlin

### Bug Fixes
#188: Correcting the metadata retrieval for ASE and PostgreSQL

#184: Documentation cleanups


Expand All @@ -92,13 +110,18 @@ Moving more of the code over to Kotlin

### Technical Improvements
#173: Support YAML/JSON configurations and move away from type safe config towards commons-config v2

#175: Removing retrolambda, moving back to Java 7, and initial support for Kotlin

#150: Documentation updates

### Bug Fixes
#125: Clarify error messages when reading merge config file (missing input dirs, forward-slashes specified)

#165: Supporting Unicode in regular table/db object files and avoiding "TokenMgrError: Lexical error at line ..." issues

#169: Fixing missing quotes in deploy.sh/bat files in obevo-cli; otherwise, spaces in JAVA_HOME or OBEVO_HOME were not supported.

#166: Clearer error message if an invalid platform type is specified in config


Expand Down
36 changes: 36 additions & 0 deletions obevo-core/src/main/java/com/gs/obevo/api/platform/AuditLock.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* Copyright 2017 Goldman Sachs.
* 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.gs.obevo.api.platform;

import com.gs.obevo.api.appdata.PhysicalSchema;

/**
* Component to ensure that only a single client can invoke a deploy on an Obevo environment.
* This component is mainly called from MainDeployer.
* As of today, the lock is environment wide (i.e. not per {@link PhysicalSchema}); this may be refactored in the future.
*/
public interface AuditLock {
/**
* Acquire a lock on the environment.
*/
void lock();

/**
* Release the lock on the environment. Okay to throw exceptions here, as MainDeployer will handle
* and ignore exceptions when calling this.
*/
void unlock();
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.gs.obevo.api.appdata.Change;
import com.gs.obevo.api.appdata.DeployExecution;
import org.eclipse.collections.api.list.ImmutableList;
import org.jetbrains.annotations.NotNull;

/**
* Interface to access the audit table for a given environment.
Expand Down Expand Up @@ -66,4 +67,6 @@ public interface ChangeAuditDao {
* Removes all changes related to the incoming changed object based on the {@link Change#getObjectKey()}.
*/
void deleteObjectChanges(Change change);

@NotNull AuditLock acquireLock();
}
Loading

0 comments on commit f3035a0

Please sign in to comment.