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

Brave bucks issue 6 #7

Open
wants to merge 52 commits into
base: master
Choose a base branch
from

Conversation

troyburn
Copy link

Please find the final cut to support JRE11 (the original goal) but also look towards JRE17 in a few days.

Update Maven plugins to better language version support.
Update Maven plugins to better language version support.
Update Maven plugins to better language version support.
Update Maven plugins to better language version support.
Dependency added (due to removal of classes from JRE11)
The previous commit allows someone to wind back the project in the future if needed to a
known good state that builds against JDK16.
Metrics usage at runtime has not been tested,
this is a best effort commit based on documentation.
Date => Instant
interface AuditEventRepository fewer @overwrite methods
 (left old methods in place)
interface AuditorAware<T> returns Optional<T> to #getCurrentAuditor()()
This started failing, it was due to userRepository not being empty from
 the previous test.
JRE8/JRE11 and various platforms Windows/Linux/whatever also different
 versions of Win/Linux kernels for same JRE binaries can have differences
 with respect to how high precision Instant's are managed.  Not all
 platforms support nano-second resolutions.
So while APIs maybe present to return nanos the least significant parts
 maybe zeros like 250000000 for 250ms.
This then goes onto affect databases/storage etc... and inconsistencies
 with the JRE and the storage engine.

So to fix the test we perform equality comparison of Instant types to
 the milli-second granulatity accuracy values of the Instant.

Ideally we'd want to test the exact values or
 a truncated value to micro-seconds or
 a truncated value to milli-seconds
 matches for the purpose of equality, this should covery all platform/os
 combinations.
WARNING MongoDB model change.

jhi_persistent_audit_event.event_id => jhi_persistent_audit_event._id

This follows MongoDB conventions for schema naming concerning identity.

// stop application
// mongodump (to backup)
// mongo (run script from cli)
// transform copy
db.braveBucks.updateMany( {}, { $rename: { "jhi_persistent_audit_event.orderId": "jhi_persistent_audit_event.purchaseOrderId" } } )
// rename original
db.myoriginal.find().forEach( function(x){db.mycopy.insert(x)} );
// rename new transformed
db.brave-bucks.renameCollection('', dropTarget)
//
// See CL004_MigratePersistentAuditEventID
Deprecated (includes ";charset=UTF-8")
MediaType.APPLICATION_JSON_UTF8_VALUE
replaced with
MediaType.APPLICATION_JSON_VALUE
…dit_event

com.bravebucks.eve.config.dbmigrations.CL004_MigratePersistentAuditEventID
This should grandfather in the setting, the old default was true and
the new default in future versions will be false.  So we must explicitly
set it to keep it.

This setting relates to this boot-up notice, however after this commit it
does not suppress it.

Please use 'MongoMappingContext#setAutoIndexCreation(boolean)' or override 'MongoConfigurationSupport#autoIndexCreation()' to be explicit.
However, we recommend setting up indices manually in an application ready block. You may use index derivation there as well.

> -----------------------------------------------------------------------------------------
> @eventlistener(ApplicationReadyEvent.class)
> public void initIndicesAfterStartup() {
>
>     IndexOperations indexOps = mongoTemplate.indexOps(DomainType.class);
>
>     IndexResolver resolver = new MongoPersistentEntityIndexResolver(mongoMappingContext);
>     resolver.resolveIndexFor(DomainType.class).forEach(indexOps::ensureIndex);
> }
> -----------------------------------------------------------------------------------------
Maybe HttpComponent does not need it anymore ? Due to HttpMime.
But I think urirest-api does and it uses HttpComponenet but
 did not define commons-decode dependency itself.
…tarter-validation

Added back as 2.2.x to 2.3.x spring-boot removes implicit dependency
we still require it.
Add back previous dependency, upgrade patch is Cloud Foundary work CfEnv

org.springframework.boot:spring-boot-starter-cloud-connectors:2.2.13.RELEASE
This is the MongoDB model/schema migration infrastructure.

We also end up with MongoDB 4.x drivers now.

Needed to add com.google.guava:guava to pom.xml to ensure we have
 at least version 20.0 or newer.  Without it we were getting a
 transient dep for version 18.0 due to another dep asking for that.
org.junit.* => org.junit.jupiter.api.*
Invalid CORS config being tested.
Multiple @beforeeach ordering not well defined behaviour.
… HTML

WARN org.thymeleaf.templatemode.TemplateMode  : [THYMELEAF][mvn-builder-com.bravebucks.eve:braveBucks:war:2.5.0] Template Mode 'XHTML' is deprecated. Using Template Mode 'HTML' instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant