From f6eb8191ab94990517c5cd865735cabb319503cf Mon Sep 17 00:00:00 2001 From: Ben Donnelly Date: Mon, 4 Sep 2023 12:57:27 +0100 Subject: [PATCH 1/4] chore(build): change docs to use latest build output --- .github/workflows/on_release.yml | 39 ++++++++++++++++++++++++++++++- .github/workflows/update_docs.yml | 35 ++++----------------------- 2 files changed, 43 insertions(+), 31 deletions(-) diff --git a/.github/workflows/on_release.yml b/.github/workflows/on_release.yml index 4e2df99..7e11e59 100644 --- a/.github/workflows/on_release.yml +++ b/.github/workflows/on_release.yml @@ -31,4 +31,41 @@ jobs: - name: Update java version run: mvn versions:set -DnewVersion=${VERSION} -B -U - name: Build and Release - run: mvn -s .ci-settings.xml clean deploy -DskipTests -P release-ossrh -B -U -pl agent,deep --also-make \ No newline at end of file + run: mvn -s .ci-settings.xml clean deploy -DskipTests -P release-ossrh -B -U -pl agent,deep --also-make + + - name: Upload release binary + uses: actions/upload-release-asset@v1.0.2 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.get_release.outputs.upload_url }} + asset_path: ./agent/target/deep-${VERSION}.jar + asset_name: Deep Agent + asset_content_type: application/octet-stream + + JavaSite: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: 'maven' + + - name: Package project + run: mvn clean package -DskipTests -U -B -P cf-it-tests,examples + + - name: Build site + run: mvn -U -B site:site site:stage -P docs,cf-it-tests,examples + + - name: Zip Site + run: tar -czf site.tar.gz target/staging + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: Maven Site + path: site.tar.gz \ No newline at end of file diff --git a/.github/workflows/update_docs.yml b/.github/workflows/update_docs.yml index 053727d..9459c40 100644 --- a/.github/workflows/update_docs.yml +++ b/.github/workflows/update_docs.yml @@ -13,33 +13,6 @@ permissions: jobs: - JavaSite: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'temurin' - cache: 'maven' - - - name: Package project - run: mvn clean package -DskipTests -U -B -P cf-it-tests,examples - - - name: Build site - run: mvn -U -B site:site site:stage -P docs,cf-it-tests,examples - - - name: Zip Site - run: tar -czf site.tar.gz target/staging - - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: Mvn docs - path: site.tar.gz - mkdocs: runs-on: ubuntu-latest steps: @@ -73,10 +46,12 @@ jobs: with: name: Mk docs path: _site - - name: Download mvn artifact - uses: actions/download-artifact@v3 + + - name: Download mvn site from latest + uses: robinraju/release-downloader@v1.8 with: - name: Mvn docs + latest: true + fileName: site.tar.gz - name: Unpack run: | From ef0b41731236d86f05d1d1cf827a80a55c25671a Mon Sep 17 00:00:00 2001 From: Ben Donnelly Date: Mon, 4 Sep 2023 12:59:21 +0100 Subject: [PATCH 2/4] chore(build): add issue and pr templates --- .github/ISSUE_TEMPLATE/bug_report.md | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ .github/pull_request_template.md | 15 +++++++++ 3 files changed, 73 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/pull_request_template.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..b2f6900 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** +- OS: [e.g. iOS] +- Browser [e.g. chrome, safari] +- Version [e.g. 22] + +**Smartphone (please complete the following information):** +- Device: [e.g. iPhone6] +- OS: [e.g. iOS8.1] +- Browser [e.g. stock browser, safari] +- Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..5be534d --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,15 @@ + + +**What this PR does**: + +**Which issue(s) this PR fixes**: +Fixes # + +**Checklist** +- [ ] Tests updated +- [ ] Documentation added +- [ ] `CHANGELOG.md` updated - the order of entries should be `[CHANGE]`, `[FEATURE]`, `[ENHANCEMENT]`, `[BUGFIX]` From c55d56072bcaa1b840abd9f1024053ea04e061ca Mon Sep 17 00:00:00 2001 From: Ben Donnelly Date: Mon, 4 Sep 2023 13:08:51 +0100 Subject: [PATCH 3/4] fix(test): fix issue with test not using dynamic port --- CHANGELOG.md | 21 +++++++++++++++++++ .../deep/agent/poll/LongPollServiceTest.java | 11 ++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..dca7893 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,21 @@ +# 1.1.0 (xx/xx/2023) + +- **[ENHANCEMENT]**: add unit tests for agent [#10](https://github.com/intergral/deep/pull/10) [@Umaaz](https://github.com/Umaaz) +- **[CHANGE]**: include bytebuddy in deep build [#12](https://github.com/intergral/deep/pull/12) [@Umaaz](https://github.com/Umaaz) +- **[CHANGE]**: add issue and PR templates [#14](https://github.com/intergral/deep/pull/14) [@Umaaz](https://github.com/Umaaz) +- **[CHANGE]**: change docs to use latest release maven site [#14](https://github.com/intergral/deep/pull/14) [@Umaaz](https://github.com/Umaaz) +- **[BUGFIX]**: fix doc generation [#13](https://github.com/intergral/deep/pull/13) [@Umaaz](https://github.com/Umaaz) + +# 1.0.5 (03/08/2023) + +- **[ENHANCEMENT]**: allow plugins to act as auth providers [#9](https://github.com/intergral/deep/pull/9) [@Umaaz](https://github.com/Umaaz) +- **[BUGFIX]**: fix case where jar path is not set [#8](https://github.com/intergral/deep/pull/8) [@Umaaz](https://github.com/Umaaz) + + diff --git a/agent/src/test/java/com/intergral/deep/agent/poll/LongPollServiceTest.java b/agent/src/test/java/com/intergral/deep/agent/poll/LongPollServiceTest.java index c062fad..0f204f8 100644 --- a/agent/src/test/java/com/intergral/deep/agent/poll/LongPollServiceTest.java +++ b/agent/src/test/java/com/intergral/deep/agent/poll/LongPollServiceTest.java @@ -46,6 +46,7 @@ import io.grpc.Server; import io.grpc.ServerBuilder; import java.io.IOException; +import java.net.ServerSocket; import java.util.Collection; import java.util.Collections; import java.util.HashMap; @@ -64,6 +65,7 @@ class LongPollServiceTest { private PollRequest request; private PollResponse response; private Throwable responseError; + private int port; @BeforeEach void setUp() throws IOException { @@ -77,12 +79,17 @@ void setUp() throws IOException { responseObserver.onCompleted(); }); - server = ServerBuilder.forPort(9999).addService(testPollService.bindService()).build(); + // find a free port + try (ServerSocket socket = new ServerSocket(0)) { + port = socket.getLocalPort(); + } + + server = ServerBuilder.forPort(port).addService(testPollService.bindService()).build(); server.start(); final HashMap agentArgs = new HashMap<>(); - agentArgs.put(ISettings.KEY_SERVICE_URL, "localhost:9999"); + agentArgs.put(ISettings.KEY_SERVICE_URL, "localhost:" + port); agentArgs.put(ISettings.KEY_SERVICE_SECURE, "false"); final Settings settings = Settings.build(agentArgs); settings.setResource(Resource.create(Collections.singletonMap("test", "resource"))); From 5bfec183fe016ea467a6a02bcfe304a8ea8b70b2 Mon Sep 17 00:00:00 2001 From: Ben Donnelly Date: Mon, 4 Sep 2023 13:11:06 +0100 Subject: [PATCH 4/4] fix(test): fix order in change log --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dca7893..e711058 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,9 @@ # 1.1.0 (xx/xx/2023) -- **[ENHANCEMENT]**: add unit tests for agent [#10](https://github.com/intergral/deep/pull/10) [@Umaaz](https://github.com/Umaaz) - **[CHANGE]**: include bytebuddy in deep build [#12](https://github.com/intergral/deep/pull/12) [@Umaaz](https://github.com/Umaaz) - **[CHANGE]**: add issue and PR templates [#14](https://github.com/intergral/deep/pull/14) [@Umaaz](https://github.com/Umaaz) - **[CHANGE]**: change docs to use latest release maven site [#14](https://github.com/intergral/deep/pull/14) [@Umaaz](https://github.com/Umaaz) +- **[ENHANCEMENT]**: add unit tests for agent [#10](https://github.com/intergral/deep/pull/10) [@Umaaz](https://github.com/Umaaz) - **[BUGFIX]**: fix doc generation [#13](https://github.com/intergral/deep/pull/13) [@Umaaz](https://github.com/Umaaz) # 1.0.5 (03/08/2023) @@ -14,8 +14,8 @@