Uploaded image for project: 'Coin'
  1. Coin
  2. COIN-819

Implement GET tasks, taskDetails and workItemDetails APIs

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P2: Important
    • None
    • None
    • WebServer
    • None

    Description

      ===================================
      
      ------- COIN API ENDPOINTS -------
      
      ===================================
      
      GET /tasks
      
      PARAMS
      	{
      		max: int # OPTIONAL, max count of responses to return. Default=100 (Maximum=1000)
      		repo: str/list[str] # OPTIONAL
      		branch: str/list[str] # OPTIONAL
      		type: str/list[str] # possible types [Integration, StatusCheck, EarlyWarning, CreateDebugVm, HealthCheck]
      		before: ISO 8601 datetime # OPTIONAL, Exclusive. Default=[current datetime]
      		after: ISO 8601 datetime # OPTIONAL, Inclusive. Default=[current datetime - 10days]
      		state: str/list[str] # OPTIONAL [Running, Passed, Failed, Cancelled, Insignificant]
      	{
      
      RESPONSE
      	more: bool # True if more results than the requested max count exist
      	next: str # OPTIONAL, URL-encoded query string to GET /tasks which auto-populates
      		  'before' with the last returned task 'started_on' datetime. This effectively allows
      		  iterative calling of the /tasks endpoint until one or less results are returned.
      	tasks: datetime-sorted list [
      		{
      			id: str # Unique Integration ID
      			repo: str # Repository targeted for this integration
      			branch: str # The branch that the task is operating on
      			type: str # possible types [Integration, StatusCheck, EarlyWarning, CreateDebugVm, HealthCheck]
      			started_on: ISO 8601 datetime datetime # Datetime the integration request was made
      			state: str # possible statuses [Running, Passed, Failed, Cancelled, Insignificant]
      			top_sha: str # OPTIONAL, present if type==integration. Sha COIN will place on top of
      					 git history when integration merges
      			tested_shas: # list of tested shas  (### Move to taskDetail only?)
      			self_url: str # The web UI url of this task, on the public testresults.qt.io/coin server if possible. Otherwise "coin/" intranet URL
      			is_public: bool # False if the change requires a user to be in TQTC Intranet to view. 
      		}
      	]
      
      =======================
      
      GET /taskDetail
      
      PARAMS
      	{
      		id: str # ID of the integration/status check to retrieve
      	}
      	
      RESPONSE
      	Details about a single integration
      	{
      		id: str # Unique Integration ID (self)
      		state: str # possible statuses [Running, Passed, Failed, Cancelled, Insignificant]
      		verbose_status: str # OPTIONAL, present if COIN has additional detail about a non-pass status.
      		top_sha: str # OPTIONAL, present if type==integration. Sha COIN will place on top of git history when integration merges
      		tested_changes: # list[str/changeNumbers]
      		started_on: ISO 8601 datetime # Datetime the integration request was made
      		completed_on: ISO 8601 datetime # Datetime the integration finished/passed/failed/cancelled
      		type: str # possible types [Integration, StatusCheck, EarlyWarning, CreateDebugVm, HealthCheck]
      		work_items: list[str/WorkitemPath] # List of builds performed
      	}
      	
      =======================
      
      GET /taskWorkItems
      	
      	PARAMS
      		{
      			id: str # ID of the integration/status check to retrieve
      			type: str/list[str] # OPTIONAL, [Integration, StatusCheck, EarlyWarning, CreateDebugVm, HealthCheck]
      		}
      
      	RESPONSE
      		{
      			work_items: list[WorkItemDetails] # List of work item objects.
      		}
      
      =======================
      
      GET /workItemDetails
      
      	PARAMS
      		{
      			build_key: str # Unique build key of the work item
      		}
      
      	RESPONSE
      		WorkItemDetails object. See #WorkItemDetails
      
      
      =======================
      
      GET /taskTestedChanges
      
      	PARAMS
      		{
      			id: str # ID of the integration/status check to retrieve
      		}
      	
      	RESPONSE
      		[
      			Change, ... # List[Change] objects which were built/tested in the specified task.
      		]
      
      
      ===================================
      
      ------------- TYPES ---------------
      
      ===================================
      
      Change
      # Provides information about a tested change in a task
      	SCHEMA
      	{
      	sha: str # The sha of the change
      	repo: str # The repo in which the change exists
      	ref: str # The gerrit ref of the change, including patchset
      	subject: str # The Subject line of the commit message of the change
      	change_number: str # The numerical change number of the change
      	change_id: str # The fully-qualified change ID of the change
      	links: list[ChangeLinks] # A list of links relating to the change
      	}
      
      ===============
      
      ChangeLinks
      # Provides useful links relating to a change in codereview
      # Accessing some of these links may require authentication
      	SCHEMA
      	{
      	web_url: str # The url of the change in the gerrit web UI
      	rest_url: str # The GET url of the change in the gerrit REST api.
      		see: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#get-change
      	}
      
      ===============
      
      WorkItemDetails
      # Provides detailed information about a specific build or test run
      
      	SCHEMA
      	{
      		task_action: str # possible types [build_only, build_and_test, dry_test_run]
      		build_key: str # longform unique identifier for this build
      		state: str # Possible states [waiting for hardware, running, done, error]
      		target_os: str # OS the build is targeting
      		target_os_version: str # Version of the target os
      		coin_features: list[str] # list of coin features for this build.
      		configure_arguments: list[str] # list of arguments passed to configure for this build
      		environment: list[str] # list of special environment variables for this build. Format "key=value"
      		started_on: datetime # Datetime this build was assigned an agent and began building
                      completed_on: datetime # Datetime this build was completed
      		storage_paths: BuildTestLinks # List of links to relevant files for this build
                      duration: int_s # duration this build ran for. Derivative, calculated from started_on and completed_on
      	}
      
      
      ===============
      
      BuildTestLinks
      # Path links to relevant build or test data
      
      SCHEMA
      	{
      		log_web: str # Path of log view on COIN/Testresults
      		log_raw: str # Path of the raw plaintext log in gzipped format
      		artifacts: str # OPTIONAL Path of the storage location for build logs and testreslts
      	}
      
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              akpietik Aku Pietikäinen
              jujokini Jukka Jokiniva
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes