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

Support depots of depth > 1 #12

Open
parnic-sks opened this issue Jun 4, 2024 · 8 comments
Open

Support depots of depth > 1 #12

parnic-sks opened this issue Jun 4, 2024 · 8 comments

Comments

@parnic-sks
Copy link

parnic-sks commented Jun 4, 2024

Our Perforce depots use a 4-depth system to help organize branches. RUGS doesn't seem to recognize this format as it's not reporting badges for our builds made in other streams.

Docker logs look like this:

2024-04-11T15:39:10.763075Z  INFO rugs::handlers: Creating new project for stream //project/mainline, project name main/core/projectgame
2024-06-03T15:19:06.683648Z  INFO rugs::handlers: Creating new project for stream //project/mainline, project name release/demo/projectgame

When I'd expect to see something like this instead:

2024-04-11T15:39:10.763075Z  INFO rugs::handlers: Creating new project for stream //project/mainline/main/core, project name projectgame
2024-06-03T15:19:06.683648Z  INFO rugs::handlers: Creating new project for stream //project/mainline/release/demo, project name projectgame

We are seeing badges in mainline properly, and I'm assuming that's because it was the first branch/stream for the entire depot.

@thejustinwalsh
Copy link
Contributor

We use a depth of 3 for our streams, and I am about to try to integrate RoboMerge for badging.
Will report back.

@thejustinwalsh
Copy link
Contributor

Added release branch and no metadata.
I'll attempt a PR to resolve this. I'm thinking of an environment variable that accepts the same depth value as P4 when creating the stream depo.

@parnic-sks
Copy link
Author

I don't think / can be in a stream name, so would it be safe to grab the last index of / when trying to find the project name?

@thejustinwalsh
Copy link
Contributor

thejustinwalsh commented Jul 10, 2024

Ahh, P4 indeed enforces that your stream name can not have more slashes than your depot depth.
If you are trying to determine a subpath of the stream, depth seems necessary, though.

image

@thejustinwalsh
Copy link
Contributor

PR in; however, migrating the data from the incorrect project name in the DB to the correct one before updating would still be an exercise for the user.

I am going to push up a container and give it a test in my live instance.

@parnic-sks
Copy link
Author

PR in; however, migrating the data from the incorrect project name in the DB to the correct one before updating would still be an exercise for the user.

I am going to push up a container and give it a test in my live instance.

How did the tests go? Is this ready to merge?

@thejustinwalsh
Copy link
Contributor

thejustinwalsh commented Jul 25, 2024

Testing this now, currently stalled on working through what the migration query.
I think I can run a slightly insane query to update the paths in the DB, and then test.

@thejustinwalsh
Copy link
Contributor

thejustinwalsh commented Jul 25, 2024

Did not work, see:

#13 (comment)

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