saltstack-formulas / apache-formula

Set up and configure the Apache HTTP server
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
50 stars 285 forks source link

refactor(formula): align to template-formula & improve ci #283

Closed noelmcloughlin closed 3 years ago

noelmcloughlin commented 3 years ago

BREAKING CHANGE: Module .sls files are moved to /config/modules/ subdirectory. template-formula alignment may introduce a breaking change. See README for states.

PR progress checklist (to be filled in by reviewers)


What type of PR is this?

Primary type

Secondary type

Does this PR introduce a BREAKING CHANGE?

YES

Related issues and/or pull requests

Includes #225 and #259 Fixes #79, #238, #258, #262, #265, #266

Describe the changes you're proposing

While using this formula I saw various issues and inconsistencies.
This PR is an attempt to improve formula quality while keeping the same functionality.

I'm sorry the PR is so big but there is no easy way to improve feature/test coverage without restructuring. The CI/CD is passing for all platforms except:

Further work is required to address remaining open issues.
There may be better ways of processing modules but this PR relies on the existing solutions.

Pillar / config required to test the proposed changes

Debug log showing how the proposed changes work

Documentation checklist

Testing checklist

Additional context

pull-assistant[bot] commented 3 years ago
Score: 0.99

Best reviewed: commit by commit


Optimal code review plan

     refactor(formula): align to template-formula & improve ci      feat(arch): add archlinux support

Powered by Pull Assistant. Last update 3759b66 ... cabc79f. Read the comment docs.

noelmcloughlin commented 3 years ago

Added support for Archlinux (CI/CD) with HTTPS/SSL and modules.

noelmcloughlin commented 3 years ago

I discussed this PR with @myii and because it's too big to review I'll selfie-merge on the following basis:

  1. firstly the commit message lists all breaking/unbreaking changes
  2. The extended and improved CI/CD is passing
  3. That I'll become code owner if necessary.

Pillar data is unchanged. The primary change is state-names were refactored as part of the alignment with template-formula.

saltstack-formulas-travis commented 3 years ago

:tada: This PR is included in version 1.0.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

myii commented 3 years ago

@noelmcloughlin Nice work, the breaking changes listed in the changelog make things so much easier to follow -- appreciate it.

myii commented 3 years ago

Just a little note for posterity.

I wasn't able to git pull these changes without manual operation (but I do use my formulas' repos in non-standard ways to most people). I was getting this error:

error: Updating the following directories would lose untracked files in them:
        apache/vhosts

Was able to check the problem using git clean in dry-run mode:

$   git clean -xdfn
...
Would remove apache/vhosts/.cleanup.sls.un~
Would remove apache/vhosts/.minimal.tmpl.un~
Would remove apache/vhosts/.proxy.tmpl.un~
Would remove apache/vhosts/.redirect.tmpl.un~
Would remove apache/vhosts/.standard.tmpl.un~
...

So the main point is that making modifications to the directory structure could lead to issues with certain files being present in the directories that are being moved (i.e. those covered by .gitignore).

This is more so a point of awareness, there's not much we could do about this.

myii commented 3 years ago

Standardised this implementation with 7dc0ece4f5d1659be266f82f3dfe05a82833f41c.

@noelmcloughlin It looks like you're using an older version of libtofs.jinja when preparing these PRs. The new version has been pushed to pretty much all formulas that are using TOFS.