-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(array): temporal workflow for sandbox environment #39082
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
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
8386889
feat(array): add sandbox snapshots
joshsny bf71939
Merge branch 'master' into array/sandbox-snapshots
joshsny 4c5fe76
make integration nullable
joshsny 2065db5
Merge branch 'array/sandbox-snapshots' of https://github.com/posthog/…
joshsny bb8a824
fix lint issues
joshsny 66c2e92
(wip) add sandbox related activities
joshsny 509e4e4
wip splitting out repo setup in temporal
joshsny a471b21
wip moving to sandbox flow
joshsny 76b0b0a
wip - new temporal workflow
joshsny 5c0c756
wip testing temporal flow
joshsny 029bba8
wip activities tests
joshsny 7546364
wip get sandbox for setup tests
joshsny 000b55e
tests for get sandbox for setup
joshsny 990fcf7
add default ttl, fix clone repo output, setup repo activity tests
joshsny dacaaa5
add tests for setup repository
joshsny 1a68c7e
add more tests, add snapshot deletion functionality
joshsny 844f118
add tests for cleanup and task execution
joshsny d02efa2
wip tests for creating sandbox from a snapshot
joshsny da488d5
add some workflow tests, update output of workflow
joshsny 392be71
add support for sandbox environment flow based off a falg
joshsny 2b282ef
add asyncify util for sync code in temporal, use it in some activities
joshsny 5725649
add sandbox metadata
joshsny 39a442b
add task for fetching latest github token and injecting
joshsny 3037fea
add steps for injecting and cleaning up personal api key, fix issues …
joshsny ca85a5d
update tests for injecting api key
joshsny 97fe254
update conftest
joshsny 2ab71f9
update workflow tests, update test snapshots
joshsny b2bc69f
drop sandbox agent tests as they are covered elsewhere
joshsny 3cf3c48
full workflow
joshsny b6cb346
Merge branch 'master' into array/sandbox-snapshot-activities
joshsny 2bdd4b1
add better error handling and observability
joshsny 6fdc34c
more activity logging
joshsny 8c28c0e
merge migrations
joshsny e5d4eec
update exceptions to be non retriable for fatal errors, add track wo…
joshsny 62ddb7e
drop index migration
joshsny bd756ef
update tests to use accurate errors
joshsny 5a817a2
add temporal tests
joshsny 4c07fc4
type fixes
joshsny 7ef6322
fix test errors
joshsny 22bc092
type fixes, test cleanup
joshsny d9bbdf5
feat: add created_by to task
joshsny ba9b2da
please ci
joshsny 3557103
Merge branch 'master' into array/sandbox-snapshot-activities
joshsny f0a948e
suggested fixes
joshsny a3d7b08
fix task details
joshsny 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
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,19 @@ | ||
| SETUP_REPOSITORY_PROMPT = """ | ||
| Your goal is to setup the repository in the current environment. | ||
| You are operating in a sandbox environment. You must install all dependencies necessary and setup the environment such that it is ready for executing code tasks. | ||
| CONTEXT: | ||
| CWD: {cwd} | ||
joshsny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| REPOSITORY: {repository} | ||
| INSTRUCTIONS: | ||
| 1. Install all dependencies necessary to run the repository | ||
| 2. Run any setup scripts that are available | ||
| 3. Verify the setup by running tests or build if available | ||
| DO NOT make any code changes to the repository. The final state of the disk of this sandbox is what will be used for subsequent tasks, so do not leave any cruft behind, and make sure the repository is in a ready to use state. | ||
| """ | ||
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 @@ | ||
| # Generated by Django 4.2.22 on 2025-10-04 16:57 | ||
|
|
||
| import django.db.models.deletion | ||
| from django.conf import settings | ||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
| dependencies = [ | ||
| migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
| ("tasks", "0008_task_task_number"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AddField( | ||
| model_name="task", | ||
| name="created_by", | ||
joshsny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| field=models.ForeignKey( | ||
| blank=True, | ||
| db_index=False, | ||
| null=True, | ||
| on_delete=django.db.models.deletion.SET_NULL, | ||
| to=settings.AUTH_USER_MODEL, | ||
| ), | ||
| ), | ||
| ] | ||
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| 0008_task_task_number | ||
| 0009_task_created_by |
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
joshsny marked this conversation as resolved.
Show resolved
Hide 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
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.