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

engine: store manifest enabled state in ManifestState #5396

Merged
merged 1 commit into from
Jan 25, 2022

Conversation

landism
Copy link
Member

@landism landism commented Jan 20, 2022

A few places in the engine (the ones changed in this PR) need to know if a Manifest is enabled and were doing this by checking UIResource.DisableStatus.

As part of the tilt args / enable/disable work, I'm changing things so that all manifests are considered disabled when created and then become enabled when the api objects shake out. For the engine bits in this PR, that'd mean tests need to ensure enabled resources have both a UIResource and a ConfigMap.
It also felt kind of weird that, e.g., BuildController was coupled to UIResource.

This almost certainly isn't how we want to do this long term, but it seems like a better interim solution than what's already there and will make some upcoming changes less invasive.

@landism landism requested review from nicks and milas January 20, 2022 18:30
Copy link
Contributor

@milas milas left a comment

Choose a reason for hiding this comment

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

Reasoning makes sense to me!

Only other possibility I could think of to avoid refactoring all the tests would be to pass around something like isEnabled func(state store.EngineState, mt *store.ManifestTarget) and use the UIResource logic at runtime and a hardcoded return true for tests that don't want to construct the whole world.

@landism landism merged commit 2973b78 into master Jan 25, 2022
@landism landism deleted the matt/manifeststate.enabled branch January 25, 2022 20:14
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.

None yet

2 participants