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

feat(core): Only show V1 banner to users who migrated #6622

Merged

Conversation

OlegIvaniv
Copy link
Contributor

@OlegIvaniv OlegIvaniv commented Jul 7, 2023

We want to show the V1 banner only to the users that came from a pre-V1 version. To do this, we set a flag in the database in the migration script where the settings table is created.
Github issue / Community forum post (link here to close automatically):

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
@OlegIvaniv OlegIvaniv requested a review from a team as a code owner July 7, 2023 12:12
@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

Great PR! Please pay attention to the following items before merging:

Files matching packages/**:

  • If fixing bug, added test to cover scenario.
  • If addressing forum or Github issue, added link to description.

Files matching packages/**/*.ts:

  • Added unit tests to cover new or updated functionality.

Files matching packages/cli/src/databases/migrations/**:

  • Requested review from at least two engineers on migration.
  • Avoided irreversible data migrations.
  • Avoided deleting or updating data keys.
  • Wrote 'down' migration if possible.

Make sure to check off this list before asking for review.

@OlegIvaniv OlegIvaniv closed this Jul 7, 2023
@OlegIvaniv OlegIvaniv reopened this Jul 7, 2023
@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Jul 7, 2023
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
@OlegIvaniv OlegIvaniv changed the title feat(editor): Only show V1 banner to users who migrated feat(core): Only show V1 banner to users who migrated Jul 7, 2023
@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.06 ⚠️

Comparison is base (a762233) 28.91% compared to head (a364c87) 28.85%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6622      +/-   ##
==========================================
- Coverage   28.91%   28.85%   -0.06%     
==========================================
  Files        3069     3069              
  Lines      188334   188355      +21     
  Branches    20889    20890       +1     
==========================================
- Hits        54454    54355      -99     
- Misses     133000   133120     +120     
  Partials      880      880              

see 6 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cypress
Copy link

cypress bot commented Jul 7, 2023

Passing run #1401 ↗︎

0 219 0 0 Flakiness 0

Details:

🌳 ado-874-only-show-v1-banner-to-users-who-migrated 🖥️ browsers:node18.12.0-ch...
Project: n8n Commit: a364c8795b
Status: Passed Duration: 07:30 💡
Started: Jul 7, 2023 1:44 PM Ended: Jul 7, 2023 1:52 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

✅ All Cypress E2E specs passed

@OlegIvaniv OlegIvaniv merged commit 071e56f into master Jul 7, 2023
@OlegIvaniv OlegIvaniv deleted the ado-874-only-show-v1-banner-to-users-who-migrated branch July 7, 2023 13:57
MiloradFilipovic added a commit that referenced this pull request Jul 7, 2023
* master:
  fix(Code Node): Install python modules always in a user-writable folder (#6568)
  feat(core): Only show V1 banner to users who migrated (#6622)
Copy link
Member

@netroy netroy left a comment

Choose a reason for hiding this comment

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

Looks like another bad migration slipped through @n8n-io/migrations-review . Sorry about that.

@@ -154,6 +154,11 @@ export class CreateUserManagement1646992772331 implements ReversibleMigration {
await queryRunner.query(
`INSERT INTO ${tablePrefix}settings (\`key\`, value, loadOnStartup) VALUES ("userManagement.isInstanceOwnerSetUp", "false", 1), ("userManagement.skipInstanceOwnerSetup", "false", 1)`,
);

await queryRunner.query(`
INSERT INTO "${tablePrefix}settings" (key, value, loadOnStartup)
Copy link
Member

Choose a reason for hiding this comment

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

this query is invalid for mysql.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@netroy 🤦 My bad, this should fix it https://github.com/n8n-io/n8n/pull/6628/files

MiloradFilipovic added a commit that referenced this pull request Jul 11, 2023
* ADO-814-trial-banner:
  👕 Fixing lint errors
  ✔️ Removing store import from API file
  ⚡ Updating banners dimensions on resize, removing leftover code
  refactor: Stop using `.d.ts` files for type-collection files (no-changelog) (#6634)
  fix(core): Fix credentials lazy-loading (no-changelog) (#6615)
  ci: Upgrade `tough-cookie` to address CVE-2023-26136 (no-changelog) (#6630)
  feat(editor): Load fixed template list as experiment (#6632)
  ✅ Added more banner tests
  feat(Slack Node): Add option to include link to workflow in Slack node (#6611)
  fix(editor): Extend menu item and use it as a recursive component (#6618)
  fix: Add postAuthenticate hook for source control preferences (no-changelog) (#6629)
  ✔️ Fixing failing banner tests
  ci: Fix v1 banner migration (no-changelog) (#6628)
  ✅ Added banners unit tests
  ✔️ Updating testing endpoints to use new store data
  fix(Code Node): Install python modules always in a user-writable folder (#6568)
  feat(core): Only show V1 banner to users who migrated (#6622)
  💄 Tweaking zoom to fit position
  ✔️ Updating Callout component test snapshots
  👕 Fixing linting errors
netroy pushed a commit that referenced this pull request Jul 12, 2023
* feat(editor): Only show V1 banner to users who migrated

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>

* Set the v1 banner dismissed flag in settings table create migration

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>

---------

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
@github-actions github-actions bot mentioned this pull request Jul 12, 2023
@janober
Copy link
Member

janober commented Jul 13, 2023

Got released with n8n@1.0.2

@github-actions github-actions bot mentioned this pull request Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants