Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 03a24eb

Browse files
author
john-otoole
committed
Merge remote-tracking branch 'upstream/develop' into documentation-fixes-part3
2 parents 4cf6e92 + 97cd689 commit 03a24eb

158 files changed

Lines changed: 3797 additions & 3935 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ env:
4646
- DOCKHER_HUB_REPO="${DOCKER_BASE_TAG:-$UT3_DOCKER_REPO}"
4747
#utPLSQL released version directory
4848
- UTPLSQL_DIR="utPLSQL_latest_release"
49-
- UTPLSQL_CLI_FILE="utPLSQL-cli-develop-test3.zip"
49+
- UTPLSQL_CLI_VERSION="3.0.4"
50+
# Maven
51+
- MAVEN_HOME=/usr/local/maven
52+
- MAVEN_CFG=$HOME/.m2
5053
matrix:
5154
- ORACLE_VERSION="${DOCKER_TAG_11G:-11g-r2-xe}" CONNECTION_STR='127.0.0.1:1521/XE' DOCKER_OPTIONS='--shm-size=1g'
5255
- ORACLE_VERSION="${DOCKER_TAG_12C:-12c-r1-se2}" CONNECTION_STR='127.0.0.1:1521/ORCLPDB1' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs"
@@ -57,6 +60,7 @@ cache:
5760
directories:
5861
- $CACHE_DIR
5962
- node_modules
63+
- $MAVEN_CFG
6064

6165
before_install:
6266
#The update_project_version is done before deployment to validate that the change of project files does not break installation
@@ -68,12 +72,14 @@ before_install:
6872
# download latest utPLSQL release
6973
#- curl -LOk $(curl --silent https://api.github.com/repos/utPLSQL/utPLSQL/releases/latest | awk '/browser_download_url/ { print $2 }' | grep ".zip" | sed 's/"//g')
7074
- git clone --depth=1 --branch=${SELFTESTING_BRANCH:-master} https://github.com/utPLSQL/utPLSQL.git $UTPLSQL_DIR
71-
# download utPLSQL-cli develop
72-
- curl -Lk -o utPLSQL-cli.zip https://bintray.com/viniciusam/utPLSQL-cli/download_file?file_path=${UTPLSQL_CLI_FILE}
75+
# download latest utPLSQL-cli release
76+
- curl -Lk -o utPLSQL-cli.zip https://github.com/utPLSQL/utPLSQL-cli/releases/download/v${UTPLSQL_CLI_VERSION}/utPLSQL-cli.zip
7377

7478
install:
7579
#- unzip utPLSQL.zip
7680
- unzip utPLSQL-cli.zip && chmod -R u+x utPLSQL-cli
81+
# Get ojdbc via maven
82+
- bash .travis/maven_cfg.sh
7783
- pip install mkdocs
7884
- bash .travis/install_sqlcl.sh
7985
- sudo mkdir -p /dev/pdbs
@@ -115,4 +121,8 @@ deploy:
115121
condition: "${TRAVIS_JOB_NUMBER} =~ \\.1$"
116122

117123
notifications:
118-
slack: utplsql:oiMuXO95TvKeAUENuDt4cPrB
124+
slack:
125+
rooms:
126+
- secure: "nemt9n2y5sVCAKqa/s7JDQ8AcM59Xu/XbH/RkMOXvPgc+KtR8lBtVD1LkvJ5BaQhqgjuDT7DNt/uisQJ7k6a2OsrVFbnkypZ1hCvntOBpJyoSpD/YL1X8a9GbGojuJcph0BX76KN21LaOVdyOfY0TSlw53XiYWS8iL5HtjpWCbIwHL1SJ8JT8mhdT4hDoUWZjcZ4s4bLH6BQm4un/bMQOmB4sDoCeg4CllJwxgkswVF7OHpOFjgPetvUp7ps8b/Rj8en6zCj9drb0SVbXFgumo2Wd1bC3HHZB8MAZU0kuEV5VgUdum6EelUL5yfB72hssNQA0+CaT3HjBFkTlqWYJmjC4/xyGN3sseiW82T9FDY0g0GAGayNRW+QSiTQ1hbJEcAnNe0GrBUdRsgXdI6COd76YP5VxzRSF6H7niLfgCZdKbIivKUd1o+wBhuyJmqCFIkRWmT38tMGJqJAzbY1jq5gQXbb6E7gt+KdTjlSjcnJYf7XI7zqm+BRr+fbA0ixfXHvfqOBgZN6g08y9nPlDnIjtSF2NSdrj2zqYQAtKuWSOD1bnTyfDJyrtK7OLffZcMYD5Bcss4c8op8tP7MGTjt1S046SJocboh6H4c/nTokpoMRsWs6MKRdebl8C2RObGf5FebSOJg+oh2ZYS5Z/G9GshiY2BD/81+Hc4Miacc="
127+
on_success: change
128+
on_failure: always

.travis/maven_cfg.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
set -ev
3+
cp .travis/settings.xml $MAVEN_CFG/settings.xml
4+
5+
cd $(dirname $(readlink -f $0))
6+
7+
# Download wagon-http recommended by Oracle.
8+
# On maven latest version this is not needed, but travis doesn't have it.
9+
if [ ! -f $CACHE_DIR/wagon-http-2.8-shaded.jar ]; then
10+
curl -L -O "http://central.maven.org/maven2/org/apache/maven/wagon/wagon-http/2.8/wagon-http-2.8-shaded.jar"
11+
mv wagon-http-2.8-shaded.jar $CACHE_DIR/
12+
sudo cp $CACHE_DIR/wagon-http-2.8-shaded.jar $MAVEN_HOME/lib/ext/
13+
else
14+
echo "Using cached wagon-http..."
15+
sudo cp $CACHE_DIR/wagon-http-2.8-shaded.jar $MAVEN_HOME/lib/ext/
16+
fi
17+
18+
mvn dependency:copy-dependencies -DoutputDirectory=../utPLSQL-cli/lib

.travis/pom.xml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<!--Used to obtain ojdbc8 and orai18n files that are needed for client-->
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>org.utplsql</groupId>
6+
<artifactId>utplsql</artifactId>
7+
<version>3.0.4-SNAPSHOT</version>
8+
<packaging>jar</packaging>
9+
10+
<name>utPLSQL</name>
11+
<url>https://github.com/utPLSQL/utPLSQL</url>
12+
13+
<properties>
14+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
</properties>
16+
17+
<dependencies>
18+
<dependency>
19+
<groupId>com.oracle.jdbc</groupId>
20+
<artifactId>ojdbc8</artifactId>
21+
<version>12.2.0.1</version>
22+
<scope>compile</scope>
23+
</dependency>
24+
<dependency>
25+
<groupId>com.oracle.jdbc</groupId>
26+
<artifactId>orai18n</artifactId>
27+
<version>12.2.0.1</version>
28+
<scope>compile</scope>
29+
</dependency>
30+
</dependencies>
31+
32+
<repositories>
33+
<repository>
34+
<id>maven.oracle.com</id>
35+
<releases>
36+
<enabled>true</enabled>
37+
</releases>
38+
<snapshots>
39+
<enabled>false</enabled>
40+
</snapshots>
41+
<url>https://maven.oracle.com</url>
42+
<layout>default</layout>
43+
</repository>
44+
</repositories>
45+
46+
<pluginRepositories>
47+
<pluginRepository>
48+
<id>maven.oracle.com</id>
49+
<url>https://maven.oracle.com</url>
50+
</pluginRepository>
51+
</pluginRepositories>
52+
53+
<build>
54+
<extensions>
55+
<extension>
56+
<groupId>io.packagecloud.maven.wagon</groupId>
57+
<artifactId>maven-packagecloud-wagon</artifactId>
58+
<version>0.0.6</version>
59+
</extension>
60+
</extensions>
61+
</build>
62+
</project>

.travis/settings.xml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!--
4+
Licensed to the Apache Software Foundation (ASF) under one
5+
or more contributor license agreements. See the NOTICE file
6+
distributed with this work for additional information
7+
regarding copyright ownership. The ASF licenses this file
8+
to you under the Apache License, Version 2.0 (the
9+
"License"); you may not use this file except in compliance
10+
with the License. You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing,
15+
software distributed under the License is distributed on an
16+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
KIND, either express or implied. See the License for the
18+
specific language governing permissions and limitations
19+
under the License.
20+
-->
21+
22+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
23+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
25+
26+
<servers>
27+
<server>
28+
<id>maven.oracle.com</id>
29+
<username>${env.ORACLE_OTN_USER}</username>
30+
<password>${env.ORACLE_OTN_PASSWORD}</password>
31+
<configuration>
32+
<basicAuthScope>
33+
<host>ANY</host>
34+
<port>ANY</port>
35+
<realm>OAM 11g</realm>
36+
</basicAuthScope>
37+
<httpConfiguration>
38+
<all>
39+
<params>
40+
<property>
41+
<name>http.protocol.allow-circular-redirects</name>
42+
<value>%b,true</value>
43+
</property>
44+
</params>
45+
</all>
46+
</httpConfiguration>
47+
</configuration>
48+
</server>
49+
</servers>
50+
51+
</settings>

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v3.0.3
1+
v3.0.4

