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

          1.
          Extend GET tasks Sub-task Closed Aku Pietikäinen
          2.
          Implement thrift json converter Sub-task Closed Toni Saario
          3.
          Implement GET /taskDetail Sub-task Closed Aku Pietikäinen
          4.
          Implement GET /taskWorkItems Sub-task Closed Aku Pietikäinen
          5.
          Implement GET /taskTestedChanges Sub-task Closed Aku Pietikäinen
          6.
          Implement Get workitems API Technical task Closed Aku Pietikäinen
          7.
          GET /taskDetail is missing fields that /tasks has Change Request Closed Aku Pietikäinen
          8.
          GET /tasks?after=wrong_date_format should return error Change Request Closed Aku Pietikäinen
          9.
          API responses should have content-type application/json Change Request Closed Aku Pietikäinen
          10.
          GET /taskWorkItems?id=nightly1668656531 returns 204 No Content Change Request Closed Aku Pietikäinen
          11.
          GET /taskWorkItems is missing details about host and target OS Change Request Closed Aku Pietikäinen
          12.
          GET /taskWorkItems returns "project" as a list Change Request Closed Aku Pietikäinen
          13.
          Empty values should not be empty strings Change Request Closed Aku Pietikäinen
          14.
          Same buildkeys are slightly different between GET /taskDetail and GET /taskWorkItems Change Request Closed Aku Pietikäinen
          15.
          completed_on timestamp is empty for tasks that got interrupted by a restart Technical task Closed Aku Pietikäinen
          16.
          In GET /taskDetail each change should always contain the triplet repo+branch+changeid Technical task Closed Aku Pietikäinen
          17.
          fields returned are sometimes padded with whitespace Technical task Closed Toni Saario
          18.
          API does not return Ref or ChangeID on getTestedChanges Sub-task Closed Aku Pietikäinen
          19.
          After the last Coin upgrade, GET /tasks (no query parameters) takes 1min30s to respond Technical task Closed Toni Saario
          20.
          GET /taskDetail is missing information in comparison to GET /tasks Technical task Closed Aku Pietikäinen
          21.
          GET /tasks responses are not stable Technical task Closed Toni Saario
          22.
          Coin API returns many workitems with started_on date = 1970-01-01 Technical task Closed Aku Pietikäinen
          23.
          Parameterize the class CoinTestResults class Technical task Closed Tero Heikkinen
          24.
          Coin API: Add information about the VM/host that runs each workitem Technical task Open Toni Saario
          25.
          GET /taskWorkItems: provisioning items have branch==empty string, it should be NULL instead Change Request Withdrawn Aku Pietikäinen
          26.
          GET /taskDetail returns a field named "status" while get /tasks returns "state" Change Request Closed Aku Pietikäinen
          27.
          After last update, I'm getting many tasks with completed_on in 1970 Change Request Closed Aku Pietikäinen
          28.
          changes returned in GET /taskDetail contain "sha" that is not found on Gerrit Change Request In Progress Toni Saario
          29.
          New tasks might have empty workitems Technical task Closed Toni Saario
          30.
          Implement GET /workItem?workitem_id=... (list of workitem ids) Technical task Closed Aku Pietikäinen
          31.
          GET /taskWorkItems does not return ID and Dependencies for workitems Technical task Closed Aku Pietikäinen
          32.
          In GET /taskWorkItems why is storage_paths a list? Technical task Closed Aku Pietikäinen
          33.
          GET /taskDetail, /taskWorkItems and /taskTestedChanges should accept a list of task ids Technical task Closed Aku Pietikäinen
          34.
          Coin API: Each workitem that failed should return an error_type in the workitem info Technical task Reported Toni Saario
          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