Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GFM spec redesign #1355

Merged
merged 4 commits into from
Sep 2, 2012
Merged

GFM spec redesign #1355

merged 4 commits into from
Sep 2, 2012

Conversation

rspeicher
Copy link
Contributor

Should now be much clearer about what each spec is actually testing. For example, instead of testing stuff like link classes and titles in every single call as a side-effect of testing equality, we only test those things once, in their own specs.

As part of this, I ended up adding a StaticModel role that I then added to Commit, so instead of doing this:

link_to(commit.id, project_commit_path(project, id: commit.id))
Note.create(noteable_id: commit.id, noteable_type: "Commit", ...)

it lets us do this:

link_to(commit.id, project_commit_path(project, commit))
Note.create(noteable: commit, ...)

Instead of doing this:

    link_to(commit.id, project_commit_path(project, id: commit.id))
    Note.create(noteable_id: commit.id, noteable_type: "Commit", ...)

It lets us do this:

    link_to(commit.id, project_commit_path(project, commit))
    Note.create(noteable: commit, ...)
Should now be much clearer about what each spec is actually testing.
For example, instead of testing stuff like link classes and titles in
every single call, we only test those things once, in their own specs.
@travisbot
Copy link

This pull request passes (merged ef24576 into aecbd31).

dzaporozhets added a commit that referenced this pull request Sep 2, 2012
@dzaporozhets dzaporozhets merged commit f9711cd into gitlabhq:master Sep 2, 2012
@dzaporozhets
Copy link
Member

Good one.thanks,

rspeicher pushed a commit that referenced this pull request Jun 14, 2016
…o 'master'


Bamboo & TeamCity Services: Fix missing credentials & URL handling

_Note: Originally opened at !4367 by @bentolor_

I've also fixed the URL handling for TeamCity which is very similar to Bamboo implementation-wise.

-----

*Note:* This is a port from my [original pull request on GitHub](#9428)

## What does this MR do?
This improves the Bamboo Service and provides two fixes:

1. One for the situation, where the build trigger won't work because Bamboo is requiring authentication credentials for the trigger GET: 8f25aca
2. One which fixes the way how the configured Bamboo base URL is assembled to the final REST URL. fe9eb30

### Regarding credentials
The change now does provide additional HTTP Basic Auth parameters if user credentials were provided and appends an request parameter indicating the HTTP Basic Authentication should be used. This aligns interaction with Bamboo with the other calls this service executes.

### Regarding URL handling
If one had configured a `bamboo_url` like http://foo.bar/bamboo in the previous implementation the plugin directed it's request i.e. to http://foo.bar/rest/... instead of http://foo.bar/bamboo/rest/...


## Are there points in the code the reviewer needs to double check?
The second issues was probably an unwanted side effect of how Ruby's `URI.join` is working. It will only work correctly, if 
- ... the prefix URL has at least one or more  trailing `/`
- .. the appendix parts are _not_ prefixed with `/`

I need try & figure it out using the rather lacking, official stdlib documentation and playing around in `irb`. As I'm an absolute Ruby novice I'm unable to add/provide new tests.

## Why was this MR needed?
Because Gitlab does not work in our Bamboo-Environment at all: Neither it is able to trigger Bamboo runs nor does the Merge status check work. This MR at least fixes the trigger issues.

## What are the relevant issue numbers?
This MR originates from my [original pull request on GitHub](#9428).
Sadly the issue, that the merge status is still not working correctly for branches will still not work. But at least the trigger works. 

There happened to be very much discussion about the branch status issue in #1355 and  #2562 though that one is lost as the author retracted his branch. 

See merge request !4408
stanhu added a commit that referenced this pull request Jul 8, 2018
The original API that queries by label (`/rest/api/latest/result?label=#{sha1}`)
only works for results from main plans and not branch plans. The
`/rest/api/latest/result/byChangeset/#{sha1}` endpoint gives results from
branch plans but not for the first push to the branch. Subsequent pushes
work.

For more details, see https://jira.atlassian.com/browse/BAM-16121.

Closes #1355
stanhu pushed a commit that referenced this pull request Jul 8, 2018
Fix Bamboo CI status not showing for branch plans

Closes #1355

See merge request gitlab-org/gitlab-ce!20277
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants