Skip to content

Commit 9ca377b

Browse files
committed
Merge branch '7.0.x' into 7.1.x
2 parents 7990edf + 3bd608a commit 9ca377b

File tree

80 files changed

+1154
-434
lines changed

Some content is hidden

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

80 files changed

+1154
-434
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
# limitations under the License.
1515

1616
contact_links:
17+
- name: Grails Mailing Lists
18+
url: https://grails.apache.org/community.html
19+
about: Ask questions on the Mailing Lists
1720
- name: Grails Core Discussions
1821
url: https://github.com/apache/grails-core/discussions
19-
about: Ask questions about Grails® framework on Github
20-
- name: Stack Overflow
21-
url: https://stackoverflow.com/tags/grails
22-
about: Ask questions on Stack Overflow
22+
about: Discuss Grails® framework on GitHub
2323
- name: Grails Slack
2424
url: https://grails.slack.com/
25-
about: Chat with us on Grails Community Slack.
25+
about: Chat with us on Grails Community Slack.

RELEASE.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ Confirm the Grails PMC votes passed with a +1 from at least 3 PMC members. The `
267267
The `release` job in the `Release` workflow has a step entitled `🚀 Release JAR files - MANUAL`. You can release the jar
268268
files by one of 2 ways:
269269

270-
1. In repository.apache.org, the staged artifacts must be released by opening the `grails-core` staging repository and
270+
1. On https://repository.apache.org/#stagingRepositories, the staged artifacts must be released by opening the `grails-core` staging repository and
271271
clicking the `Release` button. It took almost 2 hours for the initial ASF release to publish these jars to Maven
272272
Central.
273273
2. Alternatively, the `release` job in the `Release` workflow will output an example command line to release the staging
@@ -276,7 +276,7 @@ files by one of 2 ways:
276276

277277
### Move the distributions from `dev` to `release`
278278

279-
On dist.apache.org, the staged source distribution & binary distributions must be moved from `dev` to `release`. Per ASF
279+
On dist.apache.org, the staged source distribution & binary distributions must be moved from `https://dist.apache.org/repos/dist/dev/grails/` to `https://dist.apache.org/repos/dist/release/grails/`. Per ASF
280280
infrastructure, this must be performed manually, and we are not allowed to automate it via a gated approval workflow.
281281
Either move them via your SVN client or use the checked in script to perform these actions as your user.
282282

@@ -313,7 +313,7 @@ this step.
313313
### Publish `grails-core` documentation
314314

315315
Open the release workflow in `grails-core` and approve the `Publish Documentation` step. Wait until finished, and a
316-
workflow should eventually kick off in `grails-doc` to publish the gh-pages branch that was updated.
316+
workflow should eventually kick off in `grails-doc` to publish to https://github.com/apache/grails-website/tree/asf-site-production/docs and https://grails.apache.org/docs/.
317317

318318
### Advertise the release via SDKMAN
319319

@@ -322,15 +322,17 @@ version from Maven Central.
322322

323323
### Close out the `grails-core` release
324324

325-
The last step in the `grails-core` release workflow is to run the `Close Release` step. This will create a merge branch for the original tag with version number and then open a PR to merge back into the next branch. You will need to merge it into the branch after correcting any merge conflict.
325+
The last step in the `grails-core` release workflow is to run the `Close Release` step. This will create a merge branch for the original tag with version number and then open a PR to merge back into the next branch. You will need to merge this PR into the branch after correcting any merge conflict.
326326

327327
### Update the `grails-static-website`
328328

329329
On the `grails-static-website` repository:
330330

