Skip to content

Bug/inf 72#5

Merged
ctucker3 merged 9 commits intodevelopfrom
bug/INF-72
Apr 1, 2020
Merged

Bug/inf 72#5
ctucker3 merged 9 commits intodevelopfrom
bug/INF-72

Conversation

@ctucker3
Copy link
Contributor

@ctucker3 ctucker3 commented Mar 16, 2020

Includes upgrade to java 13 and isolation of the tests.

https://trello.com/c/wgX1kP3F/167-inf-34-upgrade-bi-api-to-latest-version-of-jdk
https://trello.com/c/kDw6363W/168-inf-72-update-tests-to-be-self-contained

If you are using IntelliJ and having issues getting mvn clean install to run, getting an error along the lines of --enable-preview only available for java 12 you likely have to update your IntelliJ settings. See the bottom of the README in biapi for troubleshooting steps. I can help check it out if you continue to have issues!

Acceptance criteria can be seen in the cards linked above. In addition to going through the acceptance criteria, thoughts on the code or the solution are welcomed and appreciated!

NOTE: This was branched off the PRO-42 feature branch. It would be best to wait for review until that is merged in so you can see the important changes here and not the PRO-42 ones.

@ctucker3
Copy link
Contributor Author

@ctucker3
Copy link
Contributor Author

@nickpalladino
Copy link
Member

When attempting to build the docker image, I get the following error:

Step 13/14 : RUN cd micronaut-security && ./gradlew --info publishToMavenLocal && cd ..
 ---> Running in 85d20447191a
/bin/sh: ./gradlew: No such file or directory
ERROR: Service 'biapi-dev' failed to build: The command '/bin/sh -c cd micronaut-security && ./gradlew --info publishToMavenLocal && cd ..' returned a non-zero code: 127

@ctucker3
Copy link
Contributor Author

ctucker3 commented Mar 27, 2020

When attempting to build the docker image, I get the following error:

Step 13/14 : RUN cd micronaut-security && ./gradlew --info publishToMavenLocal && cd ..
 ---> Running in 85d20447191a
/bin/sh: ./gradlew: No such file or directory
ERROR: Service 'biapi-dev' failed to build: The command '/bin/sh -c cd micronaut-security && ./gradlew --info publishToMavenLocal && cd ..' returned a non-zero code: 127

This looks like it might be an issue with the micronaut security code not being downloaded. I would check your .env file and make sure your GITHUB_ACTOR and GITHUB_TOKEN are specified and valid. Also, check that your settings.xml is specified so it knows where to pull the package.

If that doesn't work, maybe try wiping your past image and starting fresh? Not sure if old image layers could be messing it up?

@timparsons
Copy link
Member

When attempting to build the docker image, I get the following error:

Step 13/14 : RUN cd micronaut-security && ./gradlew --info publishToMavenLocal && cd ..
 ---> Running in 85d20447191a
/bin/sh: ./gradlew: No such file or directory
ERROR: Service 'biapi-dev' failed to build: The command '/bin/sh -c cd micronaut-security && ./gradlew --info publishToMavenLocal && cd ..' returned a non-zero code: 127

This looks like it might be an issue with the micronaut security code not being downloaded. I would check your .env file and make sure your GITHUB_ACTOR and GITHUB_TOKEN are specified and valid. Also, check that your settings.xml is specified so it knows where to pull the package.

If that doesn't work, maybe try wiping your past image and starting fresh? Not sure if old image layers could be messing it up?

The micronaut-security code is a sub-module to the bi-api repo, so it shouldn't be dependent on the GITHUB_ACTOR/GITHUB_TOKEN configuration (that should only apply to bi-jooq-codegen). You may have to run a git command to checkout the micronaut-security code (@dmeidlin anything to add?)

@nickpalladino
Copy link
Member

nickpalladino commented Mar 27, 2020

Thanks guys, the micronaut-security code wasn't there. To get it, I ran:

git submodule init
git submodule update

It errored out trying to download some files from https://repo.grails.org, but I think that's due to my internet connection.

@eawoods
Copy link

eawoods commented Mar 30, 2020

Having issues getting IntelliJ to run project. Two adjustments to README, plus errors in build when pulling jooq codegen after solving GitHub token/actor, openJDK version, and db.config to build.config change.

  1. Add instructions to include GH token/actor in IntelliJ environment variables
  2. Readme here: Build the app In src/build/, make a copy of db.config.properties as db.config.dev.properties (this file is ignored from git) and replace placeholder values. needs to change to support file name change from db.config to build.config.

@nickpalladino
Copy link
Member

nickpalladino commented Mar 30, 2020

Docker build fails due to gradle errors, looks like a problem getting a license plugin.

Failed to get resource: GET. [HTTP HTTP/1.1 503 Service Unavailable: https://plugins.gradle.org/m2/com/github/hierynomus/license/com.github.hierynomus.license.gradle.plugin/0.15.0/com.github.hierynomus.license.gradle.plugin-0.15.0.pom]

FAILURE: Build failed with an exception.

* Where:
Build file '/home/host/biapi/micronaut-security/build.gradle' line: 24

* What went wrong:
Plugin [id: 'com.github.hierynomus.license', version: '0.15.0', apply: false] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.github.hierynomus.license:com.github.hierynomus.license.gradle.plugin:0.15.0')
  Searched in the following repositories:
    Gradle Central Plugin Repository

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 6m 44s
ERROR: Service 'biapi-dev' failed to build: The command '/bin/sh -c cd micronaut-security && ./gradlew --info publishToMavenLocal && cd ..' returned a non-zero code: 1

@nickpalladino
Copy link
Member

Tests all run and pass, takes noticeably longer with the testcontainer startup and migration but that is to be expected.

@ctucker3
Copy link
Contributor Author

Tests all run and pass, takes noticeably longer with the testcontainer startup and migration but that is to be expected.

Something we can look into in the future is to try and start up just one testing container for all of the test classes, instead of for every class. I think that will return out testing speed back to the original speed (or close to it).


### Run tests

*Improvements coming soon!
Copy link
Member

Choose a reason for hiding this comment

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

Same as above

Copy link

@eawoods eawoods left a comment

Choose a reason for hiding this comment

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

Resolved issues with local environment and understanding of how to get the environment configuration working. Thanks Chris for your work in making the instructions and process more understandable!

@ctucker3 ctucker3 merged commit 1370269 into develop Apr 1, 2020
@ctucker3 ctucker3 deleted the bug/INF-72 branch April 1, 2020 12:58
@nickpalladino nickpalladino added the bug Something isn't working label Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants