Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge submodules #2654

Open
wants to merge 38 commits into
base: integration
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
1f96d1a
git subrepo clone [email protected]:NationalSecurityAgency/datawave-type…
ivakegg Nov 25, 2024
c5ed797
git subrepo clone [email protected]:NationalSecurityAgency/datawave-util…
ivakegg Nov 25, 2024
342deba
git subrepo clone [email protected]:NationalSecurityAgency/datawave-base…
ivakegg Nov 25, 2024
ed41c73
git subrepo clone [email protected]:NationalSecurityAgency/datawave-in-m…
ivakegg Nov 25, 2024
6f03263
git subrepo clone [email protected]:NationalSecurityAgency/datawave-metr…
ivakegg Nov 25, 2024
10f3c6c
git subrepo clone [email protected]:NationalSecurityAgency/datawave-accu…
ivakegg Nov 25, 2024
88f9ea3
git subrepo clone (merge) [email protected]:NationalSecurityAgency/dataw…
ivakegg Nov 25, 2024
5006bea
git subrepo clone (merge) [email protected]:NationalSecurityAgency/dataw…
ivakegg Nov 25, 2024
4632c3c
git subrepo clone [email protected]:NationalSecurityAgency/datawave-pare…
ivakegg Nov 25, 2024
037d4b0
git subrepo clone [email protected]:NationalSecurityAgency/datawave-serv…
ivakegg Nov 25, 2024
a4e7047
git subrepo clone (merge) [email protected]:NationalSecurityAgency/dataw…
ivakegg Nov 25, 2024
495a494
git subrepo clone (merge) [email protected]:NationalSecurityAgency/dataw…
ivakegg Nov 25, 2024
c5861a0
git subrepo clone (merge) [email protected]:NationalSecurityAgency/dataw…
ivakegg Nov 25, 2024
97d7ba1
git subrepo clone (merge) [email protected]:NationalSecurityAgency/dataw…
ivakegg Nov 25, 2024
4207b81
git subrepo clone [email protected]:NationalSecurityAgency/datawave-dict…
ivakegg Nov 25, 2024
4197425
git subrepo clone [email protected]:NationalSecurityAgency/datawave-file…
ivakegg Nov 25, 2024
a998ec6
git subrepo clone (merge) [email protected]:NationalSecurityAgency/dataw…
ivakegg Nov 25, 2024
84118fe
git subrepo clone [email protected]:NationalSecurityAgency/datawave-map-…
ivakegg Nov 25, 2024
9c4cb96
git subrepo clone (merge) [email protected]:NationalSecurityAgency/dataw…
ivakegg Nov 25, 2024
5de15ca
git subrepo clone (merge) [email protected]:NationalSecurityAgency/dataw…
ivakegg Nov 25, 2024
28f4951
git subrepo clone [email protected]:NationalSecurityAgency/datawave-quer…
ivakegg Nov 25, 2024
5b0f7db
git subrepo clone (merge) [email protected]:NationalSecurityAgency/dataw…
ivakegg Nov 25, 2024
f153b52
git subrepo clone [email protected]:NationalSecurityAgency/datawave-quer…
ivakegg Nov 25, 2024
3c95341
git subrepo clone (merge) [email protected]:NationalSecurityAgency/dataw…
ivakegg Nov 25, 2024
aeef6cc
git subrepo clone [email protected]:NationalSecurityAgency/datawave-spri…
ivakegg Nov 25, 2024
6f42aab
git subrepo clone (merge) [email protected]:NationalSecurityAgency/dataw…
ivakegg Nov 25, 2024
8ec75c0
git subrepo clone (merge) [email protected]:NationalSecurityAgency/dataw…
ivakegg Nov 25, 2024
16261fb
git subrepo clone (merge) [email protected]:NationalSecurityAgency/dataw…
ivakegg Nov 25, 2024
ea39a27
git subrepo clone (merge) [email protected]:NationalSecurityAgency/dataw…
ivakegg Nov 25, 2024
a9278cd
git subrepo clone (merge) [email protected]:NationalSecurityAgency/dataw…
ivakegg Nov 25, 2024
c868816
Updated profiles to optionally add former submodules into build/test
ivakegg Nov 25, 2024
aac3eb4
git subrepo pull core/utils/metadata-utils
ivakegg Nov 29, 2024
21470e7
Updated other readme files that mention submodules
ivakegg Nov 29, 2024
95b22f7
Merge branch 'integration' into merge-submodules
ivakegg Nov 29, 2024
f147983
Merge branch 'integration' into merge-submodules
alerman Dec 3, 2024
e8032dd
Merge remote-tracking branch 'origin/integration' into merge-submodules
ivakegg Dec 13, 2024
4bc062f
git subrepo pull core/utils/metadata-utils
ivakegg Dec 13, 2024
cde0b9c
Updated per review comments
ivakegg Dec 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 8 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
USER_NAME: ${{ secrets.USER_NAME }}
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
RUN_TESTS="mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -V -B -e -ntp "-Dstyle.color=always" -Pdev,examples,assemble,spotbugs -Dmaven.build.cache.enabled=false -Ddeploy -Ddist -T1C clean verify"
RUN_TESTS="mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -V -B -e -ntp "-Dstyle.color=always" -Pdev,examples,assemble,spotbugs -Dmaven.build.cache.enabled=false -Ddeploy -Ddist -T1C clean verify -Dutils -Dservices -Dstarters"
$RUN_TESTS \
|| { echo "***** TESTS FAILED. Attempting retry."; $RUN_TESTS; } \
|| { echo "***** TESTS FAILED. Attempting final retry."; $RUN_TESTS; }
Expand Down Expand Up @@ -110,14 +110,14 @@ jobs:
# USER_NAME: ${{ secrets.USER_NAME }}
# ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# run: |
# BUILD="mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -V -B -e -Pdev,examples,assemble,spotbugs -Dmaven.build.cache.enabled=false -DskipServices -Ddeploy -Ddist -T1C -pl "-:config-service" clean install -DskipTests"
# BUILD="mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -V -B -e -Dstarters -Dservices -Dutils -Pdev,examples,assemble,spotbugs -Dmaven.build.cache.enabled=false -DonlyServiceApis -Ddeploy -Ddist -T1C -pl "-:config-service" clean install -DskipTests"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know this is commented out, but in the before it was specifically skipping services. Why are we now not skipping services?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this is correct here. See the comment at the top of this comment block. This build was intended to build all of the starters, utilities, and service apis which is achieved with -Dstarters -Dservices -Dutils -DonlyServiceApis

