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

prevent service name to be equal to step name #557

Closed
anbraten opened this issue Nov 30, 2021 · 7 comments · Fixed by #1802
Closed

prevent service name to be equal to step name #557

anbraten opened this issue Nov 30, 2021 · 7 comments · Fixed by #1802
Labels
bug Something isn't working
Milestone

Comments

@anbraten
Copy link
Member

Unbenannt

postgres and mysql jobs are skipped somehow

@anbraten
Copy link
Member Author

anbraten commented Dec 1, 2021

Issue detected: Service name is not allowed to be equal to one step name.
TODO: add config check to prevent that.

@anbraten anbraten changed the title ci.woodpecker-ci.org is skipping steps (auto canceled) prevent service name to be equal to step name Dec 1, 2021
@6543
Copy link
Member

6543 commented Dec 1, 2021

instead of preventing it we should fix the underling bug

@6543 6543 added this to the 0.15.0 milestone Dec 1, 2021
@6543 6543 added the bug Something isn't working label Dec 1, 2021
@6543 6543 mentioned this issue Dec 6, 2021
@anbraten
Copy link
Member Author

anbraten commented Jan 9, 2022

// add services steps
if len(conf.Services.Containers) != 0 {
	stage := new(backend.Stage)
	stage.Name = fmt.Sprintf("%s_services", c.prefix)
	stage.Alias = "services"

	for i, container := range conf.Services.Containers {
		if !container.Constraints.Match(c.metadata) {
			continue
		}

+		name := fmt.Sprintf("%s_services_%d", c.prefix, i)
		step := c.createProcess(name, container, "services")
		stage.Steps = append(stage.Steps, step)
	}
	config.Stages = append(config.Stages, stage)
}

Hmm, the compiler should not be the problem.

@6543
Copy link
Member

6543 commented Jan 9, 2022

without looking at the code, i guess it's an issue with the gRPC api

@6543
Copy link
Member

6543 commented Jan 9, 2022

https://github.com/woodpecker-ci/woodpecker/blob/master/pipeline/rpc/proto/woodpecker.proto#L92-L95

look's like the name is actually used as ID for gRPC - we just have to change that

EDIT: no ProcID is used - so the conflict should not come from agent

@6543 6543 modified the milestones: 0.15.0, 1.0.0 Feb 21, 2022
@anbraten
Copy link
Member Author

linking #983

@6543
Copy link
Member

6543 commented Jun 4, 2023

-> #1802

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants