Skip to content

Commit

Permalink
Release 1.1.0-RC14 (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
cchantep authored Nov 6, 2024
1 parent 5f1170f commit d31662b
Show file tree
Hide file tree
Showing 12 changed files with 65 additions and 49 deletions.
6 changes: 3 additions & 3 deletions .ci_scripts/beforeInstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

set -e

for D in `ls -v -1 "$HOME/.gem/ruby"`; do
export PATH="$HOME/.gem/ruby/$D/bin:$PATH"
for D in `ls -v -1 "$HOME/.local/share/gem/ruby"`; do
export PATH="$HOME/.local/share/gem/ruby/$D/bin:$PATH"
done

if [ -d "$HOME/.local/bin" ]; then
Expand All @@ -16,7 +16,7 @@ if [ `which pip | wc -l` -eq 0 ]; then
fi

gem install --no-verbose --user-install jekyll pygments.rb || exit 1
bundle install --path "$HOME/.bundle" || exit 2
bundle install || exit 2
pip install --user Pygments || exit 3

cat > package.json << EOF
Expand Down
14 changes: 5 additions & 9 deletions .ci_scripts/validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,9 @@ SBT_VER="$1"

export SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M"

if [ "x$JAVA_HOME" = "x" ]; then
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export PATH="$JAVA_HOME/bin:$PATH"
fi

for D in `ls -v -1 "$HOME/.gem/ruby" | sort -r | head -n 1`; do
export PATH="$HOME/.gem/ruby/$D/bin:$PATH"
export GEM_PATH="$HOME/.gem/ruby/$D:$GEM_PATH"
for D in `(ls -v -1 "$HOME/.local/share/gem/ruby" || true) | sort -r | head -n 1`; do
export PATH="$HOME/.local/share/gem/ruby/$D/bin:$PATH"
export GEM_PATH="$HOME/.local/share/gem/ruby/$D:$GEM_PATH"
done

if [ "x$SBT_JAR" = "x" ]; then
Expand All @@ -26,10 +21,11 @@ echo "[INFO] Compiling code samples ..."
java $SBT_OPTS -jar "$SBT_JAR" error test:compile || exit 1

echo "[INFO] Building documentation ..."
echo "GEM_PATH=$GEM_PATH"

bundle exec jekyll build || exit 2

echo "[INFO] Spell checking ..."
./node_modules/markdown-spellcheck/bin/mdspell -r --en-gb -n `find . -not -path '*/node_modules/*' -type f -name '*.md' | perl -pe 's|^\./||;s|[A-Za-z0-9.-]+|*|g' | sort -u | sed -e 's/$/.md/'` '!**/node_modules/**/*.md' '!**/vendor/**/*.md' || exit 3
mdspell -r --en-gb -n `find . -not -path '*/node_modules/*' -type f -name '*.md' | perl -pe 's|^\./||;s|[A-Za-z0-9.-]+|*|g' | sort -u | sed -e 's/$/.md/'` '!**/node_modules/**/*.md' '!**/vendor/**/*.md' || exit 3

echo "[INFO] Documentation is checked"
10 changes: 8 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
description: 'Build & Test'

docker: # See ../circleci.dockerfile
- image: cchantep/reactivemongo-site:1.1.0-RC4
- image: cchantep/reactivemongo-site:1.1.0-RC14

working_directory: ~/repo

Expand Down Expand Up @@ -38,7 +38,8 @@ jobs:
if [ ! -L node_modules ]; then
ln -s /node_modules node_modules
fi
java -version && ./.ci_scripts/validate.sh 1.6.2
export PATH="$HOME/node_modules/markdown-spellcheck/bin/:$PATH"
java -version && ./.ci_scripts/validate.sh 1.10.1
- run:
name: Run Jekyll in background
Expand All @@ -51,6 +52,11 @@ jobs:
trap on_term SIGTERM
for D in `(ls -v -1 "$HOME/.local/share/gem/ruby" || true) | sort -r | head -n 1`; do
export PATH="$HOME/.local/share/gem/ruby/$D/bin:$PATH"
export GEM_PATH="$HOME/.local/share/gem/ruby/$D:$GEM_PATH"
done
bundle exec jekyll serve
- save_cache:
Expand Down
5 changes: 5 additions & 0 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Netty
OOM
PEM
Pekko
PekkoStream
Play2-ReactiveMongo
QueryBuilderFactory.this.pack.Reader
ReactiveMongo
Expand Down Expand Up @@ -334,6 +335,10 @@ reactivemongo.api.bson.BSONSymbol
reactivemongo.api.bson.BSONArray
reactivemongo.api.bson.BSONDocument
reactivemongo.api.bson.BSONUndefined.type
reactivemongo.pekkostream.State
org.apache.pekko.stream.Materializer
org.apache.pekko.stream.scaladsl.Source
org.apache.pekko.NotUsed

# Geo
JP
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# For CircleCI, make sure to publish a new Docker image
source 'https://rubygems.org'

gem 'jekyll', '~> 3.6'
gem 'jekyll', '~> 4.3.4'

group :jekyll_plugins do
gem 'jekyll-algolia'
gem 'jekyll-sitemap', '~> 0.10.0'
gem 'jekyll-sitemap', '~> 1.4'
gem 'kramdown-parser-gfm'
end
6 changes: 3 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ kramdown:
input: GFM
syntax_highlighter: rouge
latest_major_release: 1.0
latest_release: 1.1.0-RC13
latest_release: 1.1.0-RC14
exclude: [vendor,target]
plugins:
- jekyll-sitemap
Expand All @@ -22,8 +22,8 @@ _0_1x_latest_minor: 0.20.13
_0_1x_scala_major: 2.12

_1_0_latest_major: 1.1
_1_0_latest_minor: 1.1.0-RC13
_1_0_latest_play: 1.1.0-play30.RC13
_1_0_latest_minor: 1.1.0-RC14
_1_0_latest_play: 1.1.0-play30.RC14
_1_0_scala_major: 2.13

algolia:
Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ lazy val release_1_0 = project.in((file(".") / "releases" / "1.0"))
lazy val `reactivemongo-site` = (project in file("."))
.settings(
doc / excludeFilter := "releases",
scalaVersion := "2.12.19",
scalaVersion := "2.12.20",
ThisBuild / scalacOptions ++= Seq("-Ywarn-unused-import", "-unchecked"),
libraryDependencies ++= Seq(
"org.reactivemongo" %% "reactivemongo" % "1.1.0-RC13"),
"org.reactivemongo" %% "reactivemongo" % "1.1.0-RC14"),
ThisBuild / resolvers ++= (
Resolver.typesafeRepo("releases") +: (
Resolver.sonatypeOssRepos("snapshots") ++ Resolver.sonatypeOssRepos("staging"))))
Expand Down
30 changes: 18 additions & 12 deletions circleci.dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
# Build:
#
# docker build --build-arg sbt_version=1.6.2 -t cchantep/reactivemongo-site -f circleci.dockerfile .
# docker build --build-arg sbt_version=1.10.1 -t cchantep/reactivemongo-site -f circleci.dockerfile .

