Repository navigation
Fix COG tile layers with s3:// URLs being treated as mission-relative #147
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
base: development
Are you sure you want to change the base?
Changes from all commits
9e515ba
441dbbe
723b223
27dcff0
4af36d0
9524f1c
0c56dee
0161c70
80d67a6
acfa16b
38f6664
f454fd0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ const logger = require("../../../../../API/logger"); | |
| const Config = require("../models/config"); | ||
| const config_template = require("../../../../../API/templates/config_template"); | ||
| const userModel = require("../../Users/models/user"); | ||
| const Userfiles = require("../../Draw/models/userfiles").Userfiles; | ||
| const User = userModel.User; | ||
| const { UserDefaults } = require("../../Users/models/userdefaults"); | ||
| const missionTemplates = require("../../Utils/missionTemplates"); | ||
|
|
@@ -1418,10 +1419,17 @@ if (fullAccess) | |
| return null; | ||
| }); | ||
|
|
||
| // Draw files are scoped by mission name too. | ||
| const userfilesUpdate = Userfiles.update( | ||
| { mission: newName }, | ||
| { where: { mission: missionName }, transaction: t } | ||
| ); | ||
|
|
||
| return Promise.all([ | ||
| ...configUpdates, | ||
| permissionUpdate, | ||
| defaultsUpdate, | ||
| userfilesUpdate, | ||
| ]); | ||
| }) | ||
| .then(() => { | ||
|
|
@@ -1528,11 +1536,16 @@ if (fullAccess) | |
| return; | ||
| } | ||
|
|
||
| Config.destroy({ | ||
| where: { | ||
| mission: missionName, | ||
| }, | ||
| }) | ||
| sequelize | ||
| .transaction((t) => | ||
| Promise.all([ | ||
| Config.destroy({ where: { mission: missionName }, transaction: t }), | ||
| Userfiles.update( | ||
| { mission: null }, | ||
| { where: { mission: missionName }, transaction: t } | ||
| ), | ||
|
Comment on lines
+1543
to
+1546
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| ]) | ||
| ) | ||
| .then((mission) => { | ||
| logger( | ||
| "info", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,12 +38,12 @@ let setup = { | |
| //Once the server starts | ||
| onceStarted: (s) => {}, | ||
| //Once all tables sync | ||
| onceSynced: (s) => { | ||
| onceSynced: async (s) => { | ||
| if (typeof file_histories.up === "function") { | ||
| file_histories.up(); | ||
| } | ||
| if (typeof ufiles.up === "function") { | ||
| ufiles.up(); | ||
| await ufiles.up(); | ||
|
Comment on lines
+41
to
+46
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Draw requests race the mission migration On upgrade, Learn moreThe Draw model now queries Example: Restart an upgraded installation with an existing Recommended fix: Await all Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| } | ||
| routeFiles.makeMasterFiles([ | ||
| "roi", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Deleted mission drawings reappear everywhere
Deleting a mission sets its drawings'
missionto null.getfilesincludes null-mission drawings by default, so they appear in every remaining mission.Learn more
Draw files are retained after mission deletion, but clearing their mission changes their meaning. getfiles treats null as a legacy, unscoped file and includes it whenever the mission has not explicitly disabled
showNullMissionFiles. A normal deletion therefore broadens the file's display scope to all remaining missions.Example: A drawing made in mission A has
mission: 'A'. Delete A while missions B and C use default Draw settings; that drawing now appears in both B and C.Recommended fix: Preserve a non-null tombstone mission association for retained files or explicitly archive/delete associated drawings when destroying a mission. Keep null reserved for genuinely legacy unscoped drawings.
Was this helpful? React with 👍 or 👎 to provide feedback.