Closed lachko closed 3 years ago
We will see the links to historical archives, but it does not generate the file, so nothing downloads.
That's even more confusing ...
We can iterate on this - I agree it is confusing. There is some internal plumbing that needs to be sorted before we can close this gap - exposing T_ARCHIVE_APKS_TO_DISK - which is in node-land on the server- to the Angular client. I'll place this into the 3.18 milestone.
flagging this again and marking it as a blocker for deployment. We cannot ship a screen to clients with links that do not work
@rjsteinert @chrisekelley how can this setting be exposed so that angular does't build those non working links? Can angular check if the file exist and if not print text instead of href
We might be able to do the same approach we did with the CSV sync fix - https://github.com/Tangerine-Community/Tangerine/issues/2635 - and have those vars stored in the group doc instead of in config.sh:
const groupsDb = new DB(`groups`)
let groupConfigurationDoc
try {
groupConfigurationDoc = await groupsDb.get(groupId)
} catch (err) {
console.log('Error: ' + JSON.stringify(err))
}
let archivePWAs = groupConfigurationDoc?groupConfigurationDoc["archivePWAs"] : false
That negative part of this approach is that the group admin would need to add this setting manually, unless we create an upgrade script.
Another way would be to expose the T_ARCHIVE_PWAs node var to the editor Angular context - involving environment.ts like this? https://medium.com/@ferie/how-to-pass-environment-variables-at-building-time-in-an-angular-application-using-env-files-4ae1a80383c. As part of the build process for editor, set-env.ts would run and grab the relevant config settings from process.env such as process.env.T_ARCHIVE_PWAs.
@rjsteinert - Do we currently have a way to get node env vars declared in config.sh into the editor's Angular context? Do you favor either of these approaches I suggested above? (either setting them in. the groups/groupId doc - which places more work on the group admin- or grabbing the process.env.VAR and generating a new environment.ts whenever the app is built.)
Resolved in @evansdianga PR #2659
Both settings have no effect in the config file: T_ARCHIVE_APKS_TO_DISK="false" T_ARCHIVE_PWAS_TO_DISK="false"
What is the expected output if those are to be used? We will not see historical links?