Skip to content
GitLab Next
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab FOSS GitLab FOSS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

Scheduled maintenance on the database layer will take place on 2022-07-02. We expect GitLab.com to be unavailable for up to 2 hours starting from 06:00 UTC. Kindly follow our status page for updates and read more in our blog post.

  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Merge requests
  • !13977

Fix MR widget with external CI services/integrations

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Eric Eastwood requested to merge 33287-fix-mr-widget-errors-with-external-services into master Sep 01, 2017
  • Overview 28
  • Commits 1
  • Pipelines 11
  • Changes 10

What does this MR do?

EE MR, https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2922

  • Fix MR widget throwing errors with external CI services/integrations
  • Fix up some logic where it would allow merge when "Only allow merge requests to be merged if the pipeline succeeds" was set

External integration/service

Pipeline Status Only allow merge requests to be merged if the pipeline succeeds Before After
'failed' true
'canceled' true
'running' true
'pending' true
'success' true
'success_with_warnings' true
'skipped' true
'not_found' true
--- --- ---
'failed' false
'canceled' false
'running' false
'pending' false
'success' false
'success_with_warnings' false
'skipped' false
'not_found' false

GitLab CI pipeline

Should be no change...

Pipeline Status Only allow merge requests to be merged if the pipeline succeeds Before After
'running' true
'failed' true
'success' true
'skipped' true
'running' false
'failed' false
'success' false
'skipped' false

Are there points in the code the reviewer needs to double check?

  • Link to external builds, https://gitlab.com/gitlab-org/gitlab-ce/issues/37305
  • Added "The pipeline for this merge request has not succeeded yet." state for running, pending, etc otherwise it would say "The pipeline for this merge request failed. Please retry the job or push a new commit to fix the failure"

Use the MockCI service/integration

Checkout the MockCI service for easy testing of states.

Get the TeamCity service/integration running

  1. Download TeamCity
  2. Run it, /Users/eric/Downloads/TeamCity/bin/runAll.sh start
  3. Visit and follow guided steps, http://localhost:8111
  4. Create a TeamCity admin account, http://localhost:8111/setupAdmin.html
  5. Create a project/repo on your local GDK. I just copied over the gitter-ios-app xcode project
  6. Follow the steps here using the repo you just created, https://confluence.jetbrains.com/display/TCD9/Configure+and+Run+Your+First+Build
  7. Add the TeamCity integration to your GitLab project, Settings -> Integrations -> JetBrains TeamCity CI (make sure to check the "Active" checkbox)
    Teamcity url: http://localhost:8111/
    Build type: TeamCityIntegrationTest_SomeBuildConfig (you can grab this from the "General Settings" of the TeamCity project)
    Username/Password: Use the TeamCity admin account you created above
  8. When you are done, you can stop it with /Users/eric/Downloads/TeamCity/bin/runAll.sh stop

Why was this MR needed?

  • MR widget is broken with external services/integrations.

Does this MR meet the acceptance criteria?

  • Changelog entry added, if necessary
  • Tests added for this feature/bug
  • Review
    • Has been reviewed by UX
    • Has been reviewed by Frontend
  • Conform by the merge request performance guides
  • Conform by the style guides
  • Squashed related commits together

What are the relevant issue numbers?

Closes #33287 (closed)

Edited Sep 18, 2017 by Eric Eastwood
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: 33287-fix-mr-widget-errors-with-external-services