-
Notifications
You must be signed in to change notification settings - Fork 1
Add dev container configuration to fix Copilot agent build timeouts #46
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
Add dev container configuration to fix Copilot agent build timeouts #46
Conversation
Co-authored-by: trask <[email protected]>
Co-authored-by: trask <[email protected]>
trask
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this PR so much different from microsoft/ApplicationInsights-Java#4342? what are the pros and cons of each?
I can't access the ApplicationInsights-Java PR due to organization restrictions, but I can explain the key design decisions in this implementation: This PR's approach:
Typical alternative approaches might include:
The main advantages of this approach are better caching persistence, faster setup times (dependencies only vs full builds), and comprehensive validation. The trade-off is slightly more complex configuration files. |
Co-authored-by: trask <[email protected]>
Co-authored-by: trask <[email protected]>
Co-authored-by: trask <[email protected]>
…EADME Co-authored-by: trask <[email protected]>
…settings Co-authored-by: trask <[email protected]>
…e image Co-authored-by: trask <[email protected]>
…ation, remove validation script Co-authored-by: trask <[email protected]>
Problem
GitHub Copilot agents were timing out when building the OpenTelemetry Java Instrumentation project because builds were taking over 5 minutes. This was primarily due to:
Solution
This PR implements a comprehensive dev container configuration following the GitHub Copilot agent optimization guidelines to preinstall tools and dependencies.
Key Components
1. Dev Container Configuration (
.devcontainer/devcontainer.json).java-version2. Optimized Base Image (
.devcontainer/Dockerfile)3. Environment Warm-up (
.devcontainer/post-create.sh)4. Enhanced Build Configuration
resolveDependenciesGradle task for systematic dependency cachingExpected Performance Improvements
Validation
The setup includes comprehensive validation:
.devcontainer/validate-setup.sh)Documentation
.devcontainer/README.md- User guide and overview.devcontainer/IMPLEMENTATION.md- Technical implementation detailsTesting
Impact
This change will:
The configuration automatically applies to GitHub Copilot agents and any development environment that supports dev containers (VS Code, GitHub Codespaces, etc.).
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
scans-in.gradle.com/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.14.3-bin/cv11ve7ro1n3o1j4so8xd9n66/gradle-8.14.3/lib/gradle-daemon-main-8.14.3.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.14.3-bin/cv11ve7ro1n3o1j4so8xd9n66/gradle-8.14.3/lib/agents/gradle-instrumentation-agent-8.14.3.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.14.3(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.