-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relay build status information from g-s-b (#45)
* Add build status data to environments * Add avg_wait_secs to environments * Commit generated GraphQL schema Generated with: ``` poetry run strawberry export-schema softpack_core.graphql:GraphQL.schema > schema.graphql ``` * Mark queued-but-unknown environments as failed if the builder loses track of a build, it's not coming back (currently)
- Loading branch information
Showing
4 changed files
with
275 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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,120 @@ | ||
schema { | ||
query: SchemaQuery | ||
mutation: SchemaMutation | ||
} | ||
|
||
type BuilderError implements Error { | ||
message: String! | ||
} | ||
|
||
type CreateEnvironmentSuccess implements Success { | ||
message: String! | ||
} | ||
|
||
union CreateResponse = CreateEnvironmentSuccess | InvalidInputError | EnvironmentAlreadyExistsError | BuilderError | ||
|
||
"""Date with time (isoformat)""" | ||
scalar DateTime | ||
|
||
type DeleteEnvironmentSuccess implements Success { | ||
message: String! | ||
} | ||
|
||
union DeleteResponse = DeleteEnvironmentSuccess | EnvironmentNotFoundError | ||
|
||
type Environment { | ||
id: String! | ||
name: String! | ||
path: String! | ||
description: String! | ||
readme: String! | ||
type: Type! | ||
packages: [Package!]! | ||
state: State | ||
requested: DateTime | ||
buildStart: DateTime | ||
buildDone: DateTime | ||
avgWaitSecs: Float | ||
} | ||
|
||
type EnvironmentAlreadyExistsError implements Error { | ||
message: String! | ||
path: String! | ||
name: String! | ||
} | ||
|
||
input EnvironmentInput { | ||
name: String! | ||
path: String! | ||
description: String! | ||
packages: [PackageInput!]! | ||
} | ||
|
||
type EnvironmentNotFoundError implements Error { | ||
message: String! | ||
path: String! | ||
name: String! | ||
} | ||
|
||
interface Error { | ||
message: String! | ||
} | ||
|
||
type Group { | ||
name: String! | ||
} | ||
|
||
type InvalidInputError implements Error { | ||
message: String! | ||
} | ||
|
||
type Package { | ||
name: String! | ||
version: String | ||
} | ||
|
||
input PackageInput { | ||
name: String! | ||
version: String = null | ||
} | ||
|
||
type PackageMultiVersion { | ||
name: String! | ||
versions: [String!]! | ||
} | ||
|
||
type SchemaMutation { | ||
createEnvironment(env: EnvironmentInput!): CreateResponse! | ||
deleteEnvironment(name: String!, path: String!): DeleteResponse! | ||
createFromModule(file: Upload!, modulePath: String!, environmentPath: String!): CreateResponse! | ||
updateFromModule(file: Upload!, modulePath: String!, environmentPath: String!): UpdateResponse! | ||
} | ||
|
||
type SchemaQuery { | ||
environments: [Environment!]! | ||
packageCollections: [PackageMultiVersion!]! | ||
groups(username: String!): [Group!]! | ||
} | ||
|
||
enum State { | ||
ready | ||
queued | ||
failed | ||
} | ||
|
||
interface Success { | ||
message: String! | ||
} | ||
|
||
enum Type { | ||
softpack | ||
module | ||
} | ||
|
||
type UpdateEnvironmentSuccess implements Success { | ||
message: String! | ||
} | ||
|
||
union UpdateResponse = UpdateEnvironmentSuccess | InvalidInputError | EnvironmentNotFoundError | ||
|
||
scalar Upload |
This file contains 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 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 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