问:
Sonarqube v.4.3.0 VSTS task “Publish Analysis Result” throw error “Could not fetch metrics” (404)
Since the update from 4.2.0 to 4.3.0, publishing the sonar qube results fail with this error for my react application:

```<code>2018-06-18T07:35:56.8644128Z ##[section]Starting: Publish Quality Gate Result
2018-06-18T07:35:56.8648466Z ==============================================================================
2018-06-18T07:35:56.8648887Z Task         : Publish Quality Gate Result
2018-06-18T07:35:56.8649287Z Description  : Publish SonarQube's Quality Gate result on the VSTS/TFS build result, to be used after the actual analysis.
2018-06-18T07:35:56.8649650Z Version      : 4.3.0
2018-06-18T07:35:56.8649925Z Author       : sonarsource
2018-06-18T07:35:56.8650254Z Help         : [More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
2018-06-18T07:35:56.8650681Z ==============================================================================
2018-06-18T07:36:05.4520694Z ##[error][SQ] API GET '/api/ce/task' failed, status code was: 404
2018-06-18T07:36:05.4531287Z ##[error][SQ] Could not fetch task for ID 'AV6EiGo9XAfivOz6jp5l'
2018-06-18T07:36:05.4532808Z ##[error][SQ] API GET '/api/ce/task' failed, status code was: 404
2018-06-18T07:36:05.4534300Z ##[error][SQ] API GET '/api/ce/task' failed, status code was: 404
2018-06-18T07:36:05.5248790Z ##[section]Finishing: Publish Quality Gate Result
</code>```

Found some similar errors on StackOverflow, but they seems to be more related to authentication.
Is it a bug in the VSTS task or is there a workaround?

UPDATE: Some more detailed logs

```<code>serverVersion=6.7.3.38370
dashboardUrl=https://XXXXXX/dashboard/index/XXXXXXcmp-ui-dev
ceTaskId=AWQXyd5mNr8GlRD53mvW
ceTaskUrl=https://XXXXXX/api/ce/task?id=AWQXyd5mNr8GlRD53mvW

2018-06-19T11:24:35.6562477Z ##[debug][SQ] Parse Task report file: projectKey=sonarqube-scanner
serverUrl=http://localhost:9000
serverVersion=6.5.0.27846
dashboardUrl=http://localhost:9000/dashboard/index/sonarqube-scanner
ceTaskId=AV6EiGo9XAfivOz6jp5l
ceTaskUrl=http://localhost:9000/api/ce/task?id=AV6EiGo9XAfivOz6jp5l

2018-06-19T11:24:35.6564194Z ##[debug][SQ] Parse Task report file: projectKey=sonarqube-scanner
serverUrl=http://localhost:9000
dashboardUrl=http://localhost:9000/dashboard/index/sonarqube-scanner
ceTaskId=AViCXLBOyOPDYliRRPPD
ceTaskUrl=http://localhost:9000/api/ce/task?id=AViCXLBOyOPDYliRRPPD

2018-06-19T11:24:35.6579126Z ##[debug][SQ] Parse Task report file: projectKey=dist
serverUrl=http://localhost:9000
serverVersion=6.5.0.27846
dashboardUrl=http://localhost:9000/dashboard/index/dist
ceTaskId=AV2jO_7EtQnci7vN0TrW
ceTaskUrl=http://localhost:9000/api/ce/task?id=AV2jO_7EtQnci7vN0TrW

##[debug][SQ] Waiting for task 'AWQXyd5mNr8GlRD53mvW' to complete.
##[debug][SQ] API GET: '/api/ce/task' with query "{"id":"AWQXyd5mNr8GlRD53mvW"}"
##[debug][SQ] Waiting for task 'AV6EiGo9XAfivOz6jp5l' to complete.
##[debug][SQ] API GET: '/api/ce/task' with query "{"id":"AV6EiGo9XAfivOz6jp5l"}"
##[debug][SQ] Waiting for task 'AViCXLBOyOPDYliRRPPD' to complete.
##[debug][SQ] API GET: '/api/ce/task' with query "{"id":"AViCXLBOyOPDYliRRPPD"}"
##[debug][SQ] Waiting for task 'AV2jO_7EtQnci7vN0TrW' to complete.
##[debug][SQ] API GET: '/api/ce/task' with query "{"id":"AV2jO_7EtQnci7vN0TrW"}"
##[debug]Response: 404 Body: "{"errors":[{"msg":"No activity found for task 'AV6EiGo9XAfivOz6jp5l'"}]}"
##[debug][SQ] API GET '/api/ce/task' failed, status code was: 404
##[error][SQ] API GET '/api/ce/task' failed, status code was: 404
##[debug]Processed: ##vso[task.issue type=error;][SQ] API GET '/api/ce/task' failed, status code was: 404
##[debug][SQ] Publish task error: [SQ] Could not fetch task for ID 'AV6EiGo9XAfivOz6jp5l'
##[debug]task result: Failed
##[error][SQ] Could not fetch task for ID 'AV6EiGo9XAfivOz6jp5l'
##[debug]Processed: ##vso[task.issue type=error;][SQ] Could not fetch task for ID 'AV6EiGo9XAfivOz6jp5l'
##[debug]Processed: ##vso[task.complete result=Failed;][SQ] Could not fetch task for ID 'AV6EiGo9XAfivOz6jp5l'
##[debug]Response: 200 Body: "{"task":{"id":"AWQXyd5mNr8GlRD53mvW","type":"REPORT","componentId":"AWPvWj0KNr8GlRD53mu0","componentKey":"XXXXXXcmp-ui-dev","componentName":"CMP Development UI","componentQualifier":"TRK","analysisId":"AWQXyeRvZSHmKx_UWZLd","status":"SUCCESS","submittedAt":"2018-06-19T11:24:23+0000","submitterLogin":"XXXXXX","startedAt":"2018-06-19T11:24:23+0000","executedAt":"2018-06-19T11:24:29+0000","executionTimeMs":5631,"logs":false,"hasScannerContext":true,"organization":"default-organization"}}"
##[debug][SQ] Task status:SUCCESS
##[debug][SQ] Task complete: {"id":"AWQXyd5mNr8GlRD53mvW","type":"REPORT","componentId":"AWPvWj0KNr8GlRD53mu0","componentKey":"XXXXXXcmp-ui-dev","componentName":"CMP Development UI","componentQualifier":"TRK","analysisId":"AWQXyeRvZSHmKx_UWZLd","status":"SUCCESS","submittedAt":"2018-06-19T11:24:23+0000","submitterLogin":"XXXXXX","startedAt":"2018-06-19T11:24:23+0000","executedAt":"2018-06-19T11:24:29+0000","executionTimeMs":5631,"logs":false,"hasScannerContext":true,"organization":"default-organization"}
##[debug][SQ] Retrieve Analysis id 'AWQXyeRvZSHmKx_UWZLd.'
##[debug][SQ] API GET: '/api/qualitygates/project_status' with query "{"analysisId":"AWQXyeRvZSHmKx_UWZLd"}"
##[debug]Response: 200 Body: "{"projectStatus":{"status":"ERROR","conditions":[{"status":"ERROR","metricKey":"coverage","comparator":"LT","errorThreshold":"18","actualValue":"0.0"},{"status":"OK","metricKey":"new_reliability_rating","comparator":"GT","periodIndex":1,"warningThreshold":"1","actualValue":"1"},{"status":"OK","metricKey":"new_security_rating","comparator":"GT","periodIndex":1,"actualValue":"1"},{"status":"OK","metricKey":"sqale_rating","comparator":"GT","warningThreshold":"1","actualValue":"1"},{"status":"ERROR","metricKey":"new_coverage","comparator":"LT","periodIndex":1,"errorThreshold":"25","actualValue":"0.0"}],"periods":[{"index":1,"mode":"previous_version","date":"2018-06-11T14:56:55+0000"}],"ignoredConditions":false}}"
##[debug][SQ] Generate analysis report.'
##[debug]Response: 404 Body: "{"errors":[{"msg":"No activity found for task 'AV2jO_7EtQnci7vN0TrW'"}]}"
##[debug][SQ] API GET '/api/ce/task' failed, status code was: 404
##[error][SQ] API GET '/api/ce/task' failed, status code was: 404
##[debug]Processed: ##vso[task.issue type=error;][SQ] API GET '/api/ce/task' failed, status code was: 404
##[debug]Response: 404 Body: "{"errors":[{"msg":"No activity found for task 'AViCXLBOyOPDYliRRPPD'"}]}"
##[debug][SQ] API GET '/api/ce/task' failed, status code was: 404
##[error][SQ] API GET '/api/ce/task' failed, status code was: 404
##[debug]Processed: ##vso[task.issue type=error;][SQ] API GET '/api/ce/task' failed, status code was: 404
##[section]Finishing: Publish Quality Gate Result
</code>```

UPDATE: Definition

UPDATE: Details of the analysis task