# $BUILD
# - name: Run Microservice Unit Tests
# env:
# USER_NAME: ${{ secrets.USER_NAME }}
# ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# run: |
# RUN_TESTS="mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -V -B -e -Dmaven.build.cache.enabled=false verify"
# RUN_TESTS="mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -V -B -e -Dstarters -Dservices -Dutils -Dmaven.build.cache.enabled=false verify"
# cd microservices
# $RUN_TESTS \
# || { echo "***** TESTS FAILED. Attempting retry."; $RUN_TESTS; } \
Expand Down Expand Up @@ -183,13 +183,13 @@ jobs:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
# update datawave dependencies to use the latest snapshots
mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -B -V -e versions:update-properties versions:update-parent -DallowSnapshots=true -Dincludes=gov.nsa.*
mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -B -V -e -Dstarters -Dservices -Dutils versions:update-properties versions:update-parent -DallowSnapshots=true -Dincludes=gov.nsa.*

mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -B -V -e -Pcompose -Dmicroservice-docker -Dquickstart-docker -Ddeploy -Dtar -DskipTests clean install
mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -B -V -e -Dstarters -Dservices -Dutils -Pcompose -Dmicroservice-docker -Dquickstart-docker -Ddeploy -Dtar -DskipTests clean install

# free up some space so that we don't run out
docker system prune -f
mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -B -V -e -Pcompose -Dmicroservice-docker -Dquickstart-docker -Ddeploy -Dtar -DskipTests clean
mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -B -V -e -Dstarters -Dservices -Dutils -Pcompose -Dmicroservice-docker -Dquickstart-docker -Ddeploy -Dtar -DskipTests clean

cd docker
./bootstrap.sh
Expand Down Expand Up @@ -264,10 +264,10 @@ jobs:
-Durl.hadoop=https://bogus.apache.org/hadoop/common/hadoop-3.3.6/hadoop-3.3.6.tar.gz \
-Durl.maven=https://bogus.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz"

mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -B -V -e -Pcompose -Dmicroservice-docker -Dquickstart-docker -Dquickstart-maven ${DIST_URLS} -Ddeploy -Dtar -DskipTests -Dmaven.build.cache.enabled=false clean install
mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -B -V -e -Dstarters -Dservices -Dutils -Pcompose -Dmicroservice-docker -Dquickstart-docker -Dquickstart-maven ${DIST_URLS} -Ddeploy -Dtar -DskipTests -Dmaven.build.cache.enabled=false clean install
# free up some space so that we don't run out
docker system prune -f
mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -B -V -e -Pcompose -Dmicroservice-docker -Dquickstart-docker -Dquickstart-maven ${DIST_URLS} -Ddeploy -Dtar -DskipTests -Dmaven.build.cache.enabled=false clean
mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -B -V -e -Dstarters -Dservices -Dutils -Pcompose -Dmicroservice-docker -Dquickstart-docker -Dquickstart-maven ${DIST_URLS} -Ddeploy -Dtar -DskipTests -Dmaven.build.cache.enabled=false clean
cd docker
./bootstrap.sh
attempt=0
Expand Down
90 changes: 0 additions & 90 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,90 +0,0 @@
[submodule "microservices/services/authorization"]
path = microservices/services/authorization
url = [email protected]:NationalSecurityAgency/datawave-authorization-service.git
[submodule "core/in-memory-accumulo"]
path = core/in-memory-accumulo
url = [email protected]:NationalSecurityAgency/datawave-in-memory-accumulo.git
[submodule "core/utils/accumulo-utils"]
path = core/utils/accumulo-utils
url = [email protected]:NationalSecurityAgency/datawave-accumulo-utils.git
[submodule "core/utils/common-utils"]
path = core/utils/common-utils
url = [email protected]:NationalSecurityAgency/datawave-common-utils.git
[submodule "core/base-rest-responses"]
path = core/base-rest-responses
url = [email protected]:NationalSecurityAgency/datawave-base-rest-responses.git
[submodule "core/utils/type-utils"]
path = core/utils/type-utils
url = [email protected]:NationalSecurityAgency/datawave-type-utils.git
[submodule "core/utils/metadata-utils"]
path = core/utils/metadata-utils
url = [email protected]:NationalSecurityAgency/datawave-metadata-utils.git
[submodule "microservices/services/accumulo"]
path = microservices/services/accumulo
url = [email protected]:NationalSecurityAgency/datawave-accumulo-service.git
[submodule "microservices/services/dictionary"]
path = microservices/services/dictionary
url = [email protected]:NationalSecurityAgency/datawave-dictionary-service.git
[submodule "microservices/services/audit"]
path = microservices/services/audit
url = [email protected]:NationalSecurityAgency/datawave-audit-service.git
[submodule "microservices/services/query-metric"]
path = microservices/services/query-metric
url = [email protected]:NationalSecurityAgency/datawave-query-metric-service.git
[submodule "core/metrics-reporter"]
path = core/metrics-reporter
url = [email protected]:NationalSecurityAgency/datawave-metrics-reporter.git
[submodule "microservices/starters/cache"]
path = microservices/starters/cache
url = [email protected]:NationalSecurityAgency/datawave-spring-boot-starter-cache.git
[submodule "microservices/starters/datawave"]
path = microservices/starters/datawave
url = [email protected]:NationalSecurityAgency/datawave-spring-boot-starter.git
[submodule "microservices/services/hazelcast"]
path = microservices/services/hazelcast
url = [email protected]:NationalSecurityAgency/datawave-hazelcast-service.git
[submodule "microservices/starters/metadata"]
path = microservices/starters/metadata
url = [email protected]:NationalSecurityAgency/datawave-spring-boot-starter-metadata.git
[submodule "microservices/starters/query-metric"]
path = microservices/starters/query-metric
url = [email protected]:NationalSecurityAgency/datawave-spring-boot-starter-query-metric.git
[submodule "microservices/starters/audit"]
path = microservices/starters/audit
url = [email protected]:NationalSecurityAgency/datawave-spring-boot-starter-audit.git
[submodule "microservices/services/config"]
path = microservices/services/config
url = [email protected]:NationalSecurityAgency/datawave-config-service.git
[submodule "microservices/microservice-parent"]
path = microservices/microservice-parent
url = [email protected]:NationalSecurityAgency/datawave-parent.git
[submodule "microservices/microservice-service-parent"]
path = microservices/microservice-service-parent
url = [email protected]:NationalSecurityAgency/datawave-service-parent.git
[submodule "contrib/datawave-utils"]
path = contrib/datawave-utils
url = [email protected]:NationalSecurityAgency/datawave-utils.git
[submodule "microservices/starters/query"]
path = microservices/starters/query
url = [email protected]:NationalSecurityAgency/datawave-spring-boot-starter-query.git
[submodule "microservices/services/query"]
path = microservices/services/query
url = [email protected]:NationalSecurityAgency/datawave-query-service.git
[submodule "microservices/services/query-executor"]
path = microservices/services/query-executor
url = [email protected]:NationalSecurityAgency/datawave-query-executor-service.git
[submodule "microservices/services/modification"]
path = microservices/services/modification
url = [email protected]:NationalSecurityAgency/datawave-modification-service.git
[submodule "microservices/services/mapreduce-query"]
path = microservices/services/mapreduce-query
url = [email protected]:NationalSecurityAgency/datawave-mapreduce-query-service.git
[submodule "microservices/starters/cached-results"]
path = microservices/starters/cached-results
url = [email protected]:NationalSecurityAgency/datawave-spring-boot-starter-cached-results.git
[submodule "microservices/services/map"]
path = microservices/services/map
url = [email protected]:NationalSecurityAgency/datawave-map-service.git
[submodule "microservices/services/file-provider"]
path = microservices/services/file-provider
url = [email protected]:NationalSecurityAgency/datawave-file-provider-service.git
2 changes: 1 addition & 1 deletion BUILDME.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ mvn -Pdev,assemble,rpm -Ddeploy -Dtar -Ddist -DskipTests clean install
Datawave web services utilize several microservices at runtime (currently authorization and auditing, although that
list will expand soon). Datawave depends on api modules for some of these services, and the dependencies are set in
the parent pom (see `version.datawave.*` properties) to released versions. If you wish to build the microservices
for some reason, you can simply add `-Dservices` to your maven build command.
for some reason, you can simply add `-Dservices` to your maven build command. If you wish to build the starters you can add `-Dstarters` and for the utility modules add `-Dutils`.

