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

[CT-2494] Detect and restrict project-level cycles in dependencies.yml #7468

Closed
Tracked by #7372
MichelleArk opened this issue Apr 26, 2023 · 0 comments · Fixed by #7558
Closed
Tracked by #7372

[CT-2494] Detect and restrict project-level cycles in dependencies.yml #7468

MichelleArk opened this issue Apr 26, 2023 · 0 comments · Fixed by #7558
Assignees

Comments

@MichelleArk
Copy link
Contributor

MichelleArk commented Apr 26, 2023

Example:

Project A

(no dependencies.yml)

-- project_a_publication.json

{
	"project_name": "A"
	"dependencies": []
}

Project B
Has access to project A’s publication artifact

-- dependencies.yml

projects:
- project: A

-- project_b_publication.json

{
	"project_name": "B"
	"dependencies": ["A"]
}

Project C

Has access to project B’s publication artifact, but not project A’s
-- dependencies.yml

projects:
- project: B

-- project_c_publication.json

{
	"project_name": "C"
	"dependencies": ["B", "A"]
}

If A tries to add project C to its dependencies, it will pull down C’s publication artifact which includes itself in the dependencies → raise project cycle error.

If A tries to add project B to its dependencies, same thing.

If B tries to add project C to its dependencies, same thing.

Implementation Notes:
This could be done very early during parsing - as early as when publication artifacts are loaded, or could be deferred until compilation (assuming publication_dependencies are in the manifest) to keep a consistent location for cycle detection / error raising.

@github-actions github-actions bot changed the title Detect and restrict project-level cycles in dependencies.yml [CT-2494] Detect and restrict project-level cycles in dependencies.yml Apr 26, 2023
@gshank gshank self-assigned this May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants