ManderaGeneral / generalpackager

Tools to interface GitHub, PyPI, NPM and local modules / repos. Used for generating files to keep projects dry and synced. Tailored for ManderaGeneral for now.
https://pypi.org/project/generalpackager/
Apache License 2.0
0 stars 0 forks source link

Update workflow #61

Open Mandera opened 1 year ago

Mandera commented 1 year ago

I want to support [LINUX] and [WINDOWS] for when I only want to test on a single quick instance. Hmm maybe being able to write [3.8] could be good too. What about any combination?

Mandera commented 1 year ago

I also want to an initial step to halt simultaneous actions, somehow prioritize the first one, race condition is fine

Mandera commented 1 year ago

Also stop creating so many commit when not needed, only commit if something changed

Mandera commented 6 months ago

I think I should take an even bigger step back -- The entire workflow is convoluted. I'm trying to do everything at once, so let's break it down.

Abstract

When changed:

  1. Ensure it still works
  2. Update information
  3. Publish

Change can be

1. Ensure it still works

2. Update information

3. Publish

If the version is bumped and tests pass then we publish.

Current setup

Currently, these 2 of these steps happen for all 5 of my general packages (only Python) with every commit. Step 3 happens if the version is bumped. Workflow takes a long time and scales poorly. Doesn't handle external dependencies.

Special treatment

I think it's a mistake to treat my dependents differently. Workflow should run when any dependency is updated.

Re-sync Library when Packager is published

Since Packager isn't a dependency for Library, Library won't be triggered when Packager is published. This is where we can make high-level functions to manually re-sync everything. Oh but wouldn't this require a bump and push, to test and publish? Which would trigger everything. Perhaps a simple re-sync would never warrant a bump on its own.

Version locking

Option 1 -- Commit on success:

Option 2 -- Commit on fail:

Behavior in my environment on publish:

C depends on B B depends on A

Option 1 -- Commit on success:

Recursive workflows, not ideal

Option 2 -- Commit on fail:

If we can make indirect dependencies trigger then this seems better! I guess we could also rely on manual and scheduled triggers.

Lock indirect dependencies?

Probably don't bother, would mess up the dependency chain cause it would look like my package directly requires all indirect dependencies, it would "flatten" the chain.

Private dependencies

I'll need to support private dependencies in the future, perhaps wait with this for now

Plan