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

Fix: sam sync defintion validator handling file opened event #7271

Merged
merged 5 commits into from
Jul 22, 2024

Conversation

hawflau
Copy link
Contributor

@hawflau hawflau commented Jul 22, 2024

Which issue(s) does this change fix?

N/A

Why is this change necessary?

For definition files (e.g. APIGW, SFN), a validation step is done for each FS event caught by watchdog. The validation step compares the file changes and determines if it's a valid change to sync. However, the validation step checks the file as of current but not the time when the event happened. As a result, we saw "changes" occurred and validated for a "File Opened Event", which is then ignored, and thus did not result in any sync.

How does it address the issue?

Explicitly skip File Opened Event in the validation step.

What side effects does this change have?

Definition files are not validated for a File Opened Event. However, this should be fine since we do not create sync flow from File Opened Event anyway.

Mandatory Checklist

PRs will only be reviewed after checklist is complete

  • Add input/output type hints to new functions/methods
  • Write design document if needed (Do I need to write a design document?)
  • Write/update unit tests
  • Write/update integration tests
  • Write/update functional tests if needed
  • make pr passes
  • make update-reproducible-reqs if dependencies were changed
  • Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@hawflau hawflau requested a review from a team as a code owner July 22, 2024 20:18
@hawflau hawflau changed the title Fix: sam sync defintion event Fix: sam sync defintion validator handling file opened event Jul 22, 2024
@hawflau hawflau added this pull request to the merge queue Jul 22, 2024
Merged via the queue into aws:develop with commit 7e01f38 Jul 22, 2024
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants