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

check: Fix handling of <remove-project /> element #37

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

makohoek
Copy link
Owner

When repo-resource creates a version string (which is a full XML representation of a manifest), the <remove-project> tag is not taken into account.
Because of this, we generate "false positives" for new Versions, which could trigger unwanted builds.

For example, with manifest [1], we see that the Version string has the device/amlogic/yukawa project twice, which is wrong.

Handle the element to fix this.

[1] https://github.com/makohoek/demo-manifests/blob/main/aosp_remove_yukawa_project.xml
Fixes: #36
Fixes: c23fc0c ("Switch to getRevision code based on git ls-remote")
Signed-off-by: Mattijs Korpershoek [email protected]

Copy link
Collaborator

@david-baylibre david-baylibre left a comment

Choose a reason for hiding this comment

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

1 easy optimization that I can think of

repo_resource/common.py Show resolved Hide resolved
@makohoek makohoek force-pushed the mkorpershoek/remove-project branch from 8003708 to 6f3aeac Compare August 14, 2024 14:24
@makohoek
Copy link
Owner Author

Change in v2:

  • Implemented suggestion from David to early exit when removed_projects is an empty list.

@makohoek makohoek force-pushed the mkorpershoek/remove-project branch from 6f3aeac to c1c256b Compare August 14, 2024 14:37
@makohoek
Copy link
Owner Author

Change in v3:

When `repo-resource` creates a version string (which is a full XML
representation of a manifest), the `<remove-project>` tag is not
taken into account.
Because of this, we generate "false positives" for new Versions,
which could trigger unwanted builds.

For example, with manifest [1], we see that the Version string has
the device/amlogic/yukawa project twice, which is wrong.

Handle the <remove-project /> element to fix this.

[1] https://github.com/makohoek/demo-manifests/blob/main/aosp_remove_yukawa_project.xml
Fixes: #36
Fixes: c23fc0c ("Switch to getRevision code based on git ls-remote")
Signed-off-by: Mattijs Korpershoek <[email protected]>
@makohoek makohoek force-pushed the mkorpershoek/remove-project branch from c1c256b to a99841b Compare August 14, 2024 14:38
@makohoek
Copy link
Owner Author

Change in v4:

  • Fixed flake8 reports.

Copy link
Collaborator

@david-baylibre david-baylibre 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 the changes @makohoek !

@makohoek makohoek merged commit 1b11ea4 into main Aug 14, 2024
2 checks passed
@makohoek makohoek deleted the mkorpershoek/remove-project branch August 14, 2024 14:59
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

Successfully merging this pull request may close these issues.

<remove-project> is not taken into account in Version
3 participants