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

Load overlay ports in the correct order. #580

Merged
merged 1 commit into from
Jun 13, 2022

Conversation

BillyONeal
Copy link
Member

@BillyONeal BillyONeal commented Jun 10, 2022

In OverlayProviderImpl::load_all_control_files, overlay directories are consulted in consecutive order. Each consulted directory overwrites any overlays that were visited previously. This means that given multiple overlays, the last one wins.

However, in OverlayProviderImpl::load_port, the overlay directories are still consulted in consecutive order, but the first one is chosen. This means that the result will be different than load_all_control_files if multiple overlays contain the same port.

Based on e2e tests, the intent appears to be that the first overlay wins, so we need to do load_all_control_files in reverse order.

In OverlayProviderImpl::load_all_control_files, overlay directories are consulted in consecutive order. Each consulted directory overwrites any overlays that were visited previously. This means that given multiple overlays, the last one wins.

However, in OverlayProviderImpl::load_port, the overlay directories are still consulted in consecutive order, but the first one is chosen. This means that the result will be different than load_all_control_files if multiple overlays contain the same port.

Based on e2e tests, the intent appears to be that the first overlay wins, so we need to do load_all_control_files in reverse order.
@BillyONeal BillyONeal merged commit 1ee30db into microsoft:main Jun 13, 2022
@BillyONeal BillyONeal deleted the overlay-port-provider-order branch June 13, 2022 20:44
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.

2 participants