rust-lang / sync-team

Synchronize the team repository with the services we use
Apache License 2.0
15 stars 13 forks source link

Allow DELETEs to return 404 #43

Closed rylev closed 1 year ago

rylev commented 1 year ago

We should allow 404s on DELETEs because presumably the resource was already deleted. We'll need to be extra careful to not introduce a bug where the URL is malformed though.

Mark-Simulacrum commented 1 year ago

Do we still want this? It seemed to me that our discussion led us to think that this isn't actually necessary.

Approved in case it is desired/needed though.

rylev commented 1 year ago

It's still necessary in some cases though the issue would be fixed on the next run of the tool.

For example, if a team is deleted that has permissions on a repo, the sync tool will try to remove that team from the repo explicitly. This will fail with a 404 because the team no longer exists.

We chould make diffing more intelligent to know that if a team no longer exists, it doesn't need to be explicitly removed from repos, but this is much more complicated and arguably makes the diffing show a less accurate view of the change that will occur.