Skip to content

Commit

Permalink
Support .net 6 (#22)
Browse files Browse the repository at this point in the history
* Upgrade to Java 17

* Update build to run on ubuntu-20.04

* Create build_spec.yaml

* Update README.md, CONTRIBUTING.md, SECURITY.md according to the guidelines in template. (#14)

* correct link to Coherence CE readme file. (#15)

* Fix intermittent failure: Tangosol.net.cache.cache.TestShouldInterruptWithGetCache (#17)

* fix CacheTimeoutTest.cs

* fix path

* Modify build to capture server log upon error (#19)

* BUG 35023368 - CQC clients deadlock between ObservableHashMap and ContinuousQueryCache.ensureSynchronized (#20)

[git-p4: depot-paths = "//dev/main.net/": change = 98220]

* cleaned up dependency to support .NET 6

---------

Co-authored-by: Alex Gleyzer <[email protected]>
Co-authored-by: Jonathan Knight <[email protected]>
Co-authored-by: Chinmay Patel <[email protected]>
Co-authored-by: Ryan Lubke <[email protected]>
  • Loading branch information
5 people authored Apr 19, 2023
1 parent 48ae33a commit bc2f715
Show file tree
Hide file tree
Showing 9 changed files with 120 additions and 52 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
os: [ubuntu-20.04, windows-latest, macOS-latest]

steps:
- name: Checkout
Expand All @@ -51,7 +51,7 @@ jobs:
test-linux:
name: Test on Linux against Coherence ${{ matrix.coherence_version }}
needs: build
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -104,3 +104,11 @@ jobs:
# Run Tests
- name: Run Tests
run: dotnet test --configuration Release --no-restore

# Capture server log for diagnosing failures
- name: Capture test logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: build-output
path: build\**\*.log
76 changes: 44 additions & 32 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,68 @@
<!--
Copyright (c) 2000, 2020, Oracle and/or its affiliates.
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at
http://oss.oracle.com/licenses/upl.
https://oss.oracle.com/licenses/upl.
-->
# Contributing to Coherence
# Contributing to this repository

Oracle welcomes contributions to this repository from anyone.
We welcome your contributions! There are multiple ways to contribute.

If you want to submit a pull request to fix a bug or enhance an existing
feature, please first open an issue and link to that issue when you
submit your pull request.
## Opening issues

If you have any questions about a possible submission, feel free to open
an issue too.
For bugs or enhancement requests, please file a GitHub issue unless it's
security related. When filing a bug remember that the better written the bug is,
the more likely it is to be fixed. If you think you've found a security
vulnerability, do not raise a GitHub issue and follow the instructions in our
[security policy](./SECURITY.md).

## Contributing to the Oracle Coherence Community Edition repository
## Contributing code

Pull requests can be made under
[The Oracle Contributor Agreement](https://www.oracle.com/technetwork/community/oca-486395.html) (OCA).
We welcome your code contributions. Before submitting code via a pull request,
you will need to have signed the [Oracle Contributor Agreement][OCA] (OCA) and
your commits need to include the following line using the name and e-mail
address you used to sign the OCA:

For pull requests to be accepted, the bottom of your commit message must have
the following line using your name and e-mail address as it appears in the
OCA Signatories list.

```
```text
Signed-off-by: Your Name <[email protected]>
```

This can be automatically added to pull requests by committing with:
This can be automatically added to pull requests by committing with `--sign-off`
or `-s`, e.g.

```
git commit --signoff
```text
git commit --signoff
```

Only pull requests from committers that can be verified as having
signed the OCA can be accepted.
Only pull requests from committers that can be verified as having signed the OCA
can be accepted.

### Pull request process
## Pull request process

1. Fork this repository
1. Ensure there is an issue created to track and discuss the fix or enhancement
you intend to submit.
1. Fork this repository.
1. Create a branch in your fork to implement the changes. We recommend using
the issue number as part of your branch name, e.g. `1234-fixes`
1. Ensure that all changes comply to project coding conventions as documented [here](DEV-GUIDELINES.md)
the issue number as part of your branch name, e.g. `1234-fixes`.
1. Ensure that any documentation is updated with the changes that are required
by your change.
1. Ensure that any samples are updated if the base image has been changed.
1. Ensure that all changes comply to project coding conventions as documented
[here](DEV-GUIDELINES.md)
1. Ensure that there is at least one test that would fail without the fix and
passes post fix
1. A full build including test execution is required for the PR
passes post fix.
1. Submit the pull request. *Do not leave the pull request blank*. Explain exactly
what your changes are meant to do and provide simple steps on how to validate
your changes, ideally referencing the test. Ensure that you reference the issue
you created as well. We will assign the pull request to 2-3 people for review
before it is submitted internally and the PR is closed.
what your changes are meant to do and provide simple steps on how to validate
your changes. Ensure that you reference the issue you created as well.
1. We will assign the pull request to 2-3 people for review before it is submitted
internally and the PR is closed.

## Code of conduct

Follow the [Golden Rule](https://en.wikipedia.org/wiki/Golden_Rule). If you'd
like more specific guidelines, see the [Contributor Covenant Code of Conduct][COC].

[OCA]: https://oca.opensource.oracle.com
[COC]: https://www.contributor-covenant.org/version/1/4/code-of-conduct/
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!--
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at
http://oss.oracle.com/licenses/upl.
https://oss.oracle.com/licenses/upl.
-->

Expand Down Expand Up @@ -53,7 +53,7 @@ distributed applications.

# <a name="acquire"></a>How to Get Coherence Community Edition

For more details on how to obtain and use Coherence, please see the Coherence CE [README](https://github.com/oracle/coherence/README.md).
For more details on how to obtain and use Coherence, please see the Coherence CE [README](https://github.com/oracle/coherence/tree/master/README.md).

# <a name="intro_extend"></a>Introduction to Coherence for .NET

Expand Down Expand Up @@ -164,7 +164,7 @@ dotnet new console -name "HelloCoherence"
1. Add the following references to the HelloCoherence.csproj (provide the Coherence.Core.dll location in the `<HintPath>`):
```
<ItemGroup>
<Reference Include="Coherence.Core, Version=14.1.1.10, Culture=neutral, PublicKeyToken=0ada89708fdf1f9a, processorArchitecture=MSIL">
<Reference Include="Coherence.Core, Version=14.1.1.13, Culture=neutral, PublicKeyToken=0ada89708fdf1f9a, processorArchitecture=MSIL">
<HintPath>Coherence.Core.dll</HintPath>
</Reference>
<PackageReference Include="Common.Logging" Version="3.4.1" />
Expand Down Expand Up @@ -441,3 +441,6 @@ For further details on developing Coherence for .NET applications, see the docum

Interested in contributing? Please see our contribution [guidelines](CONTRIBUTING.md) for details.

# Security

Please consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process
47 changes: 38 additions & 9 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,46 @@
# Reporting Security Vulnerabilities
<!--
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Oracle values the independent security research community and believes that responsible disclosure of security vulnerabilities helps us ensure the security and privacy of all our users.
Licensed under the Universal Permissive License v 1.0 as shown at
https://oss.oracle.com/licenses/upl.
-->

Please do NOT raise a GitHub Issue to report a security vulnerability. If you believe you have found a security vulnerability, please submit a report to [email protected] preferably with a proof of concept. We provide additional information on [how to report security vulnerabilities to Oracle](https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html) which includes public encryption keys for secure email.
-----
# Reporting security vulnerabilities

We ask that you do not use other channels or contact project contributors directly.
Oracle values the independent security research community and believes that
responsible disclosure of security vulnerabilities helps us ensure the security
and privacy of all our users.

Non-vulnerability related security issues such as great new ideas for security features are welcome on GitHub Issues.
Please do NOT raise a GitHub Issue to report a security vulnerability. If you
believe you have found a security vulnerability, please submit a report to
[[email protected]][1] preferably with a proof of concept. Please review
some additional information on [how to report security vulnerabilities to Oracle][2].
We encourage people who contact Oracle Security to use email encryption using
[our encryption key][3].

## Security Updates, Alerts and Bulletins
We ask that you do not use other channels or contact the project maintainers
directly.

Security updates will be released on a regular cadence. Many of our projects will typically release security fixes in conjunction with the [Oracle Critical Patch Update](https://www.oracle.com/security-alerts/) program. Security updates are released on the Tuesday closest to the 17th day of January, April, July and October. A pre-release announcement will be published on the Thursday preceding each release. Additional information, including past advisories, is available on our [Security Alerts](https://www.oracle.com/security-alerts/) page.
Non-vulnerability related security issues including ideas for new or improved
security features are welcome on GitHub Issues.

## Security-Related Information
## Security updates, alerts and bulletins

We will provide security related information such as a threat model, considerations for secure use, or any known security issues in our documentation. Please note that labs and sample code are intended to demonstrate a concept and may not be sufficiently hardened for production use.
Security updates will be released on a regular cadence. Many of our projects
will typically release security fixes in conjunction with the
[Oracle Critical Patch Update][3] program. Additional
information, including past advisories, is available on our [security alerts][4]
page.

## Security-related information

We will provide security related information such as a threat model, considerations
for secure use, or any known security issues in our documentation. Please note
that labs and sample code are intended to demonstrate a concept and may not be
sufficiently hardened for production use.

[1]: mailto:[email protected]
[2]: https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html
[3]: https://www.oracle.com/security-alerts/encryptionkey.html
[4]: https://www.oracle.com/security-alerts/
16 changes: 16 additions & 0 deletions build_spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (c) 2022, 2023, Oracle and/or its affiliates.

version: 0.1
component: build
timeoutInSeconds: 1000
shell: bash

steps:
- type: Command
name: "compress the repo"
command: |
tar -cvzf ${OCI_WORKSPACE_DIR}/repo.tgz ./
outputArtifacts:
- name: artifact
type: BINARY
location: ${OCI_WORKSPACE_DIR}/repo.tgz
2 changes: 1 addition & 1 deletion src/Coherence.Core/Coherence.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<!-- AssemblyInfo metadata -->
<PropertyGroup>
<VersionPrefix Condition="'$(VersionPrefix)' == ''">14.1.1.10</VersionPrefix>
<VersionPrefix Condition="'$(VersionPrefix)' == ''">14.1.1.13</VersionPrefix>
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix)</Version>
<Version Condition=" '$(Version)' == '' ">$(VersionPrefix)</Version>
<AssemblyVersion>$(VersionPrefix)</AssemblyVersion>
Expand Down
1 change: 0 additions & 1 deletion src/Coherence.Core/IO/Resources/ResourceLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/
using System;
using System.Reflection;
using System.Web;

namespace Tangosol.IO.Resources
{
Expand Down
6 changes: 3 additions & 3 deletions tests/Coherence.Core.Tests/Net/Cache/CacheTimeoutTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void TestShouldInterruptWithGetCache()
{
try
{
using (ThreadTimeout t = ThreadTimeout.After(200))
using (ThreadTimeout t = ThreadTimeout.After(100))
{
INamedCache cache = GetCache("dist-timeout");
for (int i = 0; i < 1000; i++)
Expand All @@ -53,16 +53,16 @@ public void TestShouldInterruptWithGetCache()
Assert.Fail("CacheFactory.GetCache should be interrupted!");
}
}
catch (Exception e)
catch (ThreadInterruptedException)
{
CacheFactory.Shutdown();
Assert.IsTrue(e is ThreadInterruptedException);
}

Assert.AreEqual(ThreadTimeout.RemainingTimeoutMillis, Int32.MaxValue);

try
{
IConfigurableCacheFactory ccf = CacheFactory.ConfigurableCacheFactory;
using (ThreadTimeout t = ThreadTimeout.After(40000))
{
INamedCache cache = GetCache("dist-timeout");
Expand Down
1 change: 1 addition & 0 deletions tests/test-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>-Dcoherence.log=..\..\build\DefaultCacheServer.log</argument>
<argument>com.tangosol.net.DefaultCacheServer</argument>
</arguments>
</configuration>
Expand Down

0 comments on commit bc2f715

Please sign in to comment.