Skip to content

Packages between environments get mixed up because of loose package-version-control #262

@sebastian-marinescu

Description

@sebastian-marinescu

Summary

I'm using Gitify for handling environments and also new setups (by cloning/copying an old project).

Now when pushing to my production-environment it might install other versions of packages than used before, because let's say FormIt just released an update.

My "Gitify-process" on initial setup in an environment looks like this:

  1. Gitify modx:install
  2. Gitify package:install --all
  3. Gitify build --force --no-backup

In step 2. there are new updates to packages and new settings/plugins/snippets get installed to the DB.
Also already gitified snippets, like lets say "ImagePlus", get updates.
In step 3. my gitified old snippets (and other stuff) overwrite the newly ones. And also new stuff gets killed, because it's not gitified yet.

Step to reproduce

  1. Gitify modx:install
  2. Gitify package:install --all
  3. Gitify build --force --no-backup

Then in the packages grid, reinstall an extra you are sure got updated.

Observed behavior

Gitify extract and you see the "lost data" or new and not yet gitified data.

Expected behavior

Don't loose stuff in between environment setups, and be confident everything works as expected.

Possible solutions / ideas / additions to Gitify

  1. Gitify needs to be locked down on package-versions. That way installing on a new environment gives the user the exact versions used before. So the user should be able to provide an exact version in the gitify-config, like colorpicker-1.0.3-pl.
    The InstallPackageCommand needs to acknowledge this and get the specified version.
  2. A way of dumping currently installed package-versions back to the gitify-config. That way if the admin uses the MODX package-grid to reinstall/update packages, it can automatically be locked back to the config, something like Gitify package:dump --all or Gitify package:save --all.
  3. Maybe a new way of upgrading through Gitify, so already locked package-versions get installed and also dumped back to the gitify-config, something like Gitify package:upgrade --all.
  4. Maybe a way to force re-installation of packages, something like Gitify package:reinstall --all.

Current workaround

Currently when this happens, an admin has to manually hit the reinstall button in the MODX packages-grid, possibly on all packages, and then Gitify extract afterwards to have everything back in sync.

Related issues

#108 #56 #157 #83 #68 #4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions