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

feat: get_mfe template function #171

Merged
merged 1 commit into from
Dec 7, 2023
Merged

feat: get_mfe template function #171

merged 1 commit into from
Dec 7, 2023

Conversation

regisb
Copy link
Contributor

@regisb regisb commented Dec 6, 2023

Currently, the syntax to fetch mfe settings inside patches is very awkward:

{% for app_name, app in iter_mfes() %}
{% if app_name == "mymfe" %}
...
{% endif %}
{% endfor %}

We introduce a new template function to make this easier:

SOMETHING = "{{ get_mfe('mymfe')['port'] }}"

get_mfe is cached for performance.

Currently, the syntax to fetch mfe settings inside patches is very
awkward:

	{% for app_name, app in iter_mfes() %}
	{% if app_name == "mymfe" %}
	...
	{% endif %}
	{% endfor %}

We introduce a new template function to make this easier:

    SOMETHING = "{{ get_mfe('mymfe')['port'] }}"

`get_mfe` is cached for performance.
Copy link
Collaborator

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

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

Awesome! I've been wanting this forever!

@regisb
Copy link
Contributor Author

regisb commented Dec 7, 2023

I know, right?

@regisb regisb merged commit ebf7ea7 into master Dec 7, 2023
1 check passed
@regisb regisb deleted the regisb/get-mfe branch December 7, 2023 09:15
@regisb
Copy link
Contributor Author

regisb commented Dec 7, 2023

Merging this very fast because I want to close as many PRs as possible before Quince on Monday.

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