Skip to content

Conversation

cburgmer
Copy link
Contributor

@cburgmer cburgmer commented Nov 5, 2018

This PR tries to implement what's being asked for in #438.

Following the documentation in https://github.com/concourse/concourse/blob/master/.github/CONTRIBUTING.md#running-concourse one should yield the following.

Given the token from ~/.flyrc:

$ curl 'http://localhost:8080/api/v1/teams/main/cc.xml' -H 'Authorization: Bearer YOUR_TOKEN'
<Projects>
  <Project activity="Sleeping" lastBuildLabel="5" lastBuildStatus="Success" 
           lastBuildTime="2018-11-05T20:02:57Z" name="example :: hello-world"
           webUrl="http://localhost:8080/teams/main/pipelines/example/jobs/hello-world"></Project>
</Projects>

I've assumed that an aborted build shall be marked as failed. Apologies for mixed tabs and spaces, I've trusted GoLand to choose the right thing to do, it might have failed me horribly.

The only way to currently access the endpoint is via a token retrieved from fly AFAIK (see above example). I wonder what Concourse wants to offer other apps when it comes to retrieving a long running session, preferably with easy user login. Currently I would see this as a blocker for integrating this new endpoint in my build monitor tools of choice.

@pivotal-issuemaster
Copy link

@cburgmer Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@cburgmer Thank you for signing the Contributor License Agreement!

activity = "Sleeping"
}

webUrl := s.createWebUrl([]string{

This comment was marked as spam.

This comment was marked as spam.

vito
vito previously requested changes Nov 19, 2018
Copy link
Member

@vito vito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for starting on this! 🙂 Left some feedback/requests inline.

@cburgmer
Copy link
Contributor Author

Halfway through the changes I had to upgrade to Golang 1.11.2 to solve their issue 27925 (although I'm unsure whether this helped, or cherry-picking ce8743a). I'm now left with a broken ginkgo -r -p, as go insists on touching ./go.{mod,sum} and failing with task.go:8:2: unknown import path "gopkg.in/yaml.v2". I'm not sure how to resolve this now. Happy to rebase on master if this makes this problem go away.

@vito
Copy link
Member

vito commented Nov 20, 2018

@cburgmer Not sure what version of Go you were on before, but if this is your first time with 1.11.x make sure it's cloned outside of your $GOPATH since projects using Go modules shouldn't be under that tree anymore.

It's also possible that ginkgo -r -p tried to fetch dependencies in parallel and corrupted your module cache (I think I've had that happen to me before). Make sure the repo is outside your $GOPATH, then try running go clean -modcache; go mod download; ginkgo -r -p to reset the fetched modules, fetch them serially (once), and then run the tests.

@cburgmer
Copy link
Contributor Author

Let me know if there's more feedback on the code. As for the topic as such, we can probably continue the conversation on the original issue.

@cburgmer
Copy link
Contributor Author

Just a note as the build has started failing: The merge of this PR is not blocked on the changes, but held back by the maintainers who only wish to maintain this feature should enough folks ask for it (hope I'm representing the sentiment correctly).

@vito vito requested a review from jwntrs January 17, 2019 16:18
@vito vito dismissed their stale review January 17, 2019 16:18

outdated - deferring approval to someone else

@vito
Copy link
Member

vito commented Jan 17, 2019

@cburgmer Sorry for leaving this in limbo, we were on the fence about this and let it sit over the holidays. I've pinged @pivotal-jwinters to review, thanks for your patience!

@jwntrs
Copy link
Contributor

jwntrs commented Jan 17, 2019

@cburgmer did you solve your upstream auth issues with CCMenu?

@cburgmer
Copy link
Contributor Author

@pivotal-jwinters I did not proceed while this PR was pending so far, but doing so now.

Imho this PR should be considered independently of whether CCMenu supports OAuth or not right now, as cc.xml is consumed by more than this one app. Also, do consider that this is a bit of a chicken and egg situation here for both products :)

As for logging in via OIDC into Concourse, I haven't found much documentation. I did reverse engineer fly's exchange. Is using the fly clientId the right step forward for now for fetching tokens?

@jwntrs
Copy link
Contributor

jwntrs commented Jan 18, 2019

Fair enough, just out of curiosity what other services use cc.xml?

As far as automating the OAuth flow, yeah, you can just use fly's public client.

At this point I think we can merge this, but just a heads up we're going to be revamping our APIs so things might change in the future.

jwntrs
jwntrs previously approved these changes Jan 18, 2019
@cburgmer
Copy link
Contributor Author

Thanks. AFAIK CCTray started the format, CCMenu is the OSX implementation but loads of other bigger or smaller build monitors exist based on that format.
It happens that Concourse's own dashboard is quite slim, so there's less need for a monitor you might say. For me nothing trumps playing a 'sad trumpet' sound when the build fails for the team to improve on the MTTR.

@vito
Copy link
Member

vito commented Jan 18, 2019

I'm not sure why but the DCO/WIP checks don't seem to have fired for this. @cburgmer would you mind rebasing and pushing to kick everything off again?

@cburgmer
Copy link
Contributor Author

Sure. Rebased and pushed.

@vito
Copy link
Member

vito commented Jan 21, 2019

@cburgmer DCO bot still isn't happy - looks like you need to run:

git rebase HEAD~13 --signoff

Signed-off-by: Christoph Burgmer <christoph.burgmer@gmail.com>
Signed-off-by: Christoph Burgmer <christoph.burgmer@gmail.com>
Signed-off-by: Christoph Burgmer <christoph.burgmer@gmail.com>
Signed-off-by: Christoph Burgmer <christoph.burgmer@gmail.com>
Signed-off-by: Christoph Burgmer <christoph.burgmer@gmail.com>
Signed-off-by: Christoph Burgmer <christoph.burgmer@gmail.com>
Signed-off-by: Christoph Burgmer <christoph.burgmer@gmail.com>
This matches my expectation with Jenkins.

Signed-off-by: Christoph Burgmer <christoph.burgmer@gmail.com>
Signed-off-by: Christoph Burgmer <christoph.burgmer@gmail.com>
Signed-off-by: Christoph Burgmer <christoph.burgmer@gmail.com>
Signed-off-by: Christoph Burgmer <christoph.burgmer@gmail.com>
Signed-off-by: Christoph Burgmer <christoph.burgmer@gmail.com>
…E :: JOB'

Signed-off-by: Christoph Burgmer <christoph.burgmer@gmail.com>
@cburgmer
Copy link
Contributor Author

Did the sign-off. I cannot reproduce either failures from testflight and unit locally.

@vito
Copy link
Member

vito commented Jan 24, 2019

@cburgmer Thanks! They look like flakes; I'll re-trigger.

Copy link
Member

@vito vito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging - thanks again!

@vito vito merged commit 889bb4a into concourse:master Jan 24, 2019
@vito vito added this to the v5.0.0 milestone Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants