-
Notifications
You must be signed in to change notification settings - Fork 0
S219 : datastore databases #94
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
Open
eschultink
wants to merge
2
commits into
rc-0.13
Choose a base branch
from
s219-datastore-databases
base: rc-0.13
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # App Engine Pipelines | ||
|
|
||
| This project is an advanced, modernized implementation of Google App Engine Pipelines. Originally an execution framework to run complex, multi-step asynchronous algorithms on App Engine, this fork extends the concepts and capabilities to be compatible with newer Java versions, modern GCP Datastore API clients (Cloud Datastore / Firestore in Datastore mode), and Cloud Tasks. | ||
|
|
||
| ## Project Architecture | ||
| - **Datastore Client**: Uses modern `google-cloud-datastore` APIs rather than the legacy `appengine-api-1.0-sdk`. | ||
| - **Task Queues**: Abstracts task enqueuing to work across `AppEngineTaskQueue` (legacy standard App Engine push queues) and `CloudTasksTaskQueue` (modern Google Cloud Tasks). | ||
| - **Settings Propagation**: Inherits pipeline settings such as retry counts, worker services, worker versions, and custom Datastore boundaries (Namespace and Database ID) down to sub-jobs and async worker callbacks. | ||
|
|
||
| ## Development Rules | ||
| - When modifying datastore interactions, always ensure you respect potential overrides for `databaseId` and `namespace`, which are typically configured at the `JobSetting` level. | ||
| - When passing parameters to new Pipeline Tasks, leverage `PipelineTask.toProperties()` and augment `QueueSettings` if those parameters must be inherited across jobs. | ||
| - Validate Cloud Datastore constraints carefully (e.g., namespace regex restrictions). |
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 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,9 +1,14 @@ | ||||||||||
| package com.google.appengine.tools.pipeline.impl; | ||||||||||
|
|
||||||||||
| import lombok.*; | ||||||||||
|
|
||||||||||
| import javax.annotation.Nullable; | ||||||||||
|
|
||||||||||
| import lombok.AllArgsConstructor; | ||||||||||
| import lombok.Builder; | ||||||||||
| import lombok.Getter; | ||||||||||
| import lombok.NoArgsConstructor; | ||||||||||
| import lombok.Setter; | ||||||||||
| import lombok.ToString; | ||||||||||
|
|
||||||||||
| /** | ||||||||||
| * settings for how to asynchronously execute a task via a queue | ||||||||||
| * | ||||||||||
|
|
@@ -12,7 +17,8 @@ | |||||||||
| @AllArgsConstructor | ||||||||||
| @NoArgsConstructor | ||||||||||
| @Builder | ||||||||||
| @Getter @Setter | ||||||||||
| @Getter | ||||||||||
| @Setter | ||||||||||
| @ToString | ||||||||||
| public final class QueueSettings implements Cloneable { | ||||||||||
|
|
||||||||||
|
|
@@ -33,12 +39,26 @@ public final class QueueSettings implements Cloneable { | |||||||||
| private String onQueue; | ||||||||||
|
|
||||||||||
| /** | ||||||||||
| * delay in seconds to set when enqueueing the task (eg, should not execute until *at least* this much time has passed | ||||||||||
| * delay in seconds to set when enqueueing the task (eg, should not execute | ||||||||||
| * until *at least* this much time has passed | ||||||||||
|
Comment on lines
+42
to
+43
|
||||||||||
| * delay in seconds to set when enqueueing the task (eg, should not execute | |
| * until *at least* this much time has passed | |
| * Delay in seconds to set when enqueueing the task (for example, the task should not execute | |
| * until at least this much time has passed). |
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.
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.
getSettingValue()usess.getClass().isAssignableFrom(clazz), which is the reverse of the usual assignability check. This will fail to match if a setting instance is a subclass ofclazz(or ifclazzis an interface/supertype you want to match broadly). Useclazz.isAssignableFrom(s.getClass())(orclazz.isInstance(s)) to correctly detect matching settings.