```##[debug]Evaluating condition for step: 'Run Code Analysis'
##[debug]Evaluating: succeeded()
##[debug]Evaluating succeeded:
##[debug]=> True
##[debug]Result: True
##[section]Starting: Run Code Analysis
==============================================================================
Task         : Run Code Analysis
Description  : Run scanner and upload the results to the SonarQube server.
Version      : 4.3.0
Author       : sonarsource
Help         : This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

[More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
==============================================================================
##[debug]agent.TempDirectory=E:\VSTSAgent-XXXXXX\_work\_temp
##[debug]loading inputs and endpoints
##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
##[debug]loading SECRET_SONARQUBE_ENDPOINT
##[debug]loaded 4
##[debug]Agent.ProxyUrl=undefined
##[debug]Agent.CAInfo=undefined
##[debug]Agent.ClientCert=undefined
##[debug]Agent.SkipCertValidation=undefined
##[debug]SONARQUBE_SCANNER_MODE=CLI
##[debug]Absolute path for pathSegments: E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0,sonar-scanner,bin,sonar-scanner = E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\sonar-scanner
##[debug]which 'E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\sonar-scanner.bat'
##[debug]found: 'E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\sonar-scanner.bat'
##[debug]which 'E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\sonar-scanner.bat'
##[debug]found: 'E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\sonar-scanner.bat'
##[debug]system.debug=true
##[debug]E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\sonar-scanner.bat arg: -X
##[debug]exec tool: E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\sonar-scanner.bat
##[debug]arguments:
##[debug]   -X
[command]C:\Windows\system32\cmd.exe /D /S /C "E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\sonar-scanner.bat -X"
INFO: Scanner configuration file: E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 3.2.0.1227
INFO: Java 1.8.0_171 Oracle Corporation (64-bit)
INFO: Windows Server 2016 10.0 amd64
DEBUG: keyStore is :
DEBUG: keyStore type is : jks
DEBUG: keyStore provider is :
DEBUG: init keystore
DEBUG: init keymanager of type SunX509
DEBUG: Create: C:\Windows\ServiceProfiles\NetworkService\.sonar\cache
INFO: User cache: C:\Windows\ServiceProfiles\NetworkService\.sonar\cache
DEBUG: Create: C:\Windows\ServiceProfiles\NetworkService\.sonar\cache\_tmp
DEBUG: Extract sonar-scanner-api-batch in temp...
DEBUG: Get bootstrap index...
DEBUG: Download: https://XXXXXX.com/batch/index
DEBUG: Get bootstrap completed
DEBUG: Create isolated classloader...
DEBUG: Start temp cleaning...
DEBUG: Temp cleaning done
DEBUG: Execution getVersion
INFO: SonarQube server 6.7.3
INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
DEBUG: Work directory: E:\VSTSAgent-XXXXXX\_work\4\s\.scannerwork
DEBUG: Execution execute
INFO: Publish mode
INFO: Load global settings
DEBUG: GET 200 https://XXXXXX.com/api/settings/values.protobuf | time=172ms
INFO: Load global settings (done) | time=219ms
INFO: Server id: AWKRJbujkvyHj7QIqwwz
INFO: User cache: C:\Windows\ServiceProfiles\NetworkService\.sonar\cache
INFO: Load plugins index
DEBUG: GET 200 https://XXXXXX.com/api/plugins/installed | time=15ms
INFO: Load plugins index (done) | time=62ms
DEBUG: Load plugins
DEBUG: Load plugins (done) | time=47ms
DEBUG: Plugins:
DEBUG:   * SonarPython 1.9.1.2080 (python)
DEBUG:   * Azure Active Directory (AAD) Authentication Plug-in for SonarQube 1.0 (authaad)
DEBUG:   * Svn 1.7.0.1017 (scmsvn)
DEBUG:   * SonarJS 4.1.0.6085 (javascript)
DEBUG:   * SonarC# 7.0.1.4822 (csharp)
DEBUG:   * SonarJava 5.2.0.13398 (java)
DEBUG:   * SonarWeb 2.6.0.1053 (web)
DEBUG:   * Git 1.4.0.1037 (scmgit)
DEBUG:   * SonarFlex 2.4.0.1222 (flex)
DEBUG:   * SonarXML 1.5.0.1373 (xml)
DEBUG:   * SonarPHP 2.13.0.3107 (php)
DEBUG:   * SonarTS 1.6.0.2388 (typescript)
INFO: Process project properties
DEBUG: Process project properties (done) | time=15ms
INFO: Load project repositories
DEBUG: GET 200 https://XXXXXX.com/batch/project.protobuf?key=XXXXXX-dev | time=47ms
INFO: Load project repositories (done) | time=109ms
DEBUG: Available languages:
DEBUG:   * Python => "py"
DEBUG:   * JavaScript => "js"
DEBUG:   * C# => "cs"
DEBUG:   * Java => "java"
DEBUG:   * Web => "web"
DEBUG:   * Flex => "flex"
DEBUG:   * XML => "xml"
DEBUG:   * PHP => "php"
DEBUG:   * TypeScript => "ts"
INFO: Load quality profiles
DEBUG: GET 200 https://XXXXXX.com/api/qualityprofiles/search.protobuf?projectKey=XXXXXX-dev | time=93ms
INFO: Load quality profiles (done) | time=93ms
INFO: Load active rules
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRJphzkvyHj7QIqxLM&p=1&ps=500 | time=421ms
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRJqUlkvyHj7QIqxSs&p=1&ps=500 | time=500ms
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRRrIwhnDVpZCHB5jb&p=1&ps=500 | time=40ms
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRJq2xkvyHj7QIqxYS&p=1&ps=500 | time=32ms
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRJqxokvyHj7QIqxXT&p=1&ps=500 | time=46ms
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRJrTlkvyHj7QIqxd4&p=1&ps=500 | time=157ms
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRJrdokvyHj7QIqxf3&p=1&ps=500 | time=130ms
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRJsMgkvyHj7QIqxio&p=1&ps=500 | time=94ms
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRJsfzkvyHj7QIqxjs&p=1&ps=500 | time=188ms
INFO: Load active rules (done) | time=1834ms
INFO: Load metrics repository
DEBUG: GET 200 https://XXXXXX.com/api/metrics/search?f=name,description,direction,qualitative,custom&ps=500&p=1 | time=16ms
INFO: Load metrics repository (done) | time=79ms
INFO: Project key: XXXXXX-dev
DEBUG: Start recursive analysis of project modules
INFO: -------------  Scan CMP Development UI
INFO: Load server rules
DEBUG: GET 200 https://XXXXXX.com/api/rules/list.protobuf | time=94ms
INFO: Load server rules (done) | time=125ms
INFO: Base dir: E:\VSTSAgent-XXXXXX\_work\4\s
INFO: Working dir: E:\VSTSAgent-XXXXXX\_work\4\s\.scannerwork
INFO: Source paths: src
INFO: Source encoding: windows-1252, default locale: en_US
DEBUG: Declared extensions of language Python were converted to sonar.lang.patterns.py : **/*.py
DEBUG: Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : **/*.js,**/*.jsx,**/*.vue
DEBUG: Declared extensions of language C# were converted to sonar.lang.patterns.cs : **/*.cs
DEBUG: Declared extensions of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
DEBUG: Declared extensions of language Web were converted to sonar.lang.patterns.web : **/*.html,**/*.xhtml,**/*.rhtml,**/*.shtml
DEBUG: Declared extensions of language Flex were converted to sonar.lang.patterns.flex : **/*.as
DEBUG: Declared extensions of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl
DEBUG: Declared extensions of language PHP were converted to sonar.lang.patterns.php : **/*.php,**/*.php3,**/*.php4,**/*.php5,**/*.phtml,**/*.inc
DEBUG: Declared extensions of language TypeScript were converted to sonar.lang.patterns.ts : **/*.ts,**/*.tsx
DEBUG: Initializers :
INFO: Index files
INFO: Excluded sources:
INFO:   **/node_modules/**
INFO:   **/*.test.tsx
INFO:   **/*.test.ts
INFO:   **/*.test.js
DEBUG: 'src\components\App\App.css' indexed with language 'null'
DEBUG: 'src\components\App\App.scss' indexed with language 'null'
DEBUG: 'src\components\App\App.tsx' indexed with language 'ts'
DEBUG: 'src\components\Footer\Footer.css' indexed with language 'null'
DEBUG: 'src\components\Footer\Footer.scss' indexed with language 'null'
DEBUG: 'src\components\Footer\Footer.tsx' indexed with language 'ts'
DEBUG: 'src\components\Header\Header.css' indexed with language 'null'
DEBUG: 'src\components\Header\Header.scss' indexed with language 'null'
DEBUG: 'src\components\Header\Header.tsx' indexed with language 'ts'
DEBUG: 'src\components\PendingIssues\Actions.ts' indexed with language 'ts'
DEBUG: 'src\components\PendingIssues\index.ts' indexed with language 'ts'
DEBUG: 'src\components\PendingIssues\Models.ts' indexed with language 'ts'
DEBUG: 'src\components\PendingIssues\PendingIssues.tsx' indexed with language 'ts'
DEBUG: 'src\components\PendingIssues\Reducer.ts' indexed with language 'ts'
DEBUG: 'src\index.css' indexed with language 'null'
DEBUG: 'src\index.scss' indexed with language 'null'
DEBUG: 'src\index.tsx' indexed with language 'ts'
DEBUG: 'src\logo.svg' indexed with language 'null'
DEBUG: 'src\registerServiceWorker.ts' indexed with language 'ts'
DEBUG: 'src\screens\Home.tsx' indexed with language 'ts'
DEBUG: 'src\store\index.ts' indexed with language 'ts'
DEBUG: 'src\store\root-action.ts' indexed with language 'ts'
DEBUG: 'src\store\root-epic.ts' indexed with language 'ts'
DEBUG: 'src\store\root-reducer.ts' indexed with language 'ts'
DEBUG: 'src\store\store.ts' indexed with language 'ts'
DEBUG: 'src\styles\_theme.scss' indexed with language 'null'
INFO: 26 files indexed
INFO: 1 file ignored because of inclusion/exclusion patterns
INFO: Quality profile for ts: Sonar way
DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
DEBUG: 'Python Squid Sensor' skipped because there is no related file in current project
DEBUG: 'PylintSensor' skipped because there is no related file in current project
DEBUG: 'PylintImportSensor' skipped because there is no related file in current project
DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
DEBUG: 'SonarJS' skipped because there is no related file in current project
DEBUG: 'SonarJS Coverage' skipped because there is no related file in current project
DEBUG: 'C#' skipped because there is no related file in current project
DEBUG: 'C# Properties' skipped because there is no related file in current project
DEBUG: 'C# Tests Coverage Report Import' skipped because there is no related file in current project
DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project
DEBUG: 'C# Unit Test Results Import' skipped because there is no related file in current project
DEBUG: 'SurefireSensor' skipped because there is no related file in current project
DEBUG: 'JaCoCoSensor' skipped because there is no related file in current project
DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project
DEBUG: 'Web' skipped because there is no related file in current project
DEBUG: 'Flex' skipped because there is no related file in current project
DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
DEBUG: 'XML Sensor' skipped because there is no related file in current project
DEBUG: 'PHP sensor' skipped because there is no related file in current project
DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project
DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
DEBUG: 'Python Squid Sensor' skipped because there is no related file in current project
DEBUG: 'PylintSensor' skipped because there is no related file in current project
DEBUG: 'PylintImportSensor' skipped because there is no related file in current project
DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
DEBUG: 'SonarJS' skipped because there is no related file in current project
DEBUG: 'SonarJS Coverage' skipped because there is no related file in current project
DEBUG: 'C#' skipped because there is no related file in current project
DEBUG: 'C# Properties' skipped because there is no related file in current project
DEBUG: 'C# Tests Coverage Report Import' skipped because there is no related file in current project
DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project
DEBUG: 'C# Unit Test Results Import' skipped because there is no related file in current project
DEBUG: 'SurefireSensor' skipped because there is no related file in current project
DEBUG: 'JaCoCoSensor' skipped because there is no related file in current project
DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project
DEBUG: 'Web' skipped because there is no related file in current project
DEBUG: 'Flex' skipped because there is no related file in current project
DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
DEBUG: 'XML Sensor' skipped because there is no related file in current project
DEBUG: 'PHP sensor' skipped because there is no related file in current project
DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project
DEBUG: Sensors : SonarJavaXmlFileSensor -> SonarTS -> SonarTS Coverage -> Zero Coverage Sensor -> CPD Block Indexer
INFO: Sensor SonarJavaXmlFileSensor [java]
INFO: Sensor SonarJavaXmlFileSensor [java] (done) | time=0ms
INFO: Sensor SonarTS [typescript]
DEBUG: TypeScript compiler is found in this directory E:\VSTSAgent-XXXXXX\_work\4\s\node_modules
DEBUG: It will be used for analysis of typescript files
DEBUG: Deploying bundle from `/sonarts-bundle.zip` to `E:\VSTSAgent-XXXXXX\_work\4\s\.scannerwork`
DEBUG: Checking node version
DEBUG: Using Node.js v8.11.1
DEBUG: Analyzing 16 typescript file(s) with the following configuration file E:\VSTSAgent-XXXXXX\_work\4\s\tsconfig.json
DEBUG: Setting 'NODE_PATH' to E:\VSTSAgent-XXXXXX\_work\4\s\node_modules
DEBUG: Starting external process `node --max-old-space-size=2048 E:\VSTSAgent-XXXXXX\_work\4\s\.scannerwork\sonarts-bundle\node_modules\tslint-sonarts\bin\tsrunner`
DEBUG: 'src/components/App/App.tsx' generated metadata  with charset 'windows-1252'
DEBUG: 'src/components/Footer/Footer.tsx' generated metadata  with charset 'UTF-8'
DEBUG: 'src/components/Header/Header.tsx' generated metadata  with charset 'UTF-8'
DEBUG: 'src/components/PendingIssues/Actions.ts' generated metadata  with charset 'windows-1252'
DEBUG: Not enough content in 'src/components/PendingIssues/Actions.ts' to have CPD blocks, it will not be part of the duplication detection
DEBUG: 'src/components/PendingIssues/Models.ts' generated metadata  with charset 'windows-1252'
DEBUG: Not enough content in 'src/components/PendingIssues/Models.ts' to have CPD blocks, it will not be part of the duplication detection
DEBUG: 'src/components/PendingIssues/PendingIssues.tsx' generated metadata  with charset 'windows-1252'
DEBUG: 'src/components/PendingIssues/Reducer.ts' generated metadata  with charset 'windows-1252'
DEBUG: 'src/components/PendingIssues/index.ts' generated metadata  with charset 'windows-1252'
DEBUG: 'src/index.tsx' generated metadata  with charset 'windows-1252'
DEBUG: 'src/registerServiceWorker.ts' generated metadata  with charset 'windows-1252'
DEBUG: 'src/screens/Home.tsx' generated metadata  with charset 'windows-1252'
DEBUG: Not enough content in 'src/screens/Home.tsx' to have CPD blocks, it will not be part of the duplication detection
DEBUG: 'src/store/index.ts' generated metadata  with charset 'windows-1252'
DEBUG: Not enough content in 'src/store/index.ts' to have CPD blocks, it will not be part of the duplication detection
DEBUG: 'src/store/root-action.ts' generated metadata  with charset 'windows-1252'
DEBUG: Not enough content in 'src/store/root-action.ts' to have CPD blocks, it will not be part of the duplication detection
DEBUG: 'src/store/root-epic.ts' generated metadata  with charset 'windows-1252'
DEBUG: Not enough content in 'src/store/root-epic.ts' to have CPD blocks, it will not be part of the duplication detection
DEBUG: 'src/store/root-reducer.ts' generated metadata  with charset 'windows-1252'
DEBUG: 'src/store/store.ts' generated metadata  with charset 'windows-1252'
INFO: Sensor SonarTS [typescript] (done) | time=16740ms
INFO: Sensor SonarTS Coverage [typescript]
INFO: Analysing [E:\VSTSAgent-XXXXXX\_work\4\s\coverage\lcov.info]
INFO: Sensor SonarTS Coverage [typescript] (done) | time=0ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=94ms
INFO: Sensor CPD Block Indexer
DEBUG: org.sonar.scanner.cpd.deprecated.DefaultCpdBlockIndexer is used for ts
DEBUG: No CpdMapping for language ts
INFO: Sensor CPD Block Indexer (done) | time=0ms
INFO: 6 files had no CPD blocks
INFO: Calculating CPD for 10 files
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/components/PendingIssues/PendingIssues.tsx
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/components/App/App.tsx
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/components/PendingIssues/Reducer.ts
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/components/Header/Header.tsx
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/components/Footer/Footer.tsx
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/store/root-reducer.ts
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/components/PendingIssues/index.ts
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/registerServiceWorker.ts
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/store/store.ts
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/index.tsx
INFO: CPD calculation finished
INFO: Analysis report generated in 750ms, dir size=62 KB
INFO: Analysis reports compressed in 125ms, zip size=39 KB
INFO: Analysis report generated in E:\VSTSAgent-XXXXXX\_work\4\s\.scannerwork\scanner-report
DEBUG: Upload report
DEBUG: POST 200 https://XXXXXX.com/api/ce/submit?projectKey=XXXXXX-dev&projectName=CMP%20Development%20UI | time=172ms
INFO: Analysis report uploaded in 172ms
INFO: ANALYSIS SUCCESSFUL, you can browse https://XXXXXX.com/dashboard/index/XXXXXX-dev
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at https://XXXXXX.com/api/ce/task?id=AWQ8KpFCNr8GlRD53mvk
DEBUG: Report metadata written to E:\VSTSAgent-XXXXXX\_work\4\s\.scannerwork\report-task.txt
DEBUG: Post-jobs :
INFO: Task total time: 24.325 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 27.262s
INFO: Final Memory: 20M/261M
INFO: ------------------------------------------------------------------------
##[debug]rc:0
##[debug]success:true
##[section]Finishing: Run Code Analysis
```

