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

Multilicense flyway not consistent with JSON examples #8407

Closed
qqmyers opened this issue Feb 8, 2022 · 2 comments · Fixed by #8413
Closed

Multilicense flyway not consistent with JSON examples #8407

qqmyers opened this issue Feb 8, 2022 · 2 comments · Fixed by #8413
Milestone

Comments

@qqmyers
Copy link
Member

qqmyers commented Feb 8, 2022

The CC0 1.0 license json file is consistent with the other examples in using the title recommended by Creative Commons (including the version number) but this is inconsistent with the update provided by the flyway script (which was created early on). The URL (differing by a trailing slash), short description, and icon location also differ. The db upgrade should match the examples and the pattern for the other licenses.

There seem to be two options for implementing

  1. Update the existing flyway script (requires developers to remove the record of running the prior version from their db, but avoids a second flyway script in this release)
  2. Add a second flyway script to modify the results of the first (possibly simpler to create, easier for developers, ends up with second flyway script)

@scolapasta /others - any preference? (I think I'm leaning towards 2, but will implement whatever).

@scolapasta
Copy link
Contributor

scolapasta commented Feb 9, 2022

I prefer the first, since it feels cleaner. But I get the pros and cons of both, and don't feel strongly about it.

@pdurbin
Copy link
Member

pdurbin commented Feb 9, 2022

I'm a little weirded out that there are two copies of the CC0 config:

  1. the JSON file
  2. the Flyway script

If we're going to mess with the Flyway script anyway, I'm wondering if it's an opportunity to get down to a single source of truth, the JSON file.

I know we discussed in tech hours how the CC0 change has to happen in Flyway but I don't think that's necessarily the case. For one thing, Flyway is relatively new to us. 😄 In the pre-Flyway days, it was pretty common to instruct people to use a combination of curl commands (loading JSON files) and manual SQL updates.

So I imagine we could have something like this in our release notes:

  • Minimal Flyway script to add the new column: ALTER TABLE termsofuseandaccess ADD COLUMN IF NOT EXISTS license_id BIGINT;
  • Run a curl command to add the CC0 license from the JSON file.
  • Instructions to run a SQL upgrade script (the rest of the current Flyway script) that needs the CC0 license to be in place.

And in the installer (setup-all.sh), instead of relying on a random Flyway script to add the CC0 license, we'd add:

Advantages:

  • Single source of truth for CC0 license (JSON file)
  • Licenses treated like all other items under scripts/api/data such as metadata blocks, roles, authentication providers, etc. They are input for the installer.

2022-06-02 update: We update metadata blocks by reloading tsv files and describe this process in release notes. I don't think we have any plans to move this to Flyway. Reloading JSON files for licenses could be similar.

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