Skip to content

Commit

Permalink
Merge branch 'v4' into handle-429
Browse files Browse the repository at this point in the history
  • Loading branch information
cleve-fauna authored Oct 26, 2023
2 parents 3135203 + 2513011 commit 0ab8d12
Show file tree
Hide file tree
Showing 28 changed files with 1,009 additions and 121 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ executors:
- image: fauna/faunadb:latest
name: core
environment:
SBT_VERSION: 1.4.7
SBT_VERSION: 1.7.2
FAUNA_ROOT_KEY: secret
FAUNA_DOMAIN: core
FAUNA_SCHEME: http
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/close-jira-ticket.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Set JIRA ticket to DONE

on:
issues:
types: [closed, deleted]

jobs:
set_done_for_closed_issued:
name: Set JIRA ticket to DONE
runs-on: ubuntu-latest
steps:
- name: Login
uses: atlassian/gajira-login@master
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}

- name: Find comment with ticket number
uses: peter-evans/find-comment@v1
id: comment
with:
issue-number: ${{ github.event.issue.number }}
body-includes: Internal ticket number is FE-

- name: Get ticket number
id: ticket
uses: atlassian/gajira-find-issue-key@master
with:
string: ${{ steps.comment.outputs.comment-body }}

- name: Close
uses: atlassian/gajira-transition@master
with:
issue: ${{ steps.ticket.outputs.issue }}
transition: 'DONE'
37 changes: 37 additions & 0 deletions .github/workflows/create-jira-ticket-from-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Create JIRA ticket for GH issue

on:
issues:
types: [opened]

jobs:
create_ticket_from_issue:
name: Create JIRA ticket
runs-on: ubuntu-latest
steps:
- name: Login
uses: atlassian/gajira-login@master
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}

- name: Create
id: create
uses: atlassian/gajira-create@master
with:
project: FE
issuetype: Bug
summary: Issue ${{ github.event.issue.number }} ${{ github.event.issue.title }}
description: ${{ github.event.issue.html_url }}
fields: '{"labels": ["github", "issue", "dx-ops"], "components": [{ "name": "Fauna Shell" }]}'

- name: Comment
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ github.event.issue.number }}
body: Internal ticket number is ${{ steps.create.outputs.issue }}

- name: Complete
if: ${{ steps.create.outputs.issue }}
run: echo "Issue ${{ steps.create.outputs.issue }} was created"
31 changes: 31 additions & 0 deletions .github/workflows/create-jira-ticket-from-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Create JIRA ticket for GH pull request

on:
pull_request:
types: [opened]

jobs:
create_ticket_from_pr:
name: Create JIRA ticket
runs-on: ubuntu-latest
steps:
- name: Login
uses: atlassian/gajira-login@master
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}

- name: Create
id: create
uses: atlassian/gajira-create@master
with:
project: FE
issuetype: Task
summary: Pull Request ${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }}
description: ${{ github.event.pull_request.html_url }}
fields: '{"labels": ["github", "pr", "dx-ops"], "components": [{ "name": "Fauna Shell" }]}'

- name: Complete
if: ${{ steps.create.outputs.issue }}
run: echo "Issue ${{ steps.create.outputs.issue }} was created"
7 changes: 7 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
4.4.0
* Support for tags and traceparent headers. PR: https://github.com/fauna/faunadb-jvm/pull/362

4.3.0
* Keep-alive timeouts set to 3 seconds. PR: https://github.com/fauna/faunadb-jvm/pull/342
* set-streaming enabled. PR: https://github.com/fauna/faunadb-jvm/pull/352

4.2.0
* Added TransactionContentionException in case 409 HTTP status code is returned from server

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ This repository contains the FaunaDB drivers for the JVM languages. Currently, J

Javadocs and Scaladocs are hosted on GitHub:

* [faunadb-java](http://fauna.github.io/faunadb-jvm/4.2.0/faunadb-java/api/)
* [faunadb-scala](http://fauna.github.io/faunadb-jvm/4.2.0/faunadb-scala/api/)
* [faunadb-java](http://fauna.github.io/faunadb-jvm/4.4.0/faunadb-java/api/)
* [faunadb-scala](http://fauna.github.io/faunadb-jvm/4.4.0/faunadb-scala/api/)

Details Documentation for each language:

Expand Down Expand Up @@ -54,7 +54,7 @@ Download from the Maven central repository:
<dependency>
<groupId>com.faunadb</groupId>
<artifactId>faunadb-java</artifactId>
<version>4.2.0</version>
<version>4.4.0</version>
<scope>compile</scope>
</dependency>
...
Expand Down Expand Up @@ -207,7 +207,7 @@ List<Value> events = capturedEvents.get();
##### faunadb-scala/sbt

```scala
libraryDependencies += ("com.faunadb" %% "faunadb-scala" % "4.2.0")
libraryDependencies += ("com.faunadb" %% "faunadb-scala" % "4.4.0")
```

##### Basic Usage
Expand Down
60 changes: 57 additions & 3 deletions concourse/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
---
resource_types:
- name: slack-notification
type: docker-image
source:
repository: cfcommunity/slack-notification-resource

resources:
- name: notify
type: slack-notification
source:
url: ((slack-webhook))

- name: fauna-jvm-repository
type: git
icon: github
source:
uri: https://github.com/fauna/faunadb-jvm.git
branch: main
branch: v4

- name: fauna-jvm-repository-docs
type: git
Expand All @@ -23,8 +34,47 @@ jobs:
- get: fauna-jvm-repository
- get: fauna-jvm-repository-docs

- task: integration-tests
file: fauna-jvm-repository/concourse/tasks/integration-tests.yml
- task: integration-tests-oracle-jdk11-scala-2-11
file: fauna-jvm-repository/concourse/tasks/integration-tests-oracle-jdk11-scala-2-11.yml
privileged: true
vars:
aws_access_key_id: ((concourse_aws_access_key_id))
aws_secret_access_key: ((concourse_aws_access_key_secret))
params:
FAUNA_ROOT_KEY: ((fauna.secret))
FAUNA_DOMAIN: ((fauna.domain))
FAUNA_SCHEME: ((fauna.scheme))
FAUNA_PORT: ((fauna.port))
AWS_ACCESS_KEY_ID: ((concourse_aws_access_key_id))
AWS_SECRET_ACCESS_KEY: ((concourse_aws_access_key_secret))
AWS_DEFAULT_REGION: us-east-2

- task: integration-tests-oracle-jdk11-scala-2-12
file: fauna-jvm-repository/concourse/tasks/integration-tests-oracle-jdk11-scala-2-12.yml
privileged: true
vars:
aws_access_key_id: ((concourse_aws_access_key_id))
aws_secret_access_key: ((concourse_aws_access_key_secret))
params:
FAUNA_ROOT_KEY: ((fauna.secret))
FAUNA_DOMAIN: ((fauna.domain))
FAUNA_SCHEME: ((fauna.scheme))
FAUNA_PORT: ((fauna.port))
AWS_ACCESS_KEY_ID: ((concourse_aws_access_key_id))
AWS_SECRET_ACCESS_KEY: ((concourse_aws_access_key_secret))
AWS_DEFAULT_REGION: us-east-2

- task: integration-tests-openjdk11-scala-2-11
file: fauna-jvm-repository/concourse/tasks/integration-tests-jdk11-scala-2-11.yml
privileged: true
params:
FAUNA_ROOT_KEY: ((fauna.secret))
FAUNA_DOMAIN: ((fauna.domain))
FAUNA_SCHEME: ((fauna.scheme))
FAUNA_PORT: ((fauna.port))

- task: integration-tests-openjdk11-scala-2-12
file: fauna-jvm-repository/concourse/tasks/integration-tests-jdk11-scala-2-12.yml
privileged: true
params:
FAUNA_ROOT_KEY: ((fauna.secret))
Expand All @@ -41,6 +91,10 @@ jobs:
GPG_PUBLIC_KEY: ((gpg_public_key))
GPG_PASSPHRASE: ((gpg_passphrase_escaped))
GPG_SIGNING_KEY: ((gpg_signing_key_escaped))
on_success:
put: notify
params:
text_file: slack-message/publish

- task: publish-docs
file: fauna-jvm-repository/concourse/tasks/publish-docs.yml
Expand Down
2 changes: 2 additions & 0 deletions concourse/scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ sbt faunadb-common/publishSigned
sbt faunadb-java/publishSigned
sbt +faunadb-scala/publishSigned
sbt sonatypeRelease

echo "faunadb-jvm@$PACKAGE_VERSION has been published (but sometimes it can take up to 2 days before it appears in maven repository) [fyi <@ewan.edwards>]" > ../slack-message/publish
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ platform: linux
image_resource:
type: registry-image
source:
repository: karlkfi/concourse-dcind
repository: shared-concourse-dind
aws_access_key_id: ((prod-images-aws-access-key-id))
aws_secret_access_key: ((prod-images-aws-secret-key))
aws_region: us-east-2

params:
FAUNA_ROOT_KEY:
Expand All @@ -21,7 +24,7 @@ run:
- -ceu
- |
# start containers
docker-compose -f fauna-jvm-repository/concourse/tasks/integration.yml run tests
docker-compose -f fauna-jvm-repository/concourse/tasks/integration.yml run tests-jdk-11-scala-2.11
# stop and remove containers
docker-compose -f fauna-jvm-repository/concourse/tasks/integration.yml down
# remove volumes
Expand Down
31 changes: 31 additions & 0 deletions concourse/tasks/integration-tests-jdk11-scala-2-12.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
platform: linux
image_resource:
type: registry-image
source:
repository: shared-concourse-dind
aws_access_key_id: ((prod-images-aws-access-key-id))
aws_secret_access_key: ((prod-images-aws-secret-key))
aws_region: us-east-2

params:
FAUNA_ROOT_KEY:
FAUNA_DOMAIN:
FAUNA_SCHEME:
FAUNA_PORT:

inputs:
- name: fauna-jvm-repository

run:
path: entrypoint.sh
args:
- bash
- -ceu
- |
# start containers
docker-compose -f fauna-jvm-repository/concourse/tasks/integration.yml run tests-jdk-11-scala-2.12
# stop and remove containers
docker-compose -f fauna-jvm-repository/concourse/tasks/integration.yml down
# remove volumes
docker volume rm $(docker volume ls -q)
39 changes: 39 additions & 0 deletions concourse/tasks/integration-tests-oracle-jdk11-scala-2-11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
platform: linux
image_resource:
type: registry-image
source:
repository: shared-concourse-dind
aws_access_key_id: ((prod-images-aws-access-key-id))
aws_secret_access_key: ((prod-images-aws-secret-key))
aws_region: us-east-2

params:
FAUNA_ROOT_KEY:
FAUNA_DOMAIN:
FAUNA_SCHEME:
FAUNA_PORT:
AWS_ACCESS_KEY_ID:
AWS_SECRET_ACCESS_KEY:
AWS_DEFAULT_REGION:

inputs:
- name: fauna-jvm-repository

run:
path: entrypoint.sh
args:
- bash
- -ceu
- |
apk add --no-cache python3 py3-pip && \
pip3 install --upgrade pip && \
pip3 install awscli \
&& rm -rf /var/cache/apk/* \
&& aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin 768923903788.dkr.ecr.us-east-2.amazonaws.com
# start containers
docker-compose -f fauna-jvm-repository/concourse/tasks/integration.yml run tests-oracle-jdk-11-scala-2.11
# stop and remove containers
docker-compose -f fauna-jvm-repository/concourse/tasks/integration.yml down
# remove volumes
docker volume rm $(docker volume ls -q)
39 changes: 39 additions & 0 deletions concourse/tasks/integration-tests-oracle-jdk11-scala-2-12.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
platform: linux
image_resource:
type: registry-image
source:
repository: shared-concourse-dind
aws_access_key_id: ((prod-images-aws-access-key-id))
aws_secret_access_key: ((prod-images-aws-secret-key))
aws_region: us-east-2

params:
FAUNA_ROOT_KEY:
FAUNA_DOMAIN:
FAUNA_SCHEME:
FAUNA_PORT:
AWS_ACCESS_KEY_ID:
AWS_SECRET_ACCESS_KEY:
AWS_DEFAULT_REGION:

inputs:
- name: fauna-jvm-repository

run:
path: entrypoint.sh
args:
- bash
- -ceu
- |
apk add --no-cache python3 py3-pip && \
pip3 install --upgrade pip && \
pip3 install awscli \
&& rm -rf /var/cache/apk/* \
&& aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin 768923903788.dkr.ecr.us-east-2.amazonaws.com
# start containers
docker-compose -f fauna-jvm-repository/concourse/tasks/integration.yml run tests-oracle-jdk-11-scala-2.12
# stop and remove containers
docker-compose -f fauna-jvm-repository/concourse/tasks/integration.yml down
# remove volumes
docker volume rm $(docker volume ls -q)
Loading

0 comments on commit 0ab8d12

Please sign in to comment.