# Push:
#
# docker push cchantep/reactivemongo-site

FROM circleci/ruby:2.5-node-browsers
FROM cimg/ruby:3.3.6-node

ARG sbt_version=1.6.2
ARG sbt_version=1.10.1

COPY .ci_scripts/beforeInstall.sh /
COPY Gemfile /
COPY .ci_scripts/beforeInstall.sh /home/circleci/
COPY Gemfile Gemfile.lock /home/circleci/

USER root

RUN wget https://bootstrap.pypa.io/get-pip.py && \
python3.7 get-pip.py --user && \
chmod u+x beforeInstall.sh && \
./beforeInstall.sh ${sbt_version}

# For PDF generation
RUN sudo apt-get update -y && \
sudo apt-get install pandoc texlive-xetex fonts-inconsolata
RUN sudo apt update -y && sudo apt upgrade -y && \
sudo apt-get install -y python3-distutils pandoc texlive-xetex fonts-inconsolata openjdk-11-jdk && \
wget https://bootstrap.pypa.io/get-pip.py && \
python3.10 get-pip.py --user && \
rm -f get-pip.py && \
cd /home/circleci && \
chown circleci beforeInstall.sh Gemfile Gemfile.lock && \
chmod a+x beforeInstall.sh

USER circleci
WORKDIR /home/circleci