答: Seems it SSL issues, i have faced the same issues when try to use http service connection.</p>

Body:
Since the update from 4.2.0 to 4.3.0, publishing the sonar qube results fail with this error for my react application:

2018-06-18T07:35:56.8644128Z ##[section]Starting: Publish Quality Gate Result
2018-06-18T07:35:56.8648466Z ==============================================================================
2018-06-18T07:35:56.8648887Z Task         : Publish Quality Gate Result
2018-06-18T07:35:56.8649287Z Description  : Publish SonarQube's Quality Gate result on the VSTS/TFS build result, to be used after the actual analysis.
2018-06-18T07:35:56.8649650Z Version      : 4.3.0
2018-06-18T07:35:56.8649925Z Author       : sonarsource
2018-06-18T07:35:56.8650254Z Help         : [More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
2018-06-18T07:35:56.8650681Z ==============================================================================
2018-06-18T07:36:05.4520694Z ##[error][SQ] API GET '/api/ce/task' failed, status code was: 404
2018-06-18T07:36:05.4531287Z ##[error][SQ] Could not fetch task for ID 'AV6EiGo9XAfivOz6jp5l'
2018-06-18T07:36:05.4532808Z ##[error][SQ] API GET '/api/ce/task' failed, status code was: 404
2018-06-18T07:36:05.4534300Z ##[error][SQ] API GET '/api/ce/task' failed, status code was: 404
2018-06-18T07:36:05.5248790Z ##[section]Finishing: Publish Quality Gate Result

Found some similar errors on StackOverflow, but they seems to be more related to authentication.
Is it a bug in the VSTS task or is there a workaround?

UPDATE: Some more detailed logs

serverVersion=6.7.3.38370
dashboardUrl=https://XXXXXX/dashboard/index/XXXXXXcmp-ui-dev
ceTaskId=AWQXyd5mNr8GlRD53mvW
ceTaskUrl=https://XXXXXX/api/ce/task?id=AWQXyd5mNr8GlRD53mvW

2018-06-19T11:24:35.6562477Z ##[debug][SQ] Parse Task report file: projectKey=sonarqube-scanner
serverUrl=http://localhost:9000
serverVersion=6.5.0.27846
dashboardUrl=http://localhost:9000/dashboard/index/sonarqube-scanner
ceTaskId=AV6EiGo9XAfivOz6jp5l
ceTaskUrl=http://localhost:9000/api/ce/task?id=AV6EiGo9XAfivOz6jp5l

2018-06-19T11:24:35.6564194Z ##[debug][SQ] Parse Task report file: projectKey=sonarqube-scanner
serverUrl=http://localhost:9000
dashboardUrl=http://localhost:9000/dashboard/index/sonarqube-scanner
ceTaskId=AViCXLBOyOPDYliRRPPD
ceTaskUrl=http://localhost:9000/api/ce/task?id=AViCXLBOyOPDYliRRPPD

2018-06-19T11:24:35.6579126Z ##[debug][SQ] Parse Task report file: projectKey=dist
serverUrl=http://localhost:9000
serverVersion=6.5.0.27846
dashboardUrl=http://localhost:9000/dashboard/index/dist
ceTaskId=AV2jO_7EtQnci7vN0TrW
ceTaskUrl=http://localhost:9000/api/ce/task?id=AV2jO_7EtQnci7vN0TrW

##[debug][SQ] Waiting for task 'AWQXyd5mNr8GlRD53mvW' to complete.
##[debug][SQ] API GET: '/api/ce/task' with query "{"id":"AWQXyd5mNr8GlRD53mvW"}"
##[debug][SQ] Waiting for task 'AV6EiGo9XAfivOz6jp5l' to complete.
##[debug][SQ] API GET: '/api/ce/task' with query "{"id":"AV6EiGo9XAfivOz6jp5l"}"
##[debug][SQ] Waiting for task 'AViCXLBOyOPDYliRRPPD' to complete.
##[debug][SQ] API GET: '/api/ce/task' with query "{"id":"AViCXLBOyOPDYliRRPPD"}"
##[debug][SQ] Waiting for task 'AV2jO_7EtQnci7vN0TrW' to complete.
##[debug][SQ] API GET: '/api/ce/task' with query "{"id":"AV2jO_7EtQnci7vN0TrW"}"
##[debug]Response: 404 Body: "{"errors":[{"msg":"No activity found for task 'AV6EiGo9XAfivOz6jp5l'"}]}"
##[debug][SQ] API GET '/api/ce/task' failed, status code was: 404
##[error][SQ] API GET '/api/ce/task' failed, status code was: 404
##[debug]Processed: ##vso[task.issue type=error;][SQ] API GET '/api/ce/task' failed, status code was: 404
##[debug][SQ] Publish task error: [SQ] Could not fetch task for ID 'AV6EiGo9XAfivOz6jp5l'
##[debug]task result: Failed
##[error][SQ] Could not fetch task for ID 'AV6EiGo9XAfivOz6jp5l'
##[debug]Processed: ##vso[task.issue type=error;][SQ] Could not fetch task for ID 'AV6EiGo9XAfivOz6jp5l'
##[debug]Processed: ##vso[task.complete result=Failed;][SQ] Could not fetch task for ID 'AV6EiGo9XAfivOz6jp5l'
##[debug]Response: 200 Body: "{"task":{"id":"AWQXyd5mNr8GlRD53mvW","type":"REPORT","componentId":"AWPvWj0KNr8GlRD53mu0","componentKey":"XXXXXXcmp-ui-dev","componentName":"CMP Development UI","componentQualifier":"TRK","analysisId":"AWQXyeRvZSHmKx_UWZLd","status":"SUCCESS","submittedAt":"2018-06-19T11:24:23+0000","submitterLogin":"XXXXXX","startedAt":"2018-06-19T11:24:23+0000","executedAt":"2018-06-19T11:24:29+0000","executionTimeMs":5631,"logs":false,"hasScannerContext":true,"organization":"default-organization"}}"
##[debug][SQ] Task status:SUCCESS
##[debug][SQ] Task complete: {"id":"AWQXyd5mNr8GlRD53mvW","type":"REPORT","componentId":"AWPvWj0KNr8GlRD53mu0","componentKey":"XXXXXXcmp-ui-dev","componentName":"CMP Development UI","componentQualifier":"TRK","analysisId":"AWQXyeRvZSHmKx_UWZLd","status":"SUCCESS","submittedAt":"2018-06-19T11:24:23+0000","submitterLogin":"XXXXXX","startedAt":"2018-06-19T11:24:23+0000","executedAt":"2018-06-19T11:24:29+0000","executionTimeMs":5631,"logs":false,"hasScannerContext":true,"organization":"default-organization"}
##[debug][SQ] Retrieve Analysis id 'AWQXyeRvZSHmKx_UWZLd.'
##[debug][SQ] API GET: '/api/qualitygates/project_status' with query "{"analysisId":"AWQXyeRvZSHmKx_UWZLd"}"
##[debug]Response: 200 Body: "{"projectStatus":{"status":"ERROR","conditions":[{"status":"ERROR","metricKey":"coverage","comparator":"LT","errorThreshold":"18","actualValue":"0.0"},{"status":"OK","metricKey":"new_reliability_rating","comparator":"GT","periodIndex":1,"warningThreshold":"1","actualValue":"1"},{"status":"OK","metricKey":"new_security_rating","comparator":"GT","periodIndex":1,"actualValue":"1"},{"status":"OK","metricKey":"sqale_rating","comparator":"GT","warningThreshold":"1","actualValue":"1"},{"status":"ERROR","metricKey":"new_coverage","comparator":"LT","periodIndex":1,"errorThreshold":"25","actualValue":"0.0"}],"periods":[{"index":1,"mode":"previous_version","date":"2018-06-11T14:56:55+0000"}],"ignoredConditions":false}}"
##[debug][SQ] Generate analysis report.'
##[debug]Response: 404 Body: "{"errors":[{"msg":"No activity found for task 'AV2jO_7EtQnci7vN0TrW'"}]}"
##[debug][SQ] API GET '/api/ce/task' failed, status code was: 404
##[error][SQ] API GET '/api/ce/task' failed, status code was: 404
##[debug]Processed: ##vso[task.issue type=error;][SQ] API GET '/api/ce/task' failed, status code was: 404
##[debug]Response: 404 Body: "{"errors":[{"msg":"No activity found for task 'AViCXLBOyOPDYliRRPPD'"}]}"
##[debug][SQ] API GET '/api/ce/task' failed, status code was: 404
##[error][SQ] API GET '/api/ce/task' failed, status code was: 404
##[debug]Processed: ##vso[task.issue type=error;][SQ] API GET '/api/ce/task' failed, status code was: 404
##[section]Finishing: Publish Quality Gate Result

UPDATE: Definition

UPDATE: Details of the analysis task

##[debug]Evaluating condition for step: 'Run Code Analysis'
##[debug]Evaluating: succeeded()
##[debug]Evaluating succeeded:
##[debug]=> True
##[debug]Result: True
##[section]Starting: Run Code Analysis
==============================================================================
Task         : Run Code Analysis
Description  : Run scanner and upload the results to the SonarQube server.
Version      : 4.3.0
Author       : sonarsource
Help         : This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

[More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
==============================================================================
##[debug]agent.TempDirectory=E:\VSTSAgent-XXXXXX\_work\_temp
##[debug]loading inputs and endpoints
##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
##[debug]loading SECRET_SONARQUBE_ENDPOINT
##[debug]loaded 4
##[debug]Agent.ProxyUrl=undefined
##[debug]Agent.CAInfo=undefined
##[debug]Agent.ClientCert=undefined
##[debug]Agent.SkipCertValidation=undefined
##[debug]SONARQUBE_SCANNER_MODE=CLI
##[debug]Absolute path for pathSegments: E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0,sonar-scanner,bin,sonar-scanner = E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\sonar-scanner
##[debug]which 'E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\sonar-scanner.bat'
##[debug]found: 'E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\sonar-scanner.bat'
##[debug]which 'E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\sonar-scanner.bat'
##[debug]found: 'E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\sonar-scanner.bat'
##[debug]system.debug=true
##[debug]E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\sonar-scanner.bat arg: -X
##[debug]exec tool: E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\sonar-scanner.bat
##[debug]arguments:
##[debug]   -X
[command]C:\Windows\system32\cmd.exe /D /S /C "E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\sonar-scanner.bat -X"
INFO: Scanner configuration file: E:\VSTSAgent-XXXXXX\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.3.0\sonar-scanner\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 3.2.0.1227
INFO: Java 1.8.0_171 Oracle Corporation (64-bit)
INFO: Windows Server 2016 10.0 amd64
DEBUG: keyStore is :
DEBUG: keyStore type is : jks
DEBUG: keyStore provider is :
DEBUG: init keystore
DEBUG: init keymanager of type SunX509
DEBUG: Create: C:\Windows\ServiceProfiles\NetworkService\.sonar\cache
INFO: User cache: C:\Windows\ServiceProfiles\NetworkService\.sonar\cache
DEBUG: Create: C:\Windows\ServiceProfiles\NetworkService\.sonar\cache\_tmp
DEBUG: Extract sonar-scanner-api-batch in temp...
DEBUG: Get bootstrap index...
DEBUG: Download: https://XXXXXX.com/batch/index
DEBUG: Get bootstrap completed
DEBUG: Create isolated classloader...
DEBUG: Start temp cleaning...
DEBUG: Temp cleaning done
DEBUG: Execution getVersion
INFO: SonarQube server 6.7.3
INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
DEBUG: Work directory: E:\VSTSAgent-XXXXXX\_work\4\s\.scannerwork
DEBUG: Execution execute
INFO: Publish mode
INFO: Load global settings
DEBUG: GET 200 https://XXXXXX.com/api/settings/values.protobuf | time=172ms
INFO: Load global settings (done) | time=219ms
INFO: Server id: AWKRJbujkvyHj7QIqwwz
INFO: User cache: C:\Windows\ServiceProfiles\NetworkService\.sonar\cache
INFO: Load plugins index
DEBUG: GET 200 https://XXXXXX.com/api/plugins/installed | time=15ms
INFO: Load plugins index (done) | time=62ms
DEBUG: Load plugins
DEBUG: Load plugins (done) | time=47ms
DEBUG: Plugins:
DEBUG:   * SonarPython 1.9.1.2080 (python)
DEBUG:   * Azure Active Directory (AAD) Authentication Plug-in for SonarQube 1.0 (authaad)
DEBUG:   * Svn 1.7.0.1017 (scmsvn)
DEBUG:   * SonarJS 4.1.0.6085 (javascript)
DEBUG:   * SonarC# 7.0.1.4822 (csharp)
DEBUG:   * SonarJava 5.2.0.13398 (java)
DEBUG:   * SonarWeb 2.6.0.1053 (web)
DEBUG:   * Git 1.4.0.1037 (scmgit)
DEBUG:   * SonarFlex 2.4.0.1222 (flex)
DEBUG:   * SonarXML 1.5.0.1373 (xml)
DEBUG:   * SonarPHP 2.13.0.3107 (php)
DEBUG:   * SonarTS 1.6.0.2388 (typescript)
INFO: Process project properties
DEBUG: Process project properties (done) | time=15ms
INFO: Load project repositories
DEBUG: GET 200 https://XXXXXX.com/batch/project.protobuf?key=XXXXXX-dev | time=47ms
INFO: Load project repositories (done) | time=109ms
DEBUG: Available languages:
DEBUG:   * Python => "py"
DEBUG:   * JavaScript => "js"
DEBUG:   * C# => "cs"
DEBUG:   * Java => "java"
DEBUG:   * Web => "web"
DEBUG:   * Flex => "flex"
DEBUG:   * XML => "xml"
DEBUG:   * PHP => "php"
DEBUG:   * TypeScript => "ts"
INFO: Load quality profiles
DEBUG: GET 200 https://XXXXXX.com/api/qualityprofiles/search.protobuf?projectKey=XXXXXX-dev | time=93ms
INFO: Load quality profiles (done) | time=93ms
INFO: Load active rules
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRJphzkvyHj7QIqxLM&p=1&ps=500 | time=421ms
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRJqUlkvyHj7QIqxSs&p=1&ps=500 | time=500ms
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRRrIwhnDVpZCHB5jb&p=1&ps=500 | time=40ms
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRJq2xkvyHj7QIqxYS&p=1&ps=500 | time=32ms
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRJqxokvyHj7QIqxXT&p=1&ps=500 | time=46ms
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRJrTlkvyHj7QIqxd4&p=1&ps=500 | time=157ms
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRJrdokvyHj7QIqxf3&p=1&ps=500 | time=130ms
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRJsMgkvyHj7QIqxio&p=1&ps=500 | time=94ms
DEBUG: GET 200 https://XXXXXX.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWKRJsfzkvyHj7QIqxjs&p=1&ps=500 | time=188ms
INFO: Load active rules (done) | time=1834ms
INFO: Load metrics repository
DEBUG: GET 200 https://XXXXXX.com/api/metrics/search?f=name,description,direction,qualitative,custom&ps=500&p=1 | time=16ms
INFO: Load metrics repository (done) | time=79ms
INFO: Project key: XXXXXX-dev
DEBUG: Start recursive analysis of project modules
INFO: -------------  Scan CMP Development UI
INFO: Load server rules
DEBUG: GET 200 https://XXXXXX.com/api/rules/list.protobuf | time=94ms
INFO: Load server rules (done) | time=125ms
INFO: Base dir: E:\VSTSAgent-XXXXXX\_work\4\s
INFO: Working dir: E:\VSTSAgent-XXXXXX\_work\4\s\.scannerwork
INFO: Source paths: src
INFO: Source encoding: windows-1252, default locale: en_US
DEBUG: Declared extensions of language Python were converted to sonar.lang.patterns.py : **/*.py
DEBUG: Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : **/*.js,**/*.jsx,**/*.vue
DEBUG: Declared extensions of language C# were converted to sonar.lang.patterns.cs : **/*.cs
DEBUG: Declared extensions of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
DEBUG: Declared extensions of language Web were converted to sonar.lang.patterns.web : **/*.html,**/*.xhtml,**/*.rhtml,**/*.shtml
DEBUG: Declared extensions of language Flex were converted to sonar.lang.patterns.flex : **/*.as
DEBUG: Declared extensions of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl
DEBUG: Declared extensions of language PHP were converted to sonar.lang.patterns.php : **/*.php,**/*.php3,**/*.php4,**/*.php5,**/*.phtml,**/*.inc
DEBUG: Declared extensions of language TypeScript were converted to sonar.lang.patterns.ts : **/*.ts,**/*.tsx
DEBUG: Initializers :
INFO: Index files
INFO: Excluded sources:
INFO:   **/node_modules/**
INFO:   **/*.test.tsx
INFO:   **/*.test.ts
INFO:   **/*.test.js
DEBUG: 'src\components\App\App.css' indexed with language 'null'
DEBUG: 'src\components\App\App.scss' indexed with language 'null'
DEBUG: 'src\components\App\App.tsx' indexed with language 'ts'
DEBUG: 'src\components\Footer\Footer.css' indexed with language 'null'
DEBUG: 'src\components\Footer\Footer.scss' indexed with language 'null'
DEBUG: 'src\components\Footer\Footer.tsx' indexed with language 'ts'
DEBUG: 'src\components\Header\Header.css' indexed with language 'null'
DEBUG: 'src\components\Header\Header.scss' indexed with language 'null'
DEBUG: 'src\components\Header\Header.tsx' indexed with language 'ts'
DEBUG: 'src\components\PendingIssues\Actions.ts' indexed with language 'ts'
DEBUG: 'src\components\PendingIssues\index.ts' indexed with language 'ts'
DEBUG: 'src\components\PendingIssues\Models.ts' indexed with language 'ts'
DEBUG: 'src\components\PendingIssues\PendingIssues.tsx' indexed with language 'ts'
DEBUG: 'src\components\PendingIssues\Reducer.ts' indexed with language 'ts'
DEBUG: 'src\index.css' indexed with language 'null'
DEBUG: 'src\index.scss' indexed with language 'null'
DEBUG: 'src\index.tsx' indexed with language 'ts'
DEBUG: 'src\logo.svg' indexed with language 'null'
DEBUG: 'src\registerServiceWorker.ts' indexed with language 'ts'
DEBUG: 'src\screens\Home.tsx' indexed with language 'ts'
DEBUG: 'src\store\index.ts' indexed with language 'ts'
DEBUG: 'src\store\root-action.ts' indexed with language 'ts'
DEBUG: 'src\store\root-epic.ts' indexed with language 'ts'
DEBUG: 'src\store\root-reducer.ts' indexed with language 'ts'
DEBUG: 'src\store\store.ts' indexed with language 'ts'
DEBUG: 'src\styles\_theme.scss' indexed with language 'null'
INFO: 26 files indexed
INFO: 1 file ignored because of inclusion/exclusion patterns
INFO: Quality profile for ts: Sonar way
DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
DEBUG: 'Python Squid Sensor' skipped because there is no related file in current project
DEBUG: 'PylintSensor' skipped because there is no related file in current project
DEBUG: 'PylintImportSensor' skipped because there is no related file in current project
DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
DEBUG: 'SonarJS' skipped because there is no related file in current project
DEBUG: 'SonarJS Coverage' skipped because there is no related file in current project
DEBUG: 'C#' skipped because there is no related file in current project
DEBUG: 'C# Properties' skipped because there is no related file in current project
DEBUG: 'C# Tests Coverage Report Import' skipped because there is no related file in current project
DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project
DEBUG: 'C# Unit Test Results Import' skipped because there is no related file in current project
DEBUG: 'SurefireSensor' skipped because there is no related file in current project
DEBUG: 'JaCoCoSensor' skipped because there is no related file in current project
DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project
DEBUG: 'Web' skipped because there is no related file in current project
DEBUG: 'Flex' skipped because there is no related file in current project
DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
DEBUG: 'XML Sensor' skipped because there is no related file in current project
DEBUG: 'PHP sensor' skipped because there is no related file in current project
DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project
DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
DEBUG: 'Python Squid Sensor' skipped because there is no related file in current project
DEBUG: 'PylintSensor' skipped because there is no related file in current project
DEBUG: 'PylintImportSensor' skipped because there is no related file in current project
DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
DEBUG: 'SonarJS' skipped because there is no related file in current project
DEBUG: 'SonarJS Coverage' skipped because there is no related file in current project
DEBUG: 'C#' skipped because there is no related file in current project
DEBUG: 'C# Properties' skipped because there is no related file in current project
DEBUG: 'C# Tests Coverage Report Import' skipped because there is no related file in current project
DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project
DEBUG: 'C# Unit Test Results Import' skipped because there is no related file in current project
DEBUG: 'SurefireSensor' skipped because there is no related file in current project
DEBUG: 'JaCoCoSensor' skipped because there is no related file in current project
DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project
DEBUG: 'Web' skipped because there is no related file in current project
DEBUG: 'Flex' skipped because there is no related file in current project
DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
DEBUG: 'XML Sensor' skipped because there is no related file in current project
DEBUG: 'PHP sensor' skipped because there is no related file in current project
DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project
DEBUG: Sensors : SonarJavaXmlFileSensor -> SonarTS -> SonarTS Coverage -> Zero Coverage Sensor -> CPD Block Indexer
INFO: Sensor SonarJavaXmlFileSensor [java]
INFO: Sensor SonarJavaXmlFileSensor [java] (done) | time=0ms
INFO: Sensor SonarTS [typescript]
DEBUG: TypeScript compiler is found in this directory E:\VSTSAgent-XXXXXX\_work\4\s\node_modules
DEBUG: It will be used for analysis of typescript files
DEBUG: Deploying bundle from `/sonarts-bundle.zip` to `E:\VSTSAgent-XXXXXX\_work\4\s\.scannerwork`
DEBUG: Checking node version
DEBUG: Using Node.js v8.11.1
DEBUG: Analyzing 16 typescript file(s) with the following configuration file E:\VSTSAgent-XXXXXX\_work\4\s\tsconfig.json
DEBUG: Setting 'NODE_PATH' to E:\VSTSAgent-XXXXXX\_work\4\s\node_modules
DEBUG: Starting external process `node --max-old-space-size=2048 E:\VSTSAgent-XXXXXX\_work\4\s\.scannerwork\sonarts-bundle\node_modules\tslint-sonarts\bin\tsrunner`
DEBUG: 'src/components/App/App.tsx' generated metadata  with charset 'windows-1252'
DEBUG: 'src/components/Footer/Footer.tsx' generated metadata  with charset 'UTF-8'
DEBUG: 'src/components/Header/Header.tsx' generated metadata  with charset 'UTF-8'
DEBUG: 'src/components/PendingIssues/Actions.ts' generated metadata  with charset 'windows-1252'
DEBUG: Not enough content in 'src/components/PendingIssues/Actions.ts' to have CPD blocks, it will not be part of the duplication detection
DEBUG: 'src/components/PendingIssues/Models.ts' generated metadata  with charset 'windows-1252'
DEBUG: Not enough content in 'src/components/PendingIssues/Models.ts' to have CPD blocks, it will not be part of the duplication detection
DEBUG: 'src/components/PendingIssues/PendingIssues.tsx' generated metadata  with charset 'windows-1252'
DEBUG: 'src/components/PendingIssues/Reducer.ts' generated metadata  with charset 'windows-1252'
DEBUG: 'src/components/PendingIssues/index.ts' generated metadata  with charset 'windows-1252'
DEBUG: 'src/index.tsx' generated metadata  with charset 'windows-1252'
DEBUG: 'src/registerServiceWorker.ts' generated metadata  with charset 'windows-1252'
DEBUG: 'src/screens/Home.tsx' generated metadata  with charset 'windows-1252'
DEBUG: Not enough content in 'src/screens/Home.tsx' to have CPD blocks, it will not be part of the duplication detection
DEBUG: 'src/store/index.ts' generated metadata  with charset 'windows-1252'
DEBUG: Not enough content in 'src/store/index.ts' to have CPD blocks, it will not be part of the duplication detection
DEBUG: 'src/store/root-action.ts' generated metadata  with charset 'windows-1252'
DEBUG: Not enough content in 'src/store/root-action.ts' to have CPD blocks, it will not be part of the duplication detection
DEBUG: 'src/store/root-epic.ts' generated metadata  with charset 'windows-1252'
DEBUG: Not enough content in 'src/store/root-epic.ts' to have CPD blocks, it will not be part of the duplication detection
DEBUG: 'src/store/root-reducer.ts' generated metadata  with charset 'windows-1252'
DEBUG: 'src/store/store.ts' generated metadata  with charset 'windows-1252'
INFO: Sensor SonarTS [typescript] (done) | time=16740ms
INFO: Sensor SonarTS Coverage [typescript]
INFO: Analysing [E:\VSTSAgent-XXXXXX\_work\4\s\coverage\lcov.info]
INFO: Sensor SonarTS Coverage [typescript] (done) | time=0ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=94ms
INFO: Sensor CPD Block Indexer
DEBUG: org.sonar.scanner.cpd.deprecated.DefaultCpdBlockIndexer is used for ts
DEBUG: No CpdMapping for language ts
INFO: Sensor CPD Block Indexer (done) | time=0ms
INFO: 6 files had no CPD blocks
INFO: Calculating CPD for 10 files
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/components/PendingIssues/PendingIssues.tsx
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/components/App/App.tsx
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/components/PendingIssues/Reducer.ts
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/components/Header/Header.tsx
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/components/Footer/Footer.tsx
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/store/root-reducer.ts
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/components/PendingIssues/index.ts
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/registerServiceWorker.ts
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/store/store.ts
DEBUG: Detection of duplications for E:/VSTSAgent-XXXXXX/_work/4/s/src/index.tsx
INFO: CPD calculation finished
INFO: Analysis report generated in 750ms, dir size=62 KB
INFO: Analysis reports compressed in 125ms, zip size=39 KB
INFO: Analysis report generated in E:\VSTSAgent-XXXXXX\_work\4\s\.scannerwork\scanner-report
DEBUG: Upload report
DEBUG: POST 200 https://XXXXXX.com/api/ce/submit?projectKey=XXXXXX-dev&projectName=CMP%20Development%20UI | time=172ms
INFO: Analysis report uploaded in 172ms
INFO: ANALYSIS SUCCESSFUL, you can browse https://XXXXXX.com/dashboard/index/XXXXXX-dev
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at https://XXXXXX.com/api/ce/task?id=AWQ8KpFCNr8GlRD53mvk
DEBUG: Report metadata written to E:\VSTSAgent-XXXXXX\_work\4\s\.scannerwork\report-task.txt
DEBUG: Post-jobs :
INFO: Task total time: 24.325 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 27.262s
INFO: Final Memory: 20M/261M
INFO: ------------------------------------------------------------------------
##[debug]rc:0
##[debug]success:true
##[section]Finishing: Run Code Analysis


来源: stackexchange

问:
Does Jenkins support incremental pipeline builds?
I have been searching far and wide to see if I can find information on Jenkins incremental pipeline builds that does not involve Maven.

The general idea is that I want to build a generic project and run specific steps of the pipeline if the underlying code has changed. If the code did not change, I want to re-use the results from a previous build.

The reason why I want to do this, is to drastically reduce build times for huge projects.

Imagine that you only need to fix 1 line in a SCSS file, but the whole project needs to be rebuild, repackaged, etc because of this. In the meantime, the site is live and broken and waiting 15 mins to be fixed.

Can someone give a basic example of how such a build can be created or where I can find more information on incremental building?

The only thing I have been able to find is incremental building for Maven projects, but this is not applicable for me.

答:
The standard solution is to create modules that depends on each others.

Publish the built artifact of your modules to a binary repository like Sonatype Nexus (you can easily create private npm repo as well as proxy npm repo).

During the build download the dependencies, instead of building them.

If this solution is not the one you want to take, you will have a hard time hacking a solution. To persist the state of your steps, an easy solution is to create files in the job workspace and read them at next build

ContentLicense: CC BY-SA 4.0


问:
No tests found when running instrumented tests with AndroidX
I'm trying to run the standard ExampleInstrumentedTest in my Android project (which uses AndroidX), but get "No tests found" error instead. I've looked through the other questions and the documentation and I'm pretty sure I've done everything right, but maybe I'm overlooking anything?

Here is my app's build.gradle:

```<code>apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
    compileSdkVersion 28
    defaultConfig {
        minSdkVersion 24
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.ext.junit.runners.AndroidJUnit4"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    // Gradle automatically adds 'android.test.runner' as a dependency.
    useLibrary 'android.test.runner'

    useLibrary 'android.test.base'
    useLibrary 'android.test.mock'
}

repositories {
    mavenCentral()
    maven {
        url("https://oss.sonatype.org/content/repositories/snapshots")
    }
    maven { url 'https://jitpack.io' }
}

dependencies {
    // Core library
    androidTestImplementation 'androidx.test:core:1.0.0'

    // AndroidJUnitRunner and JUnit Rules
    androidTestImplementation 'androidx.test:runner:1.1.0'
    androidTestImplementation 'androidx.test:rules:1.1.0'

    // Assertions
    androidTestImplementation 'androidx.test.ext:junit:1.0.0'
    androidTestImplementation 'androidx.test.ext:truth:1.0.0'
    androidTestImplementation 'com.google.truth:truth:0.42'

    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
}

// More dependencies...
</code>```

and ExampleInstrumentedTest.java:

```<code>import org.junit.Test;
import org.junit.runner.RunWith;

import androidx.test.core.app.ApplicationProvider;
import androidx.test.ext.junit.runners.AndroidJUnit4;

import static org.junit.Assert.*;

@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
    @Test
    public void useAppContext() {
        Context appContext = ApplicationProvider.getApplicationContext();
        assertEquals("XXX", appContext.getPackageName());
    }
}
</code>```

when I run the code, I get "No tests found".

答:
Look for app/src/androidTest/AndroidManifest.xml

change android:name to androidx.multidex.MultiDexApplication

```<code><application
        android:allowBackup="true"
        android:label="Components Tests App"
        android:supportsRtl="true"
        android:name="android.support.multidex.MultiDexApplication">
</code>```

To

```<code><application
            android:allowBackup="true"
            android:label="Components Tests App"
            android:supportsRtl="true"
            android:name="androidx.multidex.MultiDexApplication">
</code>```

Body:
I'm trying to run the standard ExampleInstrumentedTest in my Android project (which uses AndroidX), but get "No tests found" error instead. I've looked through the other questions and the documentation and I'm pretty sure I've done everything right, but maybe I'm overlooking anything?

Here is my app's build.gradle:

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
    compileSdkVersion 28
    defaultConfig {
        minSdkVersion 24
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.ext.junit.runners.AndroidJUnit4"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    // Gradle automatically adds 'android.test.runner' as a dependency.
    useLibrary 'android.test.runner'

    useLibrary 'android.test.base'
    useLibrary 'android.test.mock'
}

repositories {
    mavenCentral()
    maven {
        url("https://oss.sonatype.org/content/repositories/snapshots")
    }
    maven { url 'https://jitpack.io' }
}

dependencies {
    // Core library
    androidTestImplementation 'androidx.test:core:1.0.0'

    // AndroidJUnitRunner and JUnit Rules
    androidTestImplementation 'androidx.test:runner:1.1.0'
    androidTestImplementation 'androidx.test:rules:1.1.0'

    // Assertions
    androidTestImplementation 'androidx.test.ext:junit:1.0.0'
    androidTestImplementation 'androidx.test.ext:truth:1.0.0'
    androidTestImplementation 'com.google.truth:truth:0.42'

    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
}

// More dependencies...

and ExampleInstrumentedTest.java:

import org.junit.Test;
import org.junit.runner.RunWith;

import androidx.test.core.app.ApplicationProvider;
import androidx.test.ext.junit.runners.AndroidJUnit4;

import static org.junit.Assert.*;

@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
    @Test
    public void useAppContext() {
        Context appContext = ApplicationProvider.getApplicationContext();
        assertEquals("XXX", appContext.getPackageName());
    }
}

when I run the code, I get "No tests found".

Body:
Look for app/src/androidTest/AndroidManifest.xml

change android:name to androidx.multidex.MultiDexApplication

<application
        android:allowBackup="true"
        android:label="Components Tests App"
        android:supportsRtl="true"
        android:name="android.support.multidex.MultiDexApplication">

To

<application
            android:allowBackup="true"
            android:label="Components Tests App"
            android:supportsRtl="true"
            android:name="androidx.multidex.MultiDexApplication">


问:
how to join a query on non primary key and foreign key column in Django
I have two model,  making unique key column as foreign key to other table.

```<code>class Employee(models.Model):
    EmployeeId = models.IntegerField(unique=True)
    Employee_Name = models.CharField(max_length=100)

class Release(models.Model):
    EmployeeId = models.ForeignKey(Employee, on_delete=models.CASCADE, to_field="EmployeeId")
</code>```

when i am trying join query it is doing join on primary key column on Employee table.

below is the join query  I am expecting join on Employee.EmployeeId =Release.EmployeeId

```<code>r=Release.objects.all().select_related('EmployeeId')

</code>```

but above query gives

```<code>print(str(r.query))
</code>```

Output:

```<code>'SELECT "app_release"."id", "app_release"."EmployeeId_id", "app_employee"."id", "app_employee"."EmployeeId", "app_employee"."Employee_Name"
FROM "app_release" INNER JOIN "app_employee"
ON ("app_re
lease"."EmployeeId_id" = "app_employee"."id")'
</code>```

which i don't want i.e, instead of

```<code>ON ("app_release"."EmployeeId_id" = "app_employee"."id")'
</code>```

i want

```<code>ON ("app_release"."EmployeeId_id" = "app_employee"."EmployeeId")'
</code>```

答:
So you need to declare Employee.EmployeeId as primary key and remove unique key because Primary key is unique itself.
try this code..in Employee Model

EmployeeId = models.IntegerField(primary_key=True)

if you do not want to modify the table,then you can use raw query,please refer the link below

raw query in Django

please let me know whether it is working or not

Body:
I have two model,  making unique key column as foreign key to other table.

class Employee(models.Model):
    EmployeeId = models.IntegerField(unique=True)
    Employee_Name = models.CharField(max_length=100)

class Release(models.Model):
    EmployeeId = models.ForeignKey(Employee, on_delete=models.CASCADE, to_field="EmployeeId")

when i am trying join query it is doing join on primary key column on Employee table.

below is the join query  I am expecting join on Employee.EmployeeId =Release.EmployeeId

r=Release.objects.all().select_related('EmployeeId')

but above query gives

print(str(r.query))

Output:

'SELECT "app_release"."id", "app_release"."EmployeeId_id", "app_employee"."id", "app_employee"."EmployeeId", "app_employee"."Employee_Name"
FROM "app_release" INNER JOIN "app_employee"
ON ("app_re
lease"."EmployeeId_id" = "app_employee"."id")'

which i don't want i.e, instead of

ON ("app_release"."EmployeeId_id" = "app_employee"."id")'

i want

ON ("app_release"."EmployeeId_id" = "app_employee"."EmployeeId")'


问:
Using set as a way to reorder iterable
I have two tuples a and b and also a dictionary d

```<code>a=('C', 'G')
b=('G', 'C')
d={('G', 'C'): 'T'}
</code>```

I want d[a] and d[b] to return 'T'.

For that I used set() because I thought that set() was fixing the order of the elements of a iterable object (and removing the duplicates but I don't care about that).

So I did:

```<code>tuple(set(a)) in d  # return True
tuple(set(b)) in d  # return True
# I did tuple(set()) because set() alone is not hashable and so cannot be used directly
</code>```

This works, until it doesn't. And so I discover than sometimes

```<code>set(('C', 'G'))
{'C', 'G'}
</code>```

and sometimes it does not

```<code>set(('C', 'G'))
{'G', 'C'}
</code>```

I understand that set() orders the element as it wants but I expected that the order would always be the same with a given set of elements.

So my questions are:

Why it's not the case?

How can I solve my initial problem?

答:
Just use sorted tuples whenever you need to index your dict:

```<code>a = ('C', 'G')
b = ('G', 'C')
d = {tuple(sorted(a)): 'T'}
for tup in [a, b]:
   print( tup, d[tuple(sorted(tup))] )
</code>```

Title: Using set as a way to reorder iterable

Body:
I have two tuples a and b and also a dictionary d

a=('C', 'G')
b=('G', 'C')
d={('G', 'C'): 'T'}

I want d[a] and d[b] to return 'T'.

For that I used set() because I thought that set() was fixing the order of the elements of a iterable object (and removing the duplicates but I don't care about that).

So I did:

tuple(set(a)) in d  # return True
tuple(set(b)) in d  # return True
# I did tuple(set()) because set() alone is not hashable and so cannot be used directly

This works, until it doesn't. And so I discover than sometimes

set(('C', 'G'))
{'C', 'G'}

and sometimes it does not

set(('C', 'G'))
{'G', 'C'}

I understand that set() orders the element as it wants but I expected that the order would always be the same with a given set of elements.

So my questions are:

Why it's not the case?

How can I solve my initial problem?

Body:
Just use sorted tuples whenever you need to index your dict:

a = ('C', 'G')
b = ('G', 'C')
d = {tuple(sorted(a)): 'T'}
for tup in [a, b]:
   print( tup, d[tuple(sorted(tup))] )


问:
AnkhSVN error, looking for strange path
I'm using SVN via AnkhSVN for my project and whenever I go to commit I get the following error(s) then when I click the Stacktrace button this is what it's showing . I have no idea what this path is that it's looking for, so what can I do to resolve this?

EDIT: This is weird because that directory has never existed, not removed or deleted either. No files appear to be in conflict either, so this one has me stimpted.

答:
I think you need to update first, and then commit.

If that fails, please give some more information:

What's the status of the files you're trying to commit?

Does that path exist in the repository, or was it moved/renamed/deleted recently?

Run svn info on the files you're committing, and check which of them has that 'strange path' as URL property

ContentLicense: CC BY-SA 3.0

Title: AnkhSVN error, looking for strange path


问:
C# : what regular expression can match these text?
what regular expression can match these in C#:

```<code>^TEST(%USER,"ADDRESS","NAME","^\",()")
^TEST(%USER,"ADDRESS","NAME")
^TEST()
^TEST
^TEST("HALLO")
$$TEST^QCC("HALLO")
$$TEST^QCC
</code>```

I hope i can get two groups:

group 1: the text before left round bracket if there is a left round bracket, otherwise the whole text.

group 2: the text between the round bracket.

I tried regular expression "(\S+)((\S+))" at https://regex101.com/r/R5wiOh/12 but it works not good.

答:
i found the solution:

^(\S+?)((\S*))$

Body:
what regular expression can match these in C#:

^TEST(%USER,"ADDRESS","NAME","^\",()")
^TEST(%USER,"ADDRESS","NAME")
^TEST()
^TEST
^TEST("HALLO")
$$TEST^QCC("HALLO")
$$TEST^QCC

I hope i can get two groups:

group 1: the text before left round bracket if there is a left round bracket, otherwise the whole text.

group 2: the text between the round bracket.

I tried regular expression "(\S+)((\S+))" at https://regex101.com/r/R5wiOh/12 but it works not good.

Body:
i found the solution:

^(\S+?)((\S*))$


问:
Gulp concat, uglify handling ES6 exported libraries
I use Gulp to merge a few javascripts as well as uglify them. When I tried to do it with countUp (can be other script as well) I've got an error.

Uncaught SyntaxError: Unexpected token 'export'

It tries to export the javascript back to the script tag. Now my javascript file is not just one script, but many.

How can I make it work? Is there a tool to convert it to common js or maybe a better way to include it with gulp?

Script

A part of my gulp-file looks like below:

function script() {
  return gulp
    .src(js.src)
    .pipe(concat(js.filename))
    .pipe(gulp.dest(js.dest))
    .pipe(uglify())
    .pipe(rename({ extname: ".min.js" }))
    .pipe(gulp.dest(js.dest));
}
```

答:
You can use a gulp task to convert es6 modules to other types:

```<code>const babel = require('gulp-babel'),

gulp.task('es6-commonjs',['clean-temp'], function(){
  return gulp.src(['app/*.js','app/**/*.js'])
    .pipe(babel({ modules: 'common' }))
    .pipe(gulp.dest('dest/temp'));
});
</code>```

Then use this task in your gulp pipe. More info here.

Body:
You can use a gulp task to convert es6 modules to other types:

const babel = require('gulp-babel'),

gulp.task('es6-commonjs',['clean-temp'], function(){
  return gulp.src(['app/*.js','app/**/*.js'])
    .pipe(babel({ modules: 'common' }))
    .pipe(gulp.dest('dest/temp'));
});

Then use this task in your gulp pipe. More info here.


问:
How to obtain text of a  element from another  element with jquery
I am trying to use a button inside a table division to set a variable as the same value as another division in the same row, but whenever I run my code (below), it returns the value of all the table divisions concatenated together. I am unsure why this was happening, so I replaced '.children()' with 'childnodes[0]' to try and get only the first name, but this just doesn't work and I don't why.

My html looks like this:

```<code>  <table>
    <tr>
      <td>John</td>
      <td>Doe</td>
      <td><button>Get First Name</button></td>
    </tr>
  </table>
</code>```

And my Javascript is this:

```<code>$(document).ready(function(){
    $("button").click(function(){
      var first = $(this).closest("tr").childNodes[0].text();
      alert(first)
        })
    });
</code>```

答:
set a variable as the same value as another division in the same row

there are lots of possibilities for this, here are some (with the most useful first (opinion based))

```<code>$("button").click(function() {
  var first = $(this).closest("tr").find("td:first").text();
  var first = $(this).closest("tr").find("td").first().text();
  var first = $(this).closest("tr").find("td").eq(0).text();

  var first = $(this).closest("tr").children().first().text();
  var first = $(this).closest("tr").children().eq(0).text();

  var first = $(this).closest("td").siblings().first().text();
});
</code>```

it returns the value of all the table cells concatenated together

https://api.jquery.com/text

Get the combined text contents of each element in the set of matched elements, including their descendants, or set the text contents of the matched elements.

because you're passing the "tr" to text() it gets the text of all the cells (tds) and their content etc and combines them as one, so you need to limit to the first as you've attempted.

however .childNodes[0] can only be applied to a DOM element/node, while $(this).closest("tr") gives you a jquery object/collection, which doesn't have .childNodes property.

So the jquery equivalent would be to use .children().eq(0).

Title: How to obtain text of a <td> element from another <td> element with jquery

Body:
I am trying to use a button inside a table division to set a variable as the same value as another division in the same row, but whenever I run my code (below), it returns the value of all the table divisions concatenated together. I am unsure why this was happening, so I replaced '.children()' with 'childnodes[0]' to try and get only the first name, but this just doesn't work and I don't why.

My html looks like this:

      John
      Doe
      <button>Get First Name</button>

And my Javascript is this:

$(document).ready(function(){
    $("button").click(function(){
      var first = $(this).closest("tr").childNodes[0].text();
      alert(first)
        })
    });

Body:
set a variable as the same value as another division in the same row

there are lots of possibilities for this, here are some (with the most useful first (opinion based))

$("button").click(function() {
  var first = $(this).closest("tr").find("td:first").text();
  var first = $(this).closest("tr").find("td").first().text();
  var first = $(this).closest("tr").find("td").eq(0).text();

  var first = $(this).closest("tr").children().first().text();
  var first = $(this).closest("tr").children().eq(0).text();

  var first = $(this).closest("td").siblings().first().text();
});

it returns the value of all the table cells concatenated together

https://api.jquery.com/text

Get the combined text contents of each element in the set of matched elements, including their descendants, or set the text contents of the matched elements.

because you're passing the "tr" to text() it gets the text of all the cells (tds) and their content etc and combines them as one, so you need to limit to the first as you've attempted.

however .childNodes[0] can only be applied to a DOM element/node, while $(this).closest("tr") gives you a jquery object/collection, which doesn't have .childNodes property.

So the jquery equivalent would be to use .children().eq(0).


问:
OpenLayers Bind Dynamic Checkbox Creation to GeoServer LayerGroup
Morning all,

Ok, so...I've been playing around with Geoserver, JQuery & OpenLayers and making some great progress. I'm running into a small issue.

I have Layergroups within GeoServer and I'm serving them to the HTML page by running the GeoServer REST API (http://:8080/geoserver/rest/workspaces/riskdatasuite/layergroups.json) which returns the list of Layergroups within Geoserver. I'm then dynamically creating n checkboxes matching the number of Layergroups (the idea being if I add a new Layergroup it's immediately available as a checkbox option within the HTML page). It also adds it to the map immediately. This works nicely (using the code below):

```<code>$(document).ready(function () {
  var inputs = [], i
  var riskLayers = []

  $.getJSON(_geoserverConfig.geoserver_url_layergroup, function (result) {

    var lgArray = result.layerGroups.layerGroup
    inputs.push('<ul class="layerlist_sort">');
    $.each(lgArray, function (index, value) {

      inputs.push('<li><input type="checkbox" id="' + index + '" name="' + value.name + '" checked>' + value.name + ' Flood</input></li>')

      var riskLayer = new TileLayer({
        source: new TileWMS({
          url: _geoserverConfig.geoserver_url_wms,
          params: { 'LAYERS': value.name, 'TILED': true, },
          serverType: 'geoserver',
          crossOrigin: null
        })
      });
      riskLayers = riskLayer;
      map.addLayer(riskLayer)
    });

    inputs.push('</ul>');
    $('#layerList').append(inputs.join(''))

    // map.addLayer(riskLayers)
  });

});
</code>```

I then setup up this bit of code:

```<code>  $(document).on('change', '[type=checkbox]', function() {

  var layer = $(this).attr("name")
  // this will contain a reference to the checkbox
  if (this.checked) {
    layer.setVisible(true);
  } else {
    // the checkbox is now no longer checked
    layer.setVisible(false);

  }
})
</code>```

So the idea is the name value corresponds with the create TileLayer. I'm trying to link the checkbox to that created TileLayer so I can set the visibility true/false...but clearly it's not working and I've done something wrong. The checkboxes appear and tick on/off but it is not even executing the

$("input[type='checkbox']").change(function ()

as even if I put a windows.alert('Checkbox Test'); within the checkbox function it's not alerting me.

Part of me is wondering if there is a sequence issue whereby the checkboxes are being created after the document is ready and there is a disconnect. I'm also sure that my use of setVisible is not correct either. I'm using the name value of the checkbox to correspond with the actual TileLayer which I'm sure I'm doing incorrectly.

Any advice would be grately appreciated!
Cheers,
B

答:
A simple improve to you code would be to use a dictionary with layer name as key and layer object as value, something like this

```<code>$(document).ready(function () {
  var inputs = [], i
  var riskLayers = {} // <- instead of array a dictionary

  $.getJSON(_geoserverConfig.geoserver_url_layergroup, function (result) {

    var lgArray = result.layerGroups.layerGroup
    inputs.push('<ul class="layerlist_sort">');
    $.each(lgArray, function (index, value) {

      inputs.push('<li><input type="checkbox" id="' + index + '" name="' + value.name + '" checked>' + value.name + ' Flood</input></li>')

      var riskLayer = new TileLayer({
        source: new TileWMS({
          url: _geoserverConfig.geoserver_url_wms,
          params: { 'LAYERS': value.name, 'TILED': true, },
          serverType: 'geoserver',
          crossOrigin: null
        })
      });
      riskLayers[value.name] = riskLayer; // <- add the layer to the dictionary
      map.addLayer(riskLayer)
    });

    inputs.push('</ul>');
    $('#layerList').append(inputs.join(''))

  });

});
</code>```

And then, on the checkbox events just do this,

```<code>$(document).on('change', '[type=checkbox]', function () {
  var chkProp = $(this).prop('checked');
  var layerN = $(this).attr("name")
  if(riskLayers.hasOwnProperty(layerN)){
      riskLayers[layerN].setVisible(chkProp);
  }
});
</code>```

Body:
Morning all,

Ok, so...I've been playing around with Geoserver, JQuery & OpenLayers and making some great progress. I'm running into a small issue.

I have Layergroups within GeoServer and I'm serving them to the HTML page by running the GeoServer REST API (http://:8080/geoserver/rest/workspaces/riskdatasuite/layergroups.json) which returns the list of Layergroups within Geoserver. I'm then dynamically creating n checkboxes matching the number of Layergroups (the idea being if I add a new Layergroup it's immediately available as a checkbox option within the HTML page). It also adds it to the map immediately. This works nicely (using the code below):

$(document).ready(function () {
  var inputs = [], i
  var riskLayers = []

  $.getJSON(_geoserverConfig.geoserver_url_layergroup, function (result) {

    var lgArray = result.layerGroups.layerGroup
    inputs.push('
');
    $.each(lgArray, function (index, value) {

      inputs.push('
<input type="checkbox" id="' + index + '" name="' + value.name + '" checked>' + value.name + ' Flood</input>
')

      var riskLayer = new TileLayer({
        source: new TileWMS({
          url: _geoserverConfig.geoserver_url_wms,
          params: { 'LAYERS': value.name, 'TILED': true, },
          serverType: 'geoserver',
          crossOrigin: null
        })
      });
      riskLayers = riskLayer;
      map.addLayer(riskLayer)
    });

    inputs.push('
');
    $('#layerList').append(inputs.join(''))

    // map.addLayer(riskLayers)
  });

});

I then setup up this bit of code:

  $(document).on('change', '[type=checkbox]', function() {

  var layer = $(this).attr("name")
  // this will contain a reference to the checkbox
  if (this.checked) {
    layer.setVisible(true);
  } else {
    // the checkbox is now no longer checked
    layer.setVisible(false);

  }
})

So the idea is the name value corresponds with the create TileLayer. I'm trying to link the checkbox to that created TileLayer so I can set the visibility true/false...but clearly it's not working and I've done something wrong. The checkboxes appear and tick on/off but it is not even executing the

$("input[type='checkbox']").change(function ()

as even if I put a windows.alert('Checkbox Test'); within the checkbox function it's not alerting me.

Part of me is wondering if there is a sequence issue whereby the checkboxes are being created after the document is ready and there is a disconnect. I'm also sure that my use of setVisible is not correct either. I'm using the name value of the checkbox to correspond with the actual TileLayer which I'm sure I'm doing incorrectly.

Any advice would be grately appreciated!
Cheers,
B

Body:
A simple improve to you code would be to use a dictionary with layer name as key and layer object as value, something like this

$(document).ready(function () {
  var inputs = [], i
  var riskLayers = {} // <- instead of array a dictionary

  $.getJSON(_geoserverConfig.geoserver_url_layergroup, function (result) {

    var lgArray = result.layerGroups.layerGroup
    inputs.push('<ul class="layerlist_sort">');
    $.each(lgArray, function (index, value) {

      inputs.push('<li><input type="checkbox" id="' + index + '" name="' + value.name + '" checked>' + value.name + ' Flood</input></li>')

      var riskLayer = new TileLayer({
        source: new TileWMS({
          url: _geoserverConfig.geoserver_url_wms,
          params: { 'LAYERS': value.name, 'TILED': true, },
          serverType: 'geoserver',
          crossOrigin: null
        })
      });
      riskLayers[value.name] = riskLayer; // <- add the layer to the dictionary
      map.addLayer(riskLayer)
    });

    inputs.push('</ul>');
    $('#layerList').append(inputs.join(''))

  });

});

And then, on the checkbox events just do this,

$(document).on('change', '[type=checkbox]', function () {
  var chkProp = $(this).prop('checked');
  var layerN = $(this).attr("name")
  if(riskLayers.hasOwnProperty(layerN)){
      riskLayers[layerN].setVisible(chkProp);
  }
});


问:
CPack: Package dependencies and Red Hat / SuSE naming schemes
When using CMake / CPack to build packages, there are CPACK_DEBIAN_PACKAGE_DEPENDS and CPACK_RPM_PACKAGE_REQUIRES to hold a list of packages the resulting .deb / .rpm should depend on.

The distinction is helpful, as package naming shemes differ between distributions. (Example: Distros using .debs add the major version of libicu to the package name -- i.e., libicu60 -- whereas distros using .rpms don't.)

However, there are differences between .rpm-distros as well, most notably between SuSE and RedHat. For example, SuSE names Boost packages libboost_system1.56.0 etc., whereas RedHat uses boost-system.

Is there an ideomatic way to either

maintain CPACK_RPM_PACKAGE_REQUIRES in a distro-agnostic way, or

detect the particular distribution / package naming pattern?

I know ways to figure out the distribution "the hard way" (parsing uname, checking files in /etc and so on) and then "hardcode" the individual package names into CPACK_RPM_PACKAGE_REQUIRES; I was wondering if CMake / CPack offered a more idiomatic way to approach the issue.

答:
I was wondering if CMake / CPack offered a more idiomatic way to approach the issue.

No, it doesn't. (at least yet).

The "hardcode" way is the only way nowadays. To the things that you've mentioned, I'd add running lsb-release if available, parse /etc/lsb-release and/or other distro-specific things from /etc...


问:
React JS: Populating a rsuite dropdown from a json object
I'm have this component using the rsuite ui  dropdown component  here is the Component Docs that should populate its elements from the json held in the component state but i keep getting this error any time i try clicking on either of the drop downs.

ERROR:
  VM7492:37 Warning: React DevTools encountered an error: TypeError: Converting circular structure to JSON
      --> starting at object with constructor 'Object'
      |     property '_context' -> object with constructor 'Object'
      --- property 'Provider' closes the circle

the code:

```<code>import React from 'react';
import {SelectPicker } from 'rsuite';

class TimeSelector extends React.Component {
  constructor() {
    super();
    this.state = {
      start_time: [
             {"start_hour":"12:00 AM","start_id":"am-0"},
             {"start_hour":"01:00 AM","start_id":"am-1"},
             {"start_hour":"02:00 AM","start_id":"am-2"},
             {"start_hour":"03:00 AM","start_id":"am-3"},
             {"start_hour":"04:00 AM","start_id":"am-4"},
             {"start_hour":"05:00 AM","start_id":"am-5"},
             {"start_hour":"06:00 AM","start_id":"am-6"},
             {"start_hour":"07:00 AM","start_id":"am-7"},
             {"start_hour":"08:00 AM","start_id":"am-8"},
             {"start_hour":"09:00 AM","start_id":"am-9"},
             {"start_hour":"10:00 AM","start_id":"am-10"},
             {"start_hour":"11:00 AM","start_id":"am-11"},
             {"start_hour":"12:00 PM","start_id":"pm-0"},
             {"start_hour":"1:00 PM","start_id":"pm-1"},
             {"start_hour":"2:00 PM","start_id":"pm-2"},
             {"start_hour":"3:00 PM","start_id":"pm-3"},
             {"start_hour":"4:00 PM","start_id":"pm-4"},
             {"start_hour":"5:00 PM","start_id":"pm-5"},
             {"start_hour":"6:00 PM","start_id":"pm-6"},
             {"start_hour":"7:00 PM","start_id":"pm-7"},
             {"start_hour":"8:00 PM","start_id":"pm-8"},
             {"start_hour":"9:00 PM","start_id":"pm-9"},
             {"start_hour":"10:00 PM","start_id":"pm-10"},
             {"start_hour":"11:00 PM","start_id":"pm-11"},
             {"start_hour":"12:00 PM","start_id":"pm-12"}
      ],
      end_time:[
              {"end_hour":"12:00 AM","end_id":"am-0"},
              {"end_hour":"01:00 AM","end_id":"am-2"},
              {"end_hour":"02:00 AM","end_id":"am-3"},
              {"end_hour":"03:00 AM","end_id":"am-4"},
              {"end_hour":"04:00 AM","end_id":"am-5"},
              {"end_hour":"05:00 AM","end_id":"am-5"},
              {"end_hour":"06:00 AM","end_id":"am-6"},
              {"end_hour":"07:00 AM","end_id":"am-7"},
              {"end_hour":"08:00 AM","end_id":"am-8"},
              {"end_hour":"09:00 AM","end_id":"am-9"},
              {"end_hour":"10:00 AM","end_id":"am-10"},
              {"end_hour":"11:00 AM","end_id":"am-11"},
              {"end_hour":"12:00 PM","end_id":"pm-0"},
              {"end_hour":"1:00 PM","end_id":"pm-1"},
              {"end_hour":"2:00 PM","end_id":"pm-2"},
              {"end_hour":"3:00 PM","end_id":"pm-3"},
              {"end_hour":"4:00 PM","end_id":"pm-4"},
              {"end_hour":"5:00 PM","end_id":"pm-5"},
              {"end_hour":"6:00 PM","end_id":"pm-6"},
              {"end_hour":"7:00 PM","end_id":"pm-7"},
              {"end_hour":"8:00 PM","end_id":"pm-8"},
              {"end_hour":"9:00 PM","end_id":"pm-9"},
              {"end_hour":"10:00 PM","end_id":"pm-10"},
              {"end_hour":"11:00 PM","end_id":"pm-11"},
              {"end_hour":"12:00 PM","end_id":"pm-12"}
      ],
      selectedStartTime:'',
      selectedEndTime:'',
    };

  }

  render() {

    return (
        <div>
            Start Time:
            <SelectPicker
                toggleComponentClass={Button}
                size="md"
                placeholder="12:00 AM"
                data={this.state.start_time}
                labelKey="start_hour"
                valueKey="start_id"
            />
            End Time:
            <SelectPicker
                toggleComponentClass={Button}
                size="md"
                placeholder={this.state.end_time[0].end_hour}
                data={this.state.end_time}
                labelKey="end_hour"
                valueKey="end_id"
            />
        </div>
    );
  }

  componentDidMount() {

  }

}

export default TimeSelector;
</code>```

i have checked the json object seems fine.

答:
In addition to Muhammad Zeeshan answer: You need to transform the data so that it matches the required data format.

For start time:

```<code>data={this.state.start_time.map(entry => ({
  label: entry.start_hour,
  value: entry.start_id,
})}
</code>```

and for your end time:

```<code>data={this.state.end_time.map(entry => ({
  label: entry.end_hour,
  value: entry.end_id,
})}
</code>```

Body:
I'm have this component using the rsuite ui  dropdown component  here is the Component Docs that should populate its elements from the json held in the component state but i keep getting this error any time i try clicking on either of the drop downs.

ERROR:
  VM7492:37 Warning: React DevTools encountered an error: TypeError: Converting circular structure to JSON
      --> starting at object with constructor 'Object'
      |     property '_context' -> object with constructor 'Object'
      --- property 'Provider' closes the circle

the code:

import React from 'react';
import {SelectPicker } from 'rsuite';

class TimeSelector extends React.Component {
  constructor() {
    super();
    this.state = {
      start_time: [
             {"start_hour":"12:00 AM","start_id":"am-0"},
             {"start_hour":"01:00 AM","start_id":"am-1"},
             {"start_hour":"02:00 AM","start_id":"am-2"},
             {"start_hour":"03:00 AM","start_id":"am-3"},
             {"start_hour":"04:00 AM","start_id":"am-4"},
             {"start_hour":"05:00 AM","start_id":"am-5"},
             {"start_hour":"06:00 AM","start_id":"am-6"},
             {"start_hour":"07:00 AM","start_id":"am-7"},
             {"start_hour":"08:00 AM","start_id":"am-8"},
             {"start_hour":"09:00 AM","start_id":"am-9"},
             {"start_hour":"10:00 AM","start_id":"am-10"},
             {"start_hour":"11:00 AM","start_id":"am-11"},
             {"start_hour":"12:00 PM","start_id":"pm-0"},
             {"start_hour":"1:00 PM","start_id":"pm-1"},
             {"start_hour":"2:00 PM","start_id":"pm-2"},
             {"start_hour":"3:00 PM","start_id":"pm-3"},
             {"start_hour":"4:00 PM","start_id":"pm-4"},
             {"start_hour":"5:00 PM","start_id":"pm-5"},
             {"start_hour":"6:00 PM","start_id":"pm-6"},
             {"start_hour":"7:00 PM","start_id":"pm-7"},
             {"start_hour":"8:00 PM","start_id":"pm-8"},
             {"start_hour":"9:00 PM","start_id":"pm-9"},
             {"start_hour":"10:00 PM","start_id":"pm-10"},
             {"start_hour":"11:00 PM","start_id":"pm-11"},
             {"start_hour":"12:00 PM","start_id":"pm-12"}
      ],
      end_time:[
              {"end_hour":"12:00 AM","end_id":"am-0"},
              {"end_hour":"01:00 AM","end_id":"am-2"},
              {"end_hour":"02:00 AM","end_id":"am-3"},
              {"end_hour":"03:00 AM","end_id":"am-4"},
              {"end_hour":"04:00 AM","end_id":"am-5"},
              {"end_hour":"05:00 AM","end_id":"am-5"},
              {"end_hour":"06:00 AM","end_id":"am-6"},
              {"end_hour":"07:00 AM","end_id":"am-7"},
              {"end_hour":"08:00 AM","end_id":"am-8"},
              {"end_hour":"09:00 AM","end_id":"am-9"},
              {"end_hour":"10:00 AM","end_id":"am-10"},
              {"end_hour":"11:00 AM","end_id":"am-11"},
              {"end_hour":"12:00 PM","end_id":"pm-0"},
              {"end_hour":"1:00 PM","end_id":"pm-1"},
              {"end_hour":"2:00 PM","end_id":"pm-2"},
              {"end_hour":"3:00 PM","end_id":"pm-3"},
              {"end_hour":"4:00 PM","end_id":"pm-4"},
              {"end_hour":"5:00 PM","end_id":"pm-5"},
              {"end_hour":"6:00 PM","end_id":"pm-6"},
              {"end_hour":"7:00 PM","end_id":"pm-7"},
              {"end_hour":"8:00 PM","end_id":"pm-8"},
              {"end_hour":"9:00 PM","end_id":"pm-9"},
              {"end_hour":"10:00 PM","end_id":"pm-10"},
              {"end_hour":"11:00 PM","end_id":"pm-11"},
              {"end_hour":"12:00 PM","end_id":"pm-12"}
      ],
      selectedStartTime:'',
      selectedEndTime:'',
    };

  }

  render() {

    return (

            Start Time:
            <SelectPicker
                toggleComponentClass={Button}
                size="md"
                placeholder="12:00 AM"
                data={this.state.start_time}
                labelKey="start_hour"
                valueKey="start_id"
            />
            End Time:
            <SelectPicker
                toggleComponentClass={Button}
                size="md"
                placeholder={this.state.end_time[0].end_hour}
                data={this.state.end_time}
                labelKey="end_hour"
                valueKey="end_id"
            />

    );
  }

  componentDidMount() {

  }

}

export default TimeSelector;

i have checked the json object seems fine.

Body:
In addition to Muhammad Zeeshan answer: You need to transform the data so that it matches the required data format.

For start time:

data={this.state.start_time.map(entry => ({
  label: entry.start_hour,
  value: entry.start_id,
})}

and for your end time:

data={this.state.end_time.map(entry => ({
  label: entry.end_hour,
  value: entry.end_id,
})}


问:
How can I declare StorageClass with Fibre Channel (FC) in Kubernetes
I'm setting up Kubernetes with SAN using FC.
From the docs: https://kubernetes.io/docs/concepts/storage/storage-classes/
It seems like Storage Class does not support FC, right?
If not, could some guys show me how to define Storage Class that support FC?
I'm stuck here.
Many thanks</p>

答:
Kubernetes docs mentioned about fc (fibre channel) so it can be achieve. Docs also redirecting to examples on Github.

Regarding use of storageClass I don't think it is possible (as you mentioned, its not supporting Fibre Channel). Solution might be write driver using FlexVolume, however I've read that there is driver for FC on Github. It would be worth to check it.