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

clean flag should also work if the source is not accessible / does not exist anymore #112

Open
lukasjarosch opened this issue Jan 4, 2024 · 5 comments

Comments

@lukasjarosch
Copy link

I've recently switched customers and my access to the source calendar was revoked.
Unfortunately the--clean flag does not work without a source calendar / without access to a source calendar.

I would expect that if I remove the source key from my config / the source calendar is not accessible and run Calendarsync with the clean flag, that all events from said source are removed.

@alxndr13
Copy link
Contributor

How would calendarsync know, from which source events are to clean in the sink if you're removing the information about the source? We could do something opinionated and remove all of the events which have calendarsync metadata in them, but this is not something i would prefer.

but I agree with you, the --clean flag should also work without access to the source calendar. (but we probably need the info which source calendar it was)

@lukasjarosch
Copy link
Author

lukasjarosch commented Jan 12, 2024

Given there are multiple sources, and I remove one source. All sink events should have SourceID metadata and the ones with a SourceID which doesn't exist need to be removed. Wouldn't that be sufficient?

@alxndr13
Copy link
Contributor

That should be sufficient. But since we only support one source per config right now, i don't see how this should work. Given the circumstances you describe (once we support multiple sources per config), that approach may be an option.

@lukasjarosch
Copy link
Author

lukasjarosch commented Jan 12, 2024

Wouldn't my idea still work? I assume it would be even easier. Just remove all events with Calendarsync metadata. Or am I missing something?

@alxndr13
Copy link
Contributor

alxndr13 commented Feb 5, 2024

Should be that easy, yes.

As of now the CleanUp func is part of the controller and the controller needs a sink and a source to be initialized.

Will see if i can create a new subcommand for this, which would leave the source initialization out of the equation.

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

No branches or pull requests

2 participants