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

Plugin upgrades #3057

Merged
merged 19 commits into from
Jan 25, 2021
Merged

Plugin upgrades #3057

merged 19 commits into from
Jan 25, 2021

Conversation

mariusandra
Copy link
Collaborator

Changes

  • Adds a button "Check for upgrades" that checks each plugin if it's the latest github commit / gitlab commit / npm version. If not, you can click to update.
    2021-01-22 16 25 58

  • If there's an error connecting to the backend (e.g. github api key limit exceeded, happens often), we show an error:
    image

  • If a plugin is enabled, we update it, and afterwards there's a new required field, we directly open the config editor:
    2021-01-22 16 30 34

Checklist

  • All querysets/queries filter by Organization, by Team, and by User
  • Django backend tests
  • Jest frontend tests
  • Cypress end-to-end tests

@mariusandra mariusandra temporarily deployed to posthog-plugin-upgrades-c5mpaz January 22, 2021 15:34 Inactive
@timgl
Copy link
Collaborator

timgl commented Jan 22, 2021

I think it'd be cool to just run this whenever the page loads rather than on the button click. Much higher chance people will see & actually update

@mariusandra mariusandra temporarily deployed to posthog-plugin-upgrades-c5mpaz January 22, 2021 15:51 Inactive
@Twixes Twixes temporarily deployed to posthog-plugin-upgrades-c5mpaz January 25, 2021 11:33 Inactive
Copy link
Collaborator

@Twixes Twixes left a comment

Choose a reason for hiding this comment

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

100% should run automatically (though not more often than x amount of time).

frontend/src/custom.d.ts Show resolved Hide resolved
frontend/src/custom.d.ts Show resolved Hide resolved
@mariusandra mariusandra temporarily deployed to posthog-plugin-upgrades-c5mpaz January 25, 2021 14:55 Inactive
@mariusandra
Copy link
Collaborator Author

mariusandra commented Jan 25, 2021

The plugins will now check for updates when the page opens. More specifically, I set it to cache the "latest_tag" for each plugin for 30min (with postgres) and it'll only check on page load if the status isn't stale. Clicking on the "check for updates" button checks all plugins.

Currently clicking "check for all updates" tends to exhaust the github api limit quite quickly. This will be fixed when #3070 lands.

@mariusandra mariusandra temporarily deployed to posthog-plugin-upgrades-c5mpaz January 25, 2021 15:03 Inactive
@Twixes Twixes temporarily deployed to posthog-plugin-upgrades-c5mpaz January 25, 2021 22:33 Inactive
Copy link
Collaborator

@Twixes Twixes left a comment

Choose a reason for hiding this comment

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

Nice

@mariusandra mariusandra temporarily deployed to posthog-plugin-upgrades-c5mpaz January 25, 2021 22:43 Inactive
@mariusandra mariusandra temporarily deployed to posthog-plugin-upgrades-c5mpaz January 25, 2021 22:48 Inactive
@mariusandra mariusandra merged commit bfe6f85 into master Jan 25, 2021
@mariusandra mariusandra deleted the plugin-upgrades branch January 25, 2021 23:13
@Twixes Twixes mentioned this pull request Jan 27, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants