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: Implement option to enable / disable sync of declined events #62

Merged
merged 21 commits into from
Oct 4, 2023

Conversation

alxndr13
Copy link
Contributor

  • fmt: make the linter happy and add document starts to yamls
  • feat: add Accepted field to models.Event
  • feat(outlook): add ResponseStatus field and map to models.Event.Accepted
  • feat(google): check for Event Response and map to models.Event.Accepted
  • feat: add sync_declined_events field to config
  • feat: add SyncDeclinedEvents field to controller struct
  • test: modify tests for the newly introduced accepted field and controller property
  • feat: add function to remove declined events if config parameter is set
  • docs: add sync_declined_fields parameter to readme.md

@MichaelEischer
Copy link
Collaborator

I'm wondering whether it would be cleaner to implement the removal of declined events using an extended variant of the transformers. That way the filter/transform steps and the actual synchronization remain cleanly separated.

@alxndr13
Copy link
Contributor Author

alxndr13 commented Sep 4, 2023

I'm wondering whether it would be cleaner to implement the removal of declined events using an extended variant of the transformers. That way the filter/transform steps and the actual synchronization remain cleanly separated.

Good idea. Approaching it like this we could also create the base for #65

@alxndr13
Copy link
Contributor Author

alxndr13 commented Sep 20, 2023

I'm wondering whether it would be cleaner to implement the removal of declined events using an extended variant of the transformers. That way the filter/transform steps and the actual synchronization remain cleanly separated.

@MichaelEischer i just pushed some new commits which introduced filters, analogue to the transformers we already have. Let me know what you think!

Not polished, just works. there's a lot of potential for deduplication of code here and there and better error handling.

edit: tests aren't working as well 😅

Copy link
Collaborator

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

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

I like the approach in general.

Initially, I've wondered whether it might be easier to have a merged TransformerFilter, but that is far less clean than the proper separation between Transformer and Filter. And we likely don't need to potentially increased expressiveness of such a combined construct.

internal/sync/controller.go Outdated Show resolved Hide resolved
internal/sync/filter.go Show resolved Hide resolved
Alexander Huck and others added 4 commits September 23, 2023 22:08
we have aligned the processing of the filters to work like the
processing of the transformers
without the global boolean, using filters in the controller struct
Copy link
Collaborator

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

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

I've added a small cleanup for the readme.

@alxndr13 alxndr13 merged commit 924a56d into main Oct 4, 2023
5 checks passed
@alxndr13 alxndr13 deleted the sync-declined-events branch October 4, 2023 16:02
@MichaelEischer MichaelEischer mentioned this pull request Oct 8, 2023
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