Skip to content

Commit

Permalink
Add implementation and tests for the JobRunrProEventScheduler and Job…
Browse files Browse the repository at this point in the history
…RunrProDeadlineManager.
  • Loading branch information
Gerard Klijs committed Feb 17, 2023
1 parent 58fa817 commit 43b0acd
Show file tree
Hide file tree
Showing 24 changed files with 2,157 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ jobs:
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Set JobRunrPro credentials
uses: s4u/[email protected]
with:
servers: |
[{
"id": "JobRunrPro",
"username": "axoniq",
"password": "${{ secrets.JOB_RUNR_PRO_PASSWORD }}"
}]
- name: Regular Build
if: ${{ !matrix.sonar-enabled }}
run: |
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ jobs:
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Set JobRunrPro credentials
uses: s4u/[email protected]
with:
servers: |
[{
"id": "JobRunrPro",
"username": "axoniq",
"password": "${{ secrets.JOB_RUNR_PRO_PASSWORD }}"
}]
- name: Regular Build
if: ${{ !matrix.sonar-enabled }}
run: |
Expand Down
51 changes: 51 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Contribution Guidelines

Thank you for your interest in contributing to the Axon Framework JobRunr Pro Extension. To make sure using Axon is a smooth
experience for everybody, we've set up a number of guidelines to follow.

There are different ways in which you can contribute to the framework:

1. You can report any bugs, feature requests or ideas about improvements on
our [issue page](https://github.com/AxonFramework/extension-jobrunrpro/issues/new/choose). All ideas are welcome. Please
be as exact as possible when reporting bugs. This will help us reproduce and thus solve the problem faster.
2. If you have created a component for your own application that you think might be useful to include in the framework,
send us a pull request (or a patch / zip containing the source code). We will evaluate it and try to fit it in the
framework. Please make sure code is properly documented using JavaDoc. This helps us to understand what is going on.
3. If you know of any other way you think you can help us, do not hesitate to send a message to
the [AxonIQ's discussion platform](https://discuss.axoniq.io/).

## Code Contributions

If you're contributing code, please take care of the following:

### Contributor Licence Agreement

To keep everyone out of trouble (both you and us), we require that all contributors (digitally) sign a Contributor
License Agreement. Basically, the agreement says that we may freely use the code you contribute to the Axon Framework
Kafka Extension, and that we won't hold you liable for any unfortunate side effects that the code may cause.

To sign the CLA, visit: https://cla-assistant.io/AxonFramework/extension-jobrunrpro

### Code Style

We're trying very hard to maintain a consistent style of coding throughout the code base. Think of things like indenting
using 4 spaces, putting opening brackets (the '{') on the same line and putting proper JavaDoc on all non-private
members.

If you're using IntelliJ IDEA, you can download the code style
definition [here](https://github.com/AxonFramework/AxonFramework/blob/master/axon_code_style.xml). Simply import the XML
file in under "Settings -> Code Style -> Scheme -> Import Scheme". Doing so should make the code style selectable
immediately.

### Project Build

The project is built with Apache Maven, supplied by the Maven Wrapper `mvnw`. For separate aspects of the build Maven
profiles are used.

For a **regular** build, execute from your command line: `./mvnw`. This operation will run the build and execute JUnit
tests of all modules and package the resulting artifacts.

This repository contains an example project. You can skip its build by adding `-DskipExamples` to your build command.

If you are interested in the overall test coverage, please run `./mvnw clean verify -Pcoverage`, and check the resulting aggregated report in `./coverage-report/target/site/jacoco-aggregate/index.html`

63 changes: 63 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Axon Framework - JobRunr Pro Extension

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.axonframework.extensions.mongo/axon-jobrunrpro/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.axonframework.extensions.jobrunrpro/axon-jobrunrpro/)
![Build Status](https://github.com/AxonFramework/extension-jobrunrpro/workflows/JobRunr%20Pro%20Extension/badge.svg?branch=main)
[![SonarCloud Status](https://sonarcloud.io/api/project_badges/measure?project=AxonFramework_extension-jobrunrpro&metric=alert_status)](https://sonarcloud.io/dashboard?id=AxonFramework_extension-jobrunrpro)

Axon Framework is a framework for building evolutionary, event-driven microservice systems,
based on the principles of Domain Driven Design, Command-Query Responsibility Segregation (CQRS) and Event Sourcing.

As such it provides you the necessary building blocks to follow these principles.
Building blocks like Aggregate factories and Repositories, Command, Event and Query Buses and an Event Store.
The framework provides sensible defaults for all of these components out of the box.

This set up helps you create a well structured application without having to bother with the infrastructure.
The main focus can thus become your business functionality.

This repository provides an extension to the Axon Framework: JobRunr Pro.
It provides functionality to leverage JobRunr to store and execute jobs. In particular and implementation for both an
event scheduler and a deadline manager, that allows deleting jobs by their label.

For more information on anything Axon, please visit our website, [http://axoniq.io](http://axoniq.io).

## Getting started

The [reference guide](https://docs.axoniq.io) contains a separate chapter for all the extensions.
The jobRunr Pro extension description can be found [here](https://docs.axoniq.io/reference-guide/extensions/jobrunrpro).

## Receiving help

Are you having trouble using the extension?
We'd like to help you out the best we can!
There are a couple of things to consider when you're traversing anything Axon:

* Checking the [reference guide](https://docs.axoniq.io/reference-guide/extensions/jobrunrpro) should be your first
stop,
as the majority of possible scenarios you might encounter when using Axon should be covered there.
* If the Reference Guide does not cover a specific topic you would've expected,
we'd appreciate if you could file an [issue](https://github.com/AxonIQ/reference-guide/issues) about it for us.
* There is a [forum](https://discuss.axoniq.io/) to support you in the case the reference guide did not sufficiently
answer your question.
Axon Framework and Server developers will help out on a best effort basis.
Know that any support from contributors on posted question is very much appreciated on the forum.
* Next to the forum we also monitor Stack Overflow for any questions which are tagged with `axon`.

## Feature requests and issue reporting

We use GitHub's [issue tracking system](https://github.com/AxonFramework/extension-jobrunrpro/issues) for new feature
request, extension enhancements and bugs.
Prior to filing an issue, please verify that it's not already reported by someone else.

When filing bugs:

* A description of your setup and what's happening helps us figure out what the issue might be
* Do not forget to provide version you're using
* If possible, share a stack trace, using the Markdown semantic ```

When filing features:

* A description of the envisioned addition or enhancement should be provided
* (Pseudo-)Code snippets showing what it might look like help us understand your suggestion better
* If you have any thoughts on where to plug this into the framework, that would be very helpful too
* Lastly, we value contributions to the framework highly. So please provide a Pull Request as well!

71 changes: 71 additions & 0 deletions coverage-report/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2010-2023. Axon Framework
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.axonframework.extensions.jobrunrpro</groupId>
<artifactId>axon-jobrunrpro-parent</artifactId>
<version>4.8.0-SNAPSHOT</version>
</parent>

<artifactId>coverage-report</artifactId>

<name>Axon Framework JobRunr Pro Extension - Coverage Report</name>
<description>Project depending on all modules to construct a combined coverage report</description>

<dependencies>
<dependency>
<groupId>org.axonframework.extensions.jobrunrpro</groupId>
<artifactId>axon-jobrunrpro</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.axonframework.extensions.jobrunrpro</groupId>
<artifactId>axon-jobrunrpro-spring-boot-autoconfigure</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.axonframework.extensions.jobrunrpro</groupId>
<artifactId>axon-jobrunrpro-spring-boot-3-integrationtests</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>report-aggregate</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit 43b0acd

Please sign in to comment.