Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • heptapod heptapod
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 200
    • Issues 200
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • heptapodheptapod
  • heptapodheptapod
  • Repository
Switch branch/tag
  • heptapod
  • app
  • models
  • project.rb
Find file BlameHistoryPermalink
  • Lin Jen-Shin's avatar
    Ci::Pipeline.latest order by id DESC · 7a39dfdecf27
    Lin Jen-Shin authored Dec 23, 2016
    The name latest implies that it's reverse chronological,
    and we did expect it that way.
    
    https://gitlab.com/gitlab-org/gitlab-ce/issues/25993#note_20429761
    
    
    > ok, I think markglenfletchera is correct in
    > https://gitlab.com/gitlab-com/support-forum/issues/1394#note_20399939
    > that `Project#latest_successful_builds_for` is giving oldest pipeline
    > rather than latest pipeline. This is a ~regression introduced by !7333
    > where `order(id: :desc)` was removed causing this. The offending change
    > was:
    > https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7333/diffs#b22732e5f39e176c7c719fe485847d0fb0564275_92_108
    >
    > The confusion was caused by the `latest` name implication, which
    > actually didn't order anything, and I think we should add `order(id:
    > :desc)` to `Ci::Pipeline.latest` otherwise it's confusing that it's not
    > actually ordered.
    
    
    Closes #25993
    7a39dfdecf27