development/cleanup.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ drop user ${UT3_USER} cascade;
1515
begin
1616
for i in (
1717
select decode(owner,'PUBLIC','drop public synonym "','drop synonym "'||owner||'"."')|| synonym_name ||'"' drop_orphaned_synonym from dba_synonyms a
18-
where not exists (select null from dba_objects b where a.table_name=b.object_name and a.table_owner=b.owner )
19-
and a.table_owner <> 'SYS'
18+
where not exists (select 1 from dba_objects b where (a.table_name=b.object_name and a.table_owner=b.owner or b.owner='SYS' and a.table_owner=b.object_name) )
19+
and a.table_owner not in ('SYS','SYSTEM')
2020
) loop
21+
dbms_output.put_line(i.drop_orphaned_synonym);
2122
execute immediate i.drop_orphaned_synonym;
2223
end loop;
2324
end;

development/releasing.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
The release process is automated in the following way:
2-
1) With every build, the build process on Travis updates files with an appropriate version number before deployment into the database.
3-
This is to confirm that the update of versions works properly.
4-
2) When a build is executed on a branch named `release/v1.2.3-something` then additional steps are taken:
5-
- the project version in files: `sonar-project.properties`, `VERSION` is updated from the version number derived from the release branch
6-
- changes to those two files are committed and pushed - this should happen only once, when the release branch is initially created on the main repo
7-
3) To create a release, just create a tag on the code to be released. The tag name must match the regex pattern: `^v[0-9]+\.[0-9]+\.[0-9]+.*$`
8-
- When a tag build is executed, the documentation is built and files are uploaded to the tag.
9-
- The version number is derived from the tag name.
10-
4) The release version does not provide access to unversioned source files (the default zip file from GitHub is empty).
11-
The sources for release are provided in separate zip files delivered from the Travis build process.
1+
The release process is semi-automated.
2+
3+
With every build, the build process on Travis updates files with an appropriate version number before deployment into the database.
4+
This step is performed, to confirm that the update of versions works properly.
5+
6+
To create a release:
7+
- create release branch and wait for release build to complete successfully
8+
- merge release branch to master and wait for master build to complete successfully
9+
- create a release from the master branch using github web page and populate release description using information found on the issues and pull requests for release
10+
11+
The following will happen:
12+
- build executed on branch `release/v1.2.3-[something]` updates files `sonar-project.properties`, `VERSION` with project version derived from the release branch name
13+
- changes to those two files are committed and pushed back to release branch by Travis
14+
- when a release is created, a new tag is added in on the repository and a tag build is executed
15+
- the documentation for new release is published on `utplsql.github.io` and installation archives are added to the tag.
16+
17+
Note:
18+
The released version does not provide access to un-versioned source files (the default zip file from GitHub is empty).
19+
The sources for release are provided in separate zip files delivered from the Travis build process.
20+
This is because we do not keep version in our source files in develop branch.

docs/about/authors.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
| Pavel Kaplya | [Pazus](https://github.com/Pazus)
1111
| Robert Love | [rlove](https://github.com/rlove)
1212
| Vinicius Avellar | [viniciusam](https://github.com/viniciusam/)
13+
| Samuel Nitsche | [pesse](https://github.com/pesse/)
1314

1415

1516

docs/about/project-details.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
utPLSQL is open source project [hosted on GitHub](https://github.com/utPLSQL/utPLSQL).
1010

1111
Contributions, help and constructive feedback is always appreciated.
12-
If you are interested in helping please read our [guide to contributing](https://github.com/utPLSQL/utPLSQL/CONTRIBUTING.md)
12+
13+
If you are interested in helping please read our [contributing guide](https://github.com/utPLSQL/utPLSQL/blob/develop/CONTRIBUTING.md)
1314

1415

1516

docs/userguide/annotations.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,3 +214,26 @@ When processing the test suite `test_pkg` defined in [Example of annotated test
214214
rollback to savepoint 'beforeall'
215215
216216
```
217+
218+
# Annotation cache
219+
220+
utPLSQL needs to scan sources of package specifications to identify and parse annotations.
221+
To improve framework startup time, specially when dealing with database users owning large amount of packages the framework has build-in persistent cache for annotations.
222+
223+
Cache is checked for staleness and refreshed automatically on every run.
224+
The initial startup of utPLSQL for a schema will take longer than consecutive executions.
225+
226+
If you're in situation, where your database is controlled via CI/CD server and gets refreshed/wiped before each run of your tests,
227+
consider building upfront and creating the snapshot of our database after the cache was refreshed.
228+
229+
To build annotation cache without actually invoking any tests, call `ut_runner.rebuild_annotation_cache(a_object_owner, a_object_type)` sql block for every unit test owner that you want to have annotations cache prebuilt.
230+
231+
Example:
232+
```sql
233+
exec ut_runner.rebuild_annotation_cache('HR', 'PACKAGE');
234+
```
235+
236+
To purge annotations cache call:
237+
```sql
238+
exec ut_runner.purge_cache('HR', 'PACKAGE');
239+
```

0 commit comments

Comments
 (0)