RUN ./beforeInstall.sh ${sbt_version}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.7
sbt.version=1.10.1
15 changes: 9 additions & 6 deletions releases/1.0/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,29 @@ organization := "org.reactivemongo"

name := "release_1_0"

version := "1.1.0-RC12"
version := "1.1.0-RC14"

scalaVersion := "2.12.18"
scalaVersion := "2.12.20"

libraryDependencies ++= Seq(
"reactivemongo-akkastream",
"reactivemongo-pekkostream",
"reactivemongo-iteratees",
"reactivemongo-bson-api",
"reactivemongo-bson-geo",
"reactivemongo-bson-monocle",
"reactivemongo-bson-specs2",
"reactivemongo-bson-msb-compat"
).map(
"org.reactivemongo" %% _ % version.value changing())
).map { d =>
("org.reactivemongo" %% d % version.value changing()).
exclude("org.scala-lang.modules", "scala-java8-compat_2.12")
}

libraryDependencies ++= {
val idx = version.value.lastIndexOf('-')
val playVer = version.value.splitAt(idx) match {
case ("", major) => s"${major}.play27"
case (major, mod) => s"${major}.play27${mod}"
case ("", major) => s"${major}-play27"
case (major, mod) => s"${major}-play27.${mod stripPrefix "-"}"
}

Seq("play2-reactivemongo", "reactivemongo-play-json-compat").map(
Expand Down
4 changes: 2 additions & 2 deletions releases/1.0/documentation/release-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ Slides for these release notes are [available](https://gist.githubusercontent.co

This release is compatible with the following runtime.

- [MongoDB](https://www.mongodb.org/) from 3.6 up to 7.0.
- [MongoDB](https://www.mongodb.org/) from 3.6 up to 8.0.

- [Scala](https://www.scala-lang.org) from 2.11 to 3.3.
- [Scala](https://www.scala-lang.org) from 2.11 to 3.4.
- [Akka](http://akka.io/) from 2.3.13 up to 2.6.5 (see [Setup](./tutorial/setup.html))
- [Play Framework](https://playframework.com) from 2.3.13 to 3.0.

Expand Down
14 changes: 7 additions & 7 deletions releases/1.0/documentation/tutorial/streaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,16 @@ libraryDependencies += "org.reactivemongo" %% "reactivemongo-pekkostream" % "{{s

The main features of this modules are as follows.

- Get a [`Source`](https://oss.sonatype.org/service/local/repositories/releases/archive/org/reactivemongo/reactivemongo-pekkostream_{{site._1_0_scala_major}}/{{site._1_0_latest_minor}}/reactivemongo-pekkostream_{{site._1_0_scala_major}}-{{site._1_0_latest_minor}}-javadoc.jar/!/index.html#reactivemongo.pekkostream.PekkoStreamCursor#documentSource(maxDocs:Int,err:reactivemongo.api.Cursor.ErrorHandler[Option[T]])(implicitm:pekko.stream.Materializer):pekko.stream.scaladsl.Source[T,pekko.NotUsed]) of documents from a ReactiveMongo cursor. This is a document producer.
- Get a [`Source`](https://oss.sonatype.org/service/local/repositories/releases/archive/org/reactivemongo/reactivemongo-pekkostream_{{site._1_0_scala_major}}/{{site._1_0_latest_minor}}/reactivemongo-pekkostream_{{site._1_0_scala_major}}-{{site._1_0_latest_minor}}-javadoc.jar/!/index.html#reactivemongo.pekkostream.PekkoStreamCursor#documentSource(maxDocs:Int,err:reactivemongo.api.Cursor.ErrorHandler[Option[T]])(implicitm:org.apache.pekko.stream.Materializer):org.apache.pekko.stream.scaladsl.Source[T,org.apache.pekko.NotUsed]) of documents from a ReactiveMongo cursor. This is a document producer.
- Run with a [`Flow`](http://doc.pekko.io/api/pekko/2.4.10/#pekko.stream.javadsl.Flow) or a [`Sink`](http://doc.pekko.io/api/pekko/2.4.10/#pekko.stream.javadsl.Sink), which will consume the documents, with possible transformation.

To use the Pekko Stream support for the ReactiveMongo cursors, [`reactivemongo.pekkostream.cursorProducer`](https://oss.sonatype.org/service/local/repositories/releases/archive/org/reactivemongo/reactivemongo-pekkostream_{{site._1_0_scala_major}}/{{site._1_0_latest_minor}}/reactivemongo-pekkostream_{{site._1_0_scala_major}}-{{site._1_0_latest_minor}}-javadoc.jar/!/index.html#reactivemongo.pekkostream.package$$cursorFlattener$) must be imported.

```scala
import scala.concurrent.Future

import pekko.stream.Materializer
import pekko.stream.scaladsl.{ Sink, Source }
import org.apache.pekko.stream.Materializer
import org.apache.pekko.stream.scaladsl.{ Sink, Source }

import reactivemongo.api.bson.BSONDocument
import reactivemongo.api.bson.collection.BSONCollection
Expand All @@ -140,7 +140,7 @@ def processPerson1(collection: BSONCollection, query: BSONDocument)(implicit m:
}
```

The operation [`PekkoStreamCursor.documentSource`](https://oss.sonatype.org/service/local/repositories/releases/archive/org/reactivemongo/reactivemongo-pekkostream_{{site._1_0_scala_major}}/{{site._1_0_latest_minor}}/reactivemongo-pekkostream_{{site._1_0_scala_major}}-{{site._1_0_latest_minor}}-javadoc.jar/!/index.html#reactivemongo.pekkostream.PekkoStreamCursor#documentSource(maxDocs:Int,err:reactivemongo.api.Cursor.ErrorHandler[Option[T]])(implicitm:pekko.stream.Materializer):pekko.stream.scaladsl.Source[T,scala.concurrent.Future[reactivemongo.pekkostream.State]]) returns an `Source[T, Future[State]]` (with `Future[State]` representing the completion of the asynchronous materialization). In this case, we get a producer of documents (of type `BSONDocument`).
The operation [`PekkoStreamCursor.documentSource`](https://oss.sonatype.org/service/local/repositories/releases/archive/org/reactivemongo/reactivemongo-pekkostream_{{site._1_0_scala_major}}/{{site._1_0_latest_minor}}/reactivemongo-pekkostream_{{site._1_0_scala_major}}-{{site._1_0_latest_minor}}-javadoc.jar/!/index.html#reactivemongo.pekkostream.PekkoStreamCursor#documentSource(maxDocs:Int,err:reactivemongo.api.Cursor.ErrorHandler[Option[T]])(implicitm:org.apache.pekko.stream.Materializer):org.apache.pekko.stream.scaladsl.Source[T,scala.concurrent.Future[reactivemongo.pekkostream.State]]) returns an `Source[T, Future[State]]` (with `Future[State]` representing the completion of the asynchronous materialization). In this case, we get a producer of documents (of type `BSONDocument`).

Now that we have the producer, we need to define how the documents are processed, using a `Sink` or a `Flow` (with transformations).

Expand All @@ -152,9 +152,9 @@ Obviously, we may use a pure `Sink` that performs some computation.
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global

import pekko.NotUsed
import pekko.stream.Materializer
import pekko.stream.scaladsl.{ Sink, Source }
import org.apache.pekko.NotUsed
import org.apache.pekko.stream.Materializer
import org.apache.pekko.stream.scaladsl.{ Sink, Source }

import reactivemongo.api.bson.BSONDocument

Expand Down

0 comments on commit d31662b

Please sign in to comment.