Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Dashboard missing data due to CLI generated pipelines rely on string matching #1389

Closed
andrebriggs opened this issue Apr 27, 2020 · 1 comment · Fixed by microsoft/bedrock-cli#29
Assignees
Labels
bug Something isn't working x-project Mapped to external projects

Comments

@andrebriggs
Copy link
Member

Describe the bug:

Enabling a preview feature in AzDO changes the title of merged pull requests. This results in unexpected behavior for introspection features of Bedrock and the dashboard.

Below we can clearly see there is a reliance on string matching:

- script: |-
      set -e
      cd "$HOME"/${MANIFEST_REPO##*/}
      commitId=$(Build.SourceVersion)
      commitId=$(echo "${commitId:0:7}")
      latest_commit=$(git rev-parse --short HEAD)
      url=$(git remote --verbose | grep origin | grep fetch | cut -f2 | cut -d' ' -f1)
      repourl=${url##*@}
      echo "Downloading SPK"
      curl https://raw.githubusercontent.com/Microsoft/bedrock/master/gitops/azure-devops/build.sh > build.sh
      chmod +x build.sh
      . ./build.sh --source-only
      get_spk_version
      download_spk
      message="$(Build.SourceVersionMessage)"
      if [[ $message == *"Merged PR"* ]]; then
      pr_id=$(echo $message | grep -oE '[0-9]+' | head -1 | sed -e 's/^0\+//')
      ./spk/spk deployment create -n $(INTROSPECTION_ACCOUNT_NAME) -k $(INTROSPECTION_ACCOUNT_KEY) -t $(INTROSPECTION_TABLE_NAME) -p $(INTROSPECTION_PARTITION_KEY) --p3 $(Build.BuildId) --hld-commit-id $commitId --manifest-commit-id $latest_commit --pr $pr_id --repository $repourl
      else
      ./spk/spk deployment create -n $(INTROSPECTION_ACCOUNT_NAME) -k $(INTROSPECTION_ACCOUNT_KEY) -t $(INTROSPECTION_TABLE_NAME) -p $(INTROSPECTION_PARTITION_KEY) --p3 $(Build.BuildId) --hld-commit-id $commitId --manifest-commit-id $latest_commit --repository $repourl
      fi
    displayName: 'If configured, update manifest pipeline details in Spektate db'
    condition: 'and(ne(variables[''INTROSPECTION_ACCOUNT_NAME''], ''''), ne(variables[''INTROSPECTION_ACCOUNT_KEY''], ''''),ne(variables[''INTROSPECTION_TABLE_NAME''], ''''),ne(variables[''INTROSPECTION_PARTITION_KEY''], ''''))'

The dashboard result:

image

To Reproduce:
Enable preview feature in AzDO. run pipelines, and then look at Spektate dashboard.

image

Expected behavior:
The dashboard should display the correct information.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working x-project Mapped to external projects
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants