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

Generalized Map Versioning #1032

Merged
merged 7 commits into from
Sep 17, 2024
Merged

Generalized Map Versioning #1032

merged 7 commits into from
Sep 17, 2024

Conversation

tsa96
Copy link
Member

@tsa96 tsa96 commented Sep 3, 2024

Closes #1006
Closes #857

Replaces the MapSubmissionVersion table with MapVersion. Map storage is now always using the zone system, even for approved maps. Previously, prior to approval maps, would be stored at submissions/<MapSubmissionVersion UUID ID>.bsp, then upon approval moved to maps/<map name>.bsp. Now, all maps are just stored at maps/<MapVersion UUID ID>.bsp. This makes frontend and game code quite a lot simpler.

Whilst I haven't done admin map updating quite yet (#916), this change is essential to that system.

Also, since zones are now always stored on MapVersion, so always requires a join table to fetch, it's a lot easier to avoid fetching the zones JSON unnecessarily, plus I added Prisma's preview "omit" API which simplifies code even more. So #857 can be closed in the process.

Checks

  • I have included/updated tests where applicable (see Testing)
  • I have ran nx run db:create-migration and committed the migration if I've made DB schema changes
  • I have followed semantic commit messages e.g. feat: Add foo, chore: Update bar, etc...
  • My branch has a clear history of changes that can be easy to follow when being reviewed commit-by-commit
  • My branch is functionally complete; the only changes to be done will be those potentially requested in code review
  • All changes requested in review have been fixuped into my original commits

@tsa96 tsa96 force-pushed the refactor/map-versions branch 3 times, most recently from 1047a6f to e88241a Compare September 3, 2024 16:58
@tsa96 tsa96 force-pushed the refactor/map-versions branch from e88241a to 150cb57 Compare September 14, 2024 17:35
Copy link
Member

@GordiNoki GordiNoki left a comment

Choose a reason for hiding this comment

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

I'm not sure, but I remember someone on engine side asking for map downloads to have the same file name as a map file that is being downloaded.

@tsa96
Copy link
Member Author

tsa96 commented Sep 15, 2024

I'm not sure, but I remember someone on engine side asking for map downloads to have the same file name as a map file that is being downloaded.

Nope not a problem for us, our HTTP downloader code just fetches a big ol' buffer and we can write it wherever.

@tsa96 tsa96 force-pushed the refactor/map-versions branch from 150cb57 to b98b263 Compare September 15, 2024 22:11
@tsa96 tsa96 force-pushed the refactor/map-versions branch from b98b263 to 9de9661 Compare September 15, 2024 22:22
@tsa96 tsa96 force-pushed the refactor/map-versions branch from 9de9661 to 813ff53 Compare September 17, 2024 18:58
@GordiNoki GordiNoki merged commit 198bcd7 into main Sep 17, 2024
7 checks passed
@GordiNoki GordiNoki deleted the refactor/map-versions branch September 17, 2024 19:16
@tsa96
Copy link
Member Author

tsa96 commented Sep 17, 2024

Not a big deal in this case but would prefer you let me merge my PRs @GordiNoki, at least when it's backend changes - when we have corresponding changes in red it's easiest if they all get in at once. If it's something you're waiting on feel free to badger me or nick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants