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

refactor!: change envVars to env in func.yaml #316

Merged
merged 1 commit into from
Apr 27, 2021

Conversation

lance
Copy link
Member

@lance lance commented Apr 23, 2021

There are some places where I've changed variable and function names
where it wasn't strictly necessary. If you don't mind the bit of churn
that results, changing these makes rg -i envvars a nice way to check
for anything that could be overlooked.

Signed-off-by: Lance Ball lball@redhat.com

@lance lance requested a review from a team April 23, 2021 14:25
@lance lance self-assigned this Apr 23, 2021
@@ -22,7 +22,7 @@ type config struct {
Trigger string `yaml:"trigger"`
Builder string `yaml:"builder"`
BuilderMap map[string]string `yaml:"builderMap"`
EnvVars map[string]string `yaml:"envVars"`
Env map[string]string `yaml:"env"`
Copy link
Contributor

Choose a reason for hiding this comment

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

@lance won't this cause issues for users using newer versions with older conf file?

Copy link
Contributor

Choose a reason for hiding this comment

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

But not many people use function so it is not that much of a problem. We just need to let know people that it's been changed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes - you are right that any existing users would need to change their config file. But this is all so new, and it's still unsupported, so I think perhaps adding to release notes for TP-2 would be OK instead of trying for backwards compatibility. But I will follow up on this to be sure it's OK.

Copy link
Member

Choose a reason for hiding this comment

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

LGTM!

Yes, this is technically a backwards incompatible change, but let's get this thing squeaky-clean now, before 1.0, while we still can. (I also doubt there are others using env vars other than we team members at this point?),

@lance lance force-pushed the lance/315-change-env-vars branch from 7ad2b60 to 43eedb0 Compare April 23, 2021 21:28
@lance
Copy link
Member Author

lance commented Apr 23, 2021

I should have noted that this change was prompted by the discussion in #312 (comment).

@@ -22,7 +22,7 @@ type config struct {
Trigger string `yaml:"trigger"`
Builder string `yaml:"builder"`
BuilderMap map[string]string `yaml:"builderMap"`
EnvVars map[string]string `yaml:"envVars"`
Env map[string]string `yaml:"env"`
Copy link
Member

Choose a reason for hiding this comment

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

LGTM!

Yes, this is technically a backwards incompatible change, but let's get this thing squeaky-clean now, before 1.0, while we still can. (I also doubt there are others using env vars other than we team members at this point?),

Copy link
Contributor

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

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

LGTM

@zroubalik
Copy link
Contributor

Nit: imho this shouldn't be a chore type of PR, since we are introducing the breaking changes.

@lance
Copy link
Member Author

lance commented Apr 26, 2021

Nit: imho this shouldn't be a chore type of PR, since we are introducing the breaking changes.

Good point!

There are some places where I've changed variable and function names
where it wasn't strictly necessary. If you don't mind the bit of churn
that results, changing these makes `rg -i envvars` a nice way to check
for anything that could be overlooked.

Signed-off-by: Lance Ball <lball@redhat.com>
@lance lance force-pushed the lance/315-change-env-vars branch from 43eedb0 to 69f9710 Compare April 26, 2021 18:11
@lance lance changed the title chore: change envVars to env in func.yaml refactor!: change envVars to env in func.yaml Apr 26, 2021
@lance
Copy link
Member Author

lance commented Apr 26, 2021

@zroubalik how about refactor! - adding the exclamation point to a prefix indicates to release-please that there is a breaking change.

@lance lance merged commit 89ff286 into knative:main Apr 27, 2021
@lance lance deleted the lance/315-change-env-vars branch April 27, 2021 14:46
This was referenced Apr 27, 2021
matejvasek added a commit to matejvasek/faas that referenced this pull request Sep 23, 2022
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

4 participants