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

Ignore input changes to username and password #498

Merged
merged 7 commits into from
Feb 15, 2023
Merged

Conversation

guineveresaenger
Copy link
Contributor

The registry auth credentials can rotate frequently, depending on the container registry.
A rebuild and push should not be triggered if these fields are the only inputs that changed between updates.

This PR checks the registry input fields and only notes an rpc diff response if the server property is different.

Note that any edits to the docker build context will still trigger a rebuild - this change only affects changes to the underlying values of username and password.

Fixes #484.

  • Intercept registry diff and handle its fields as a first pass at better diff
  • Return NONE for diffResponse if the only updates are to username or password

@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Copy link
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

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

The change looks good. I'm not an expert on Docker, but this feels like a place where people will have different expectations. Before merging, can we

  1. Document this change in the schema.
  2. Add a test that demonstrates what the intended behavior is.

@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Copy link
Contributor

@AaronFriel AaronFriel left a comment

Choose a reason for hiding this comment

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

Noticed a docs fix.

provider/resources.go Outdated Show resolved Hide resolved
provider/resources.go Outdated Show resolved Hide resolved
Co-authored-by: Aaron Friel <[email protected]>
@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Copy link
Contributor

@AaronFriel AaronFriel left a comment

Choose a reason for hiding this comment

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

Tests look good, thanks for adding those.

@guineveresaenger guineveresaenger merged commit 1bd61e4 into master Feb 15, 2023
@guineveresaenger guineveresaenger deleted the smarter-diff branch February 15, 2023 01:31
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.

Ignore changes to username and password in Diff()
3 participants