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

Wrong project after cancel when creating new syncer #277

Closed
reststop opened this issue May 26, 2016 · 4 comments
Closed

Wrong project after cancel when creating new syncer #277

reststop opened this issue May 26, 2016 · 4 comments

Comments

@reststop
Copy link

Environment:

Existing Syncers:
* Name
    * Server: localhost
    * Project: [Name]
    * Repo: stash.company.com:port
    * Template: [Name]PRs
* Buildasaur
    * Server: localhost
    * Project: Buildasaur
    * Repo:stash.company.com

What happened was I was creating a new Syncer to point to a 2nd project instance of Buildasaur on public GitHub instead of my copy on our Stash server

It reached the page to test the repo-server connection and this failed (possibly due to our company firewall).

I clicked "Cancel"

Then tried to recereate the Syncer again

Selected LocalHost. Next. OK
Xcode Server: Next. OK
Select Xcode Project: Add new xcode project... Next.

Now the screen shows me the template for my "Name" project already filled in instead of letting me choose a project.

I suspect that something remembers that a project was selected, or something didn't get cleared out. The Name project syncer was running at the time.

Seeing if it is repeatable::

Quit Buildasaur (was running in debug mode in Xcode)

Tell Xcode: Run
Tell Buildasaur: View "Name" Syncer
Start Syncer "Name"

Click on [New Syncer]
Select Xcode Server... https://localhost (user) [Next].
Xcode Server: https://localhost, user, password [Next].
access verified
Select Xcode Project... Add New Xcode Project [Next].

Hmmmm... something is stuck. Comes up with

https://localhost + "Name" + New Build Template
showing the "Name" project already selected, showing the stash URL, and ssh keys already filled in

Not good.

It appears to be stuck on the "Name" Syncer even though I selected "Add New Xcode Project..."

@reststop
Copy link
Author

Additional Info:

Checked Syncers.json. Looks OK.

[
  {
    "preferred_template_ref" : "9FB36056-E824-4B17-B6C6-0A509ABB53CF",
    "id" : "651B80E6-FB03-427C-96FE-8BF40BFF235C",
    "sync_interval" : 300,
    "server_ref" : "C88C41F4-C4D3-4111-AF0C-A4757EF38AA7",
    "post_status_comments" : true,
    "project_ref" : "2D993DA2-2E3B-4C12-B3C3-0CDD1EC3CCD2",
    "wait_for_lttm" : false,
    "watched_branches" : [
    ]
  },
  {
    "preferred_template_ref" : "D31B0052-101E-4DD9-8E25-EB0B871DC902",
    "id" : "4ABE76A1-D1B5-4E2A-82D9-17C45E03AA7F",
    "sync_interval" : 120,
    "server_ref" : "C88C41F4-C4D3-4111-AF0C-A4757EF38AA7",
    "post_status_comments" : true,
    "project_ref" : "19D91C4D-04B8-4088-9D96-51DBFE479D13",
    "wait_for_lttm" : false,
    "watched_branches" : [
    ]
  }
]

Checked Projects.json
Shows 3 projects, although the project pop-up only showed two: Name, Buildasaur
The 2nd project was created with the same project name even though the syncer was never created.

[
  {
    "service_type" : "github",
    "ssh_public_key_url" : "\/Users\/user\/.ssh\/id_rsa.pub",
    "id" : "2D993DA2-2E3B-4C12-B3C3-0CDD1EC3CCD2",
    "url" : "\/Users\/user\/buildasaur\/buildasaur\/Buildasaur.xcworkspace",
    "ssh_private_key_url" : "\/Users\/user\/.ssh\/id_rsa"
  },
  {
    "service_type" : "github",
    "ssh_public_key_url" : "\/Users\/user\/.ssh\/id_rsa.pub",
    "id" : "19D91C4D-04B8-4088-9D96-51DBFE479D13",
    "url" : "\/Users\/user\/name\/myrepo\/Name\/Name.xcworkspace",
    "ssh_private_key_url" : "\/Users\/user\/.ssh\/id_rsa"
  },
  {
    "service_type" : "github",
    "ssh_public_key_url" : "\/Users\/user\/.ssh\/id_rsa.pub",
    "id" : "AB5EDAF0-8C6B-4401-ABE1-188F0CC45C0F",
    "url" : "\/Users\/user\/buildasaur\/myrepo\/Buildasaur.xcworkspace",
    "ssh_private_key_url" : "\/Users\/user\/.ssh\/id_rsa"
  }
]

I presume you've tested having multiple syncers with the same project name, but different projects.
It is possible that this could be related to having two projects with the same name existing on different repos. (I am guessing, without looking at the code)

Note: There is no Template file created for the 3rd project entry, which makes sense since we never got to creating a new template.

I'll be looking at the code next.

@reststop
Copy link
Author

A little more info...

When I select the "Name" project, then it used the 2nd Buildasaur project.
This seems like there is an ordering issue which is getting the order wrong.

Popup shows:

  • Buildasaur
  • Name
  • New Project...

Selecting each of these we get:

  • Buildasaur - stash
  • Buildasaur - github
  • Name - stash

@czechboy0
Copy link
Member

Once again, this could be an issue with the fork. If you can reproduce this error with the official release of buildasaur (just with BitBucket Cloud and GitHub.com projects, I'll take a look because that would mean it's an issue in main repo Buildasaur).

@reststop
Copy link
Author

reststop commented Jun 4, 2016

I'll let you know.

The branch I forked from gchiong currently only works on my Stash server,
as the JSON shows all projects are "github".

So, the plan come Monday is to work off a direct fork of your repo, and add
in the Stash server and verify we see something other than just "github" it
can work against both Stansh and GitHub at the same time.

Once that is working I will test against github, or possibly will try a
test against github before I add the Stash stuff to see if it is
reproducible on your master build.

Cheers,

-Carl

On Fri, Jun 3, 2016 at 1:28 AM, Honza Dvorsky notifications@github.com
wrote:

Once again, this could be an issue with the fork. If you can reproduce
this error with the official release of buildasaur (just with BitBucket
Cloud and GitHub.com projects, I'll take a look because that would mean
it's an issue in main repo Buildasaur).


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#277 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AARgKcF6VrDRSkXBYa11Yj6kN9tZ4MMAks5qH-WsgaJpZM4IoAb8
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants