-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implement phase 03 of merge to monorepo plan #1369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
edburns
merged 6 commits into
main
from
edburns/80-java-monorepo-phase-03-seeking-review
May 22, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
30e1c34
Add Java publish workflows, smoke test, and release scripts for monorepo
edburns 36a505f
Merge branch 'main' into edburns/80-java-monorepo-phase-03-seeking-re…
edburns 8202b04
Remove Java-specific CHANGELOG; use monorepo's release-changelog agen…
edburns 728a54a
Recompile workflows
edburns 73cdf98
Merge branch 'main' into edburns/80-java-monorepo-phase-03-seeking-re…
edburns f7c5630
Merge branch 'main' into edburns/80-java-monorepo-phase-03-seeking-re…
edburns File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
edburns marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,161 @@ | ||
| name: "Java smoke test" | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| workflow_call: | ||
| secrets: | ||
| COPILOT_GITHUB_TOKEN: | ||
| required: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| smoke-test-jdk17: | ||
| name: Build SDK and run smoke test (JDK 17) | ||
| runs-on: ubuntu-latest | ||
| if: github.ref == 'refs/heads/main' | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| working-directory: ./java | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 | ||
| with: | ||
| java-version: "17" | ||
| distribution: "microsoft" | ||
| cache: "maven" | ||
|
|
||
| - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v6 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Read pinned @github/copilot version from pom.xml | ||
| id: cli-version | ||
| run: | | ||
| PROP="readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync" | ||
| VERSION=$(sed -n "s|.*<${PROP}>\(.*\)</${PROP}>.*|\1|p" pom.xml | head -n 1 | tr -d '[:space:]') | ||
| if [[ -z "$VERSION" || "$VERSION" == "PRIMER_TO_REPLACE" ]]; then | ||
| echo "::error::Could not read pinned @github/copilot version from pom.xml property <${PROP}>" >&2 | ||
| exit 1 | ||
| fi | ||
| echo "Pinned @github/copilot version: $VERSION" | ||
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Install Copilot CLI globally (pinned to pom.xml version) | ||
| run: npm install -g "@github/copilot@${{ steps.cli-version.outputs.version }}" | ||
|
|
||
| - name: Verify CLI works | ||
| run: copilot --version | ||
|
|
||
| - name: Build SDK and install to local repo | ||
| run: mvn -DskipTests -Pskip-test-harness clean install | ||
|
|
||
| - name: Create and run smoke test via Copilot CLI | ||
| env: | ||
| COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} | ||
| run: | | ||
| cat > /tmp/smoke-test-prompt.txt << 'PROMPT_EOF' | ||
| You are running inside the copilot-sdk monorepo, in the java/ subdirectory. | ||
| The SDK has already been built and installed into the local Maven repository. | ||
| JDK 17 and Maven are already installed and on PATH. | ||
|
edburns marked this conversation as resolved.
|
||
|
|
||
| Execute the prompt at `src/test/prompts/PROMPT-smoke-test.md` with the following critical overrides: | ||
|
|
||
| **Critical override — disable SNAPSHOT updates (but allow downloads):** The goal of this workflow is to validate the SDK SNAPSHOT that was just built and installed locally, not any newer SNAPSHOT that might exist in a remote repository. To ensure Maven does not download a newer timestamped SNAPSHOT of the SDK while still allowing it to download any missing plugins or dependencies, you must run the smoke-test Maven build without `-U` and with `--no-snapshot-updates`, so that it uses the locally installed SDK artifact. Use `mvn --no-snapshot-updates clean package` instead of `mvn -U clean package` or `mvn -o clean package`. | ||
|
|
||
| **Critical override — do NOT run the jar:** Stop after the `mvn --no-snapshot-updates clean package` build succeeds. Do NOT execute Step 4 (java -jar) or Step 5 (verify exit code) from the prompt. The workflow will run the jar in a separate deterministic step to guarantee the exit code propagates correctly. | ||
|
|
||
| Follow steps 1-3 only: create the `smoke-test/` directory, create `pom.xml` and the Java source file exactly as specified, and build with `mvn --no-snapshot-updates clean package` (no SNAPSHOT updates and without `-U`). | ||
|
|
||
| If any step fails, exit with a non-zero exit code. Do not silently fix errors. | ||
| PROMPT_EOF | ||
|
|
||
| copilot --yolo --prompt "$(cat /tmp/smoke-test-prompt.txt)" | ||
|
edburns marked this conversation as resolved.
|
||
|
|
||
| - name: Run smoke test jar | ||
| env: | ||
| COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} | ||
| run: | | ||
| cd smoke-test | ||
| java -jar ./target/copilot-sdk-smoketest-1.0-SNAPSHOT.jar | ||
| echo "Smoke test passed (exit code 0)" | ||
|
|
||
| smoke-test-java25: | ||
| name: Build SDK and run smoke test (JDK 25) | ||
| runs-on: ubuntu-latest | ||
| if: github.ref == 'refs/heads/main' | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| working-directory: ./java | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
||
| - name: Set up JDK 25 | ||
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 | ||
| with: | ||
| java-version: "25" | ||
| distribution: "microsoft" | ||
| cache: "maven" | ||
|
|
||
| - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v6 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Read pinned @github/copilot version from pom.xml | ||
| id: cli-version | ||
| run: | | ||
| PROP="readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync" | ||
| VERSION=$(sed -n "s|.*<${PROP}>\(.*\)</${PROP}>.*|\1|p" pom.xml | head -n 1 | tr -d '[:space:]') | ||
| if [[ -z "$VERSION" || "$VERSION" == "PRIMER_TO_REPLACE" ]]; then | ||
| echo "::error::Could not read pinned @github/copilot version from pom.xml property <${PROP}>" >&2 | ||
| exit 1 | ||
| fi | ||
| echo "Pinned @github/copilot version: $VERSION" | ||
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Install Copilot CLI globally (pinned to pom.xml version) | ||
| run: npm install -g "@github/copilot@${{ steps.cli-version.outputs.version }}" | ||
|
|
||
| - name: Verify CLI works | ||
| run: copilot --version | ||
|
|
||
| - name: Build SDK and install to local repo | ||
| run: mvn -DskipTests -Pskip-test-harness clean install | ||
|
|
||
| - name: Create and run smoke test via Copilot CLI | ||
| env: | ||
| COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} | ||
| run: | | ||
| cat > /tmp/smoke-test-prompt.txt << 'PROMPT_EOF' | ||
| You are running inside the copilot-sdk monorepo, in the java/ subdirectory. | ||
| The SDK has already been built and installed into the local Maven repository. | ||
| JDK 25 and Maven are already installed and on PATH. | ||
|
|
||
| Execute the prompt at `src/test/prompts/PROMPT-smoke-test.md` with the following critical overrides: | ||
|
|
||
| **Critical override — disable SNAPSHOT updates (but allow downloads):** The goal of this workflow is to validate the SDK SNAPSHOT that was just built and installed locally, not any newer SNAPSHOT that might exist in a remote repository. To ensure Maven does not download a newer timestamped SNAPSHOT of the SDK while still allowing it to download any missing plugins or dependencies, you must run the smoke-test Maven build without `-U` and with `--no-snapshot-updates`, so that it uses the locally installed SDK artifact. Use `mvn --no-snapshot-updates clean package` instead of `mvn -U clean package` or `mvn -o clean package`. | ||
|
|
||
| **Critical override — do NOT run the jar:** Stop after the `mvn --no-snapshot-updates clean package` build succeeds. Do NOT execute Step 4 (java -jar) or Step 5 (verify exit code) from the prompt. The workflow will run the jar in a separate deterministic step to guarantee the exit code propagates correctly. | ||
|
|
||
| **Critical override — enable Virtual Threads for JDK 25:** After creating the Java source file from the README "Quick Start" section but BEFORE building, you must modify the source file to enable virtual thread support. The Quick Start code contains inline comments that start with `// JDK 25+:` — these are instructions. Find every such comment and follow what it says (comment out lines it says to comment out, uncomment lines it says to uncomment). Add any imports required by the newly uncommented code (e.g. `java.util.concurrent.Executors`). | ||
| Also set `maven.compiler.source` and `maven.compiler.target` to `25` in the `pom.xml`. | ||
|
|
||
| Follow steps 1-3 only: create the `smoke-test/` directory, create `pom.xml` and the Java source file exactly as specified, apply the JDK 25 virtual thread modifications described above, and build with `mvn --no-snapshot-updates clean package` (no SNAPSHOT updates and without `-U`). | ||
|
|
||
| If any step fails, exit with a non-zero exit code. Do not silently fix errors. | ||
| PROMPT_EOF | ||
|
|
||
| copilot --yolo --prompt "$(cat /tmp/smoke-test-prompt.txt)" | ||
|
edburns marked this conversation as resolved.
|
||
|
|
||
| - name: Run smoke test jar | ||
| env: | ||
| COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} | ||
| run: | | ||
| cd smoke-test | ||
| java -jar ./target/copilot-sdk-smoketest-1.0-SNAPSHOT.jar | ||
| echo "Smoke test passed (exit code 0)" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Installation | ||
|
|
||
| ℹ️ **Public Preview:** This is the official Java SDK for GitHub Copilot. This repository treats the official .NET and Node.js SDKs for GitHub Copilot as reference implementations. These SDKs are all officially supported as GitHub open source projects. The Java implementation follows the backward compatibility guarantees offered by the reference implementations. | ||
|
|
||
| ⚠️ **Artifact versioning plan:** Releases of this implementation track releases of the reference implementation. For each release of the reference implementation, there may follow a corresponding release of this implementation with the same number as the reference implementation. Release identifiers of the reference implementation are in the form `vMaj.Min.Micro`. For example v0.1.32. The corresponding maven version for the release will be `Maj.Min.Micro-java.N`, where `Maj`, `Min` and `Micro` are the corresponding numbers for the reference implementation release, and `N` is a monotonically increasing sequence number starting with 0 for each release. See the corresponding architectural decision record for more information in the `docs/adr` directory of the source code. | ||
|
|
||
| 📦 [View on Maven Central](https://central.sonatype.com/artifact/${GROUP_ID}/${ARTIFACT_ID}/${VERSION}) | ||
|
|
||
| ## Maven | ||
| ```xml | ||
| <dependency> | ||
| <groupId>${GROUP_ID}</groupId> | ||
| <artifactId>${ARTIFACT_ID}</artifactId> | ||
| <version>${VERSION}</version> | ||
| </dependency> | ||
| ``` | ||
|
|
||
| ## Gradle (Kotlin DSL) | ||
| ```kotlin | ||
| implementation("${GROUP_ID}:${ARTIFACT_ID}:${VERSION}") | ||
| ``` | ||
|
|
||
| ## Gradle (Groovy DSL) | ||
| ```groovy | ||
| implementation '${GROUP_ID}:${ARTIFACT_ID}:${VERSION}' | ||
| ``` |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.