### Releasing Microservices

Expand Down
98 changes: 65 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,42 +19,74 @@ Basic build instructions are [here](BUILDME.md)

## How to Use this Repository

The microservices and associated utility projects are intended to be
developed, versioned, and released independently and as such are stored
in separate repositories. This repository includes them all as submodules
in order to provide an easy way to import them all in an IDE for viewing
the code, or refactoring. [Git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
require some extra commands over the normal ones that one may be familiar
with.

### Cloning with all submodules
Cloning with all of the submodules is not required; however, if you are interested in checking
out and building all of the datawave projects under one repo, read this!

It's easiest to clone the repository pointing the submodules at the same branch
```bash
# Start out by cloning the project as you normally would.
git clone [email protected]:NationalSecurityAgency/datawave.git

# Now, use git to retrieve all of the datawave submodules.
# This will leave your submodules in a detached head state.
cd datawave
git submodule update --init --recursive

# You can checkout the main branch for each submodule so that you are no longer in a detached head state.
# The addition of `|| :` will ensure that the command is executed for each submodule,
# ignoring failures for submodules that don't have a main branch.
git submodule foreach 'git checkout main || :'

# It is recommended to build the project using multiple threads.
mvn -Pdocker,dist clean install -T 1C
The microservices and associated utility projects are intended to be developed, versioned,
and released independently. The following subdirectories contain those independently
versioned modules:

```
core/utils/type-utils
contrib/datawave-utils
core/base-rest-responses
core/in-memory-accumulo
core/metrics-reporter
core/utils/accumulo-utils
core/utils/common-utils
core/utils/metadata-utils
microservices/microservice-parent
microservices/microservice-service-parent
microservices/starters/audit
microservices/starters/cache
microservices/starters/cached-results
microservices/starters/datawave
microservices/starters/metadata
microservices/starters/query
microservices/starters/query-metric
microservices/services/accumulo
microservices/services/audit
microservices/services/authorization
microservices/services/config
microservices/services/dictionary
microservices/services/file-provider
microservices/services/hazelcast
microservices/services/map
microservices/services/mapreduce-query
microservices/services/modification
microservices/services/query
microservices/services/query-executor
microservices/services/query-metric
```

# If you don't want to build the microservices, you can skip them.
mvn -Pdocker,dist -DskipMicroservices clean install -T 1C
Each of those subdirectories contain a .gitrepo file that keeps track of where the code came from.

# If you decide that you no longer need the submodules, you can remove them.
git submodule deinit --all
### Updating one of the datawave sub-repositories
At one point we used submodules to link in a all of the sub-repositories. We have now switched
to including the submodules' code directly into the main datawave repository. The git subrepo
mechanism (https://github.com/ingydotnet/git-subrepo) was used to facilitate the transition.
That same mechanism can be used to pull in changes from the other repositories as needed until
they can be removed altogether. The original cloning of the sub repositories was done using
the subrepo command as follows:
```
git subrepo clone <repo> <dir>
```
If changes need to be pulled in, then the following process can be used:
```
git subrepo pull <dir>
```
### Building

It is recommended to build the project using multiple threads. This will not build the starters, utilities, and services.
```
mvn -Pdocker,dist clean install -T 1C
```

If you want to build the starters, util modules, and services as well then try this
```
mvn -Pdocker,dist -Dstarters -Dservices -Dutils clean install -T 1C
Copy link
Collaborator

Choose a reason for hiding this comment

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

This says "if you dont want to build..." but the command adds the properties to build them. Did you mean "if you want to"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah, this one was in error.... fixing

```
If you want to build the service apis but not the services themselveds then add -DonlyServiceApis

NOTE: The util modules, starters, and services are actually tagged and deployed separately.
Hence the snapshot versions within those sub repos are not connected together.

### DataWave Microservices

Expand Down
1 change: 0 additions & 1 deletion contrib/datawave-utils
Submodule datawave-utils deleted from 4348fc
9 changes: 9 additions & 0 deletions contrib/datawave-utils/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
target/

.idea/
*.iml
*.iws

.classpath
.project
.settings/
12 changes: 12 additions & 0 deletions contrib/datawave-utils/.gitrepo
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
; DO NOT EDIT (unless you know what you are doing)
;
; This subdirectory is a git "subrepo", and this file is maintained by the
; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme
;
[subrepo]
remote = [email protected]:NationalSecurityAgency/datawave-utils.git
branch = main
commit = 4348fc36a3519ca9e5d1b96ac47c3f0b64abe34b
parent = 1f96d1af84c45f32007da0105b8eab514ec3f7d3
method = merge
cmdver = 0.4.9
Loading
Loading