331-
Run the release action (https://github.com/apache/grails-static-website/actions/workflows/release.yml) with the new version to update https://github.com/apache/grails-static-website/blob/HEAD/conf/releases.yml and then run the publish action (https://github.com/apache/grails-static-website/actions/workflows/publish.yml) to update the `asf-site-production` branch and https://grails.apache.org
331+
Run the release action (https://github.com/apache/grails-static-website/actions/workflows/release.yml) with the new version to update https://github.com/apache/grails-static-website/blob/HEAD/conf/releases.yml
332332

333-
Create a new `.md` file in the `/posts` directory announcing the release. Wwhen the PR is merged it will deploy to https://grails.apache.org
333+
Then run the publish action (https://github.com/apache/grails-static-website/actions/workflows/publish.yml) to update https://github.com/apache/grails-website/tree/asf-site-production/ and publish to https://grails.apache.org
334+
335+
Create a new `.md` file in the `/posts` directory announcing the release. When the PR is merged it will deploy to https://grails.apache.org
334336

335337
### Flag release in `grails-core` as latest
336338

@@ -339,7 +341,7 @@ Update the release in `grails-core` to be flagged as 'latest'
339341
### Announce the release
340342

341343
Announcements should come from your apache email address (see https://infra.apache.org/committer-email.html) and have an
342-
expected format. The announcement should be sent to `[email protected]`, `[email protected]`, &
344+
expected format. The announcement should be sent to `[email protected]`, `[email protected]`, `[email protected]`, &
343345
`[email protected]`. See the `close` job for a generated email.
344346

345347
# Rollback

build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/SbomPlugin.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class SbomPlugin implements Plugin<Project> {
6767
],
6868
'BSD-2-Clause': [
6969
id : 'BSD-2-Clause',
70-
url: 'https://opensource.org/license/bsd-3-clause/'
70+
url: 'https://opensource.org/license/bsd-2-clause/'
7171
],
7272
'BSD-3-Clause': [
7373
id : 'BSD-3-Clause',

dependencies.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ext {
3838
'jquery.version' : '3.7.1',
3939
'objenesis.version' : '3.4',
4040
'gradle-spock.version' : '2.3-groovy-3.0',
41-
'spring-boot.version' : '3.5.6',
41+
'spring-boot.version' : '3.5.7',
4242
]
4343

4444
// Note: the name of the dependency must be the prefix of the property name so properties in the pom are resolved correctly
@@ -73,7 +73,7 @@ ext {
7373
'bootstrap.version' : '5.3.7',
7474
'commons-codec.version' : '1.18.0',
7575
'geb-spock.version' : '8.0.0',
76-
'groovy.version' : '4.0.28',
76+
'groovy.version' : '4.0.29',
7777
'h2.version' : '2.3.232',
7878
'jackson.version' : '2.19.1',
7979
'jquery.version' : '3.7.1',

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ gradleCycloneDxPluginVersion=2.4.1
5454
micronautPlatformVersion=4.9.2
5555

5656
# Libraries only specific to test apps, these should not be exposed
57-
grailsSpringSecurityVersion=7.0.0-SNAPSHOT
57+
grailsSpringSecurityVersion=7.0.1-SNAPSHOT
5858
jbossTransactionApiVersion=2.0.0.Final
5959
# Note: we do not import the micronaut bom in our tests to avoid spring version mismatches
6060
micronautHttpClientVersion=4.9.9

grails-controllers/src/main/groovy/org/grails/compiler/web/ControllerActionTransformer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,8 +941,7 @@ protected void initializePrimitiveOrTypeWrapperParameter(final ClassNode classNo
941941
Statement declareVariableStatement = new ExpressionStatement(declareConvertedValueExpression);
942942
wrapper.addStatement(declareVariableStatement);
943943

944-
final VariableExpression methodParamExpression = new VariableExpression(
945-
methodParamName, paramTypeClassNode);
944+
final VariableExpression methodParamExpression = localVarX(methodParamName, paramTypeClassNode);
946945
final DeclarationExpression declareParameterVariableStatement = new DeclarationExpression(
947946
methodParamExpression, equalsToken, new EmptyExpression());
948947
declareVariableStatement = new ExpressionStatement(declareParameterVariableStatement);

grails-data-mongodb/core/src/main/groovy/org/grails/datastore/mapping/mongo/MongoDatastore.java

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import jakarta.persistence.FlushModeType;
3232

3333
import com.mongodb.MongoClientSettings;
34+
import com.mongodb.MongoCommandException;
3435
import com.mongodb.client.MongoClient;
3536
import com.mongodb.client.MongoIterable;
3637
import com.mongodb.client.model.IndexOptions;
@@ -846,7 +847,11 @@ protected void initializeIndices(final PersistentEntity entity) {
846847
for (MongoCollection.Index index : indices) {
847848
final Map<String, Object> options = index.getOptions();
848849
final IndexOptions indexOptions = MongoConstants.mapToObject(IndexOptions.class, options);
849-
collection.createIndex(new Document(index.getDefinition()), indexOptions);
850+
try {
851+
collection.createIndex(new Document(index.getDefinition()), indexOptions);
852+
} catch (MongoCommandException e) {
853+
LOG.error("Failed to create index for entity [" + entity.getName() + "] with definition [" + index.getDefinition() + "]: " + e.getMessage(), e);
854+
}
850855
}
851856

852857
for (Map compoundIndex : mappedForm.getCompoundIndices()) {
@@ -859,11 +864,15 @@ protected void initializeIndices(final PersistentEntity entity) {
859864
}
860865
}
861866
Document indexDef = new Document(compoundIndex);
862-
if (indexAttributes != null) {
863-
final IndexOptions indexOptions = MongoConstants.mapToObject(IndexOptions.class, indexAttributes);
864-
collection.createIndex(indexDef, indexOptions);
865-
} else {
866-
collection.createIndex(indexDef);
867+
try {
868+
if (indexAttributes != null) {
869+
final IndexOptions indexOptions = MongoConstants.mapToObject(IndexOptions.class, indexAttributes);
870+
collection.createIndex(indexDef, indexOptions);
871+
} else {
872+
collection.createIndex(indexDef);
873+
}
874+
} catch (MongoCommandException e) {
875+
LOG.error("Failed to create compound index for entity [" + entity.getName() + "] with definition [" + indexDef + "]: " + e.getMessage(), e);
867876
}
868877
}
869878
}
@@ -889,11 +898,15 @@ protected void initializeIndices(final PersistentEntity entity) {
889898
}
890899
}
891900
// continue using deprecated method to support older versions of MongoDB
892-
if (options.isEmpty()) {
893-
collection.createIndex(dbObject);
894-
} else {
895-
final IndexOptions indexOptions = MongoConstants.mapToObject(IndexOptions.class, options);
896-
collection.createIndex(dbObject, indexOptions);
901+
try {
902+
if (options.isEmpty()) {
903+
collection.createIndex(dbObject);
904+
} else {
905+
final IndexOptions indexOptions = MongoConstants.mapToObject(IndexOptions.class, options);
906+
collection.createIndex(dbObject, indexOptions);
907+
}
908+
} catch (MongoCommandException e) {
909+
LOG.error("Failed to create index for entity [" + entity.getName() + "] on property [" + property.getName() + "]: " + e.getMessage(), e);
897910
}
898911
}
899912
}

grails-databinding/src/main/groovy/org/grails/databinding/converters/DefaultConvertersConfiguration.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ ValueConverter instantValueConverter() {
177177
return jsr310ConvertersConfiguration.instantValueConverter();
178178
}
179179

180+
@Bean("instantStructuredBindingEditor")
181+
TypedStructuredBindingEditor instantStructuredBindingEditor() {
182+
return jsr310ConvertersConfiguration.instantStructuredBindingEditor();
183+
}
184+
180185
@Bean("defaultUUIDConverter")
181186
protected UUIDConverter defaultuuidConverter() {
182187
return new UUIDConverter();

grails-databinding/src/main/groovy/org/grails/databinding/converters/Jsr310ConvertersConfiguration.groovy

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,21 @@ class Jsr310ConvertersConfiguration {
388388
}
389389
}
390390

391+
@Bean
392+
TypedStructuredBindingEditor instantStructuredBindingEditor() {
393+
new CustomDateBindingEditor<Instant>() {
394+
@Override
395+
Instant getDate(Calendar c) {
396+
c.toInstant()
397+
}
398+
399+
@Override
400+
Class<?> getTargetType() {
401+
Instant
402+
}
403+
}
404+
}
405+
391406
abstract class Jsr310DateValueConverter<T> implements ValueConverter {
392407

393408
@Override

grails-datamapping-async/src/main/groovy/grails/gorm/async/AsyncEntity.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
package grails.gorm.async
2121

2222
import groovy.transform.CompileStatic
23+
import groovy.transform.Generated
2324

2425
import org.grails.datastore.gorm.GormEnhancer
2526
import org.grails.datastore.gorm.GormEntity
@@ -37,6 +38,7 @@ trait AsyncEntity<D> extends GormEntity<D> {
3738
/**
3839
* @return The async version of the GORM static API
3940
*/
41+
@Generated
4042
static GormAsyncStaticApi<D> getAsync() {
4143
return new GormAsyncStaticApi(GormEnhancer.findStaticApi(this))
4244
}

0 commit comments

Comments
 (0)