solvaholic / octodns-sync

GitHub Action to test and deploy DNS settings with OctoDNS
MIT License
28 stars 14 forks source link

octodns-sync: not found #91

Closed chriskacerguis closed 2 years ago

chriskacerguis commented 2 years ago

Description

Hello! First, thank you for your hard work with this, it is very appreciated. We have been using your action for some time without problems (the last run was 5 days ago). However, when we ran in today, we are getting the following error octodns-sync: not found.

Expected Behavior

Actual Behavior

Seeing the following in the logs

Run solvaholic/octodns-sync@main
Run /home/runner/work/_actions/solvaholic/octodns-sync/main/scripts/run.sh
INFO: Cleaning up plan and log files if they already exist
INFO: _config_path: domains.yaml
Script started, file is /home/runner/work/octodns/octodns/octodns-sync.log
sh: 1: octodns-sync: not found
Script done, file is /home/runner/work/octodns/octodns/octodns-sync.log
FAIL: octodns-sync exited with an error.
Error: Process completed with exit code 1.

Possible Fix

I see the notes about the breaking change, and that it needs to be installed. In your example I see I need

run: pip install -r requirements.txt

However, that file is not found (I'm assuming I need to add it) but I don't know what to put in it (sorry, I'm not a Python person).

Steps to Reproduce

Using the action as specified in the README file.

Context

We are unable to update our DNS records.

Your Environment

solvaholic commented 2 years ago

👋 Hi @chriskacerguis, thank you for raising this, and for your kind words :bow:

If you'd like to keep using solvaholic/octodns-sync as it was, you can specify @v2 rather than @main in your workflow file's uses statement:

      - uses: solvaholic/octodns-sync@v2

That'll be quickest and simplest. Please note, however, it may run outdated versions of octodns and provider dependencies. Provider modules have been moved to their own repositories and packages per https://github.com/octodns/octodns/issues/622, and can be managed as dependencies in users' DNS configuration repositories.

If you'd like to use @v3 or @main, one option is to create a requirements.txt file in your DNS configuration repository declaring octodns and your required providers. For example, if you use AWS Route53, your requirements.txt may look like this:

octodns==0.9.17
octodns_route53==0.0.4

That'll let these steps work, to install octodns:

      - uses: actions/setup-python@v2
        with:
          python-version: '3.10'
      - run: pip install -r requirements.txt

That's the approach @barnumbirr described in https://github.com/solvaholic/octodns-sync/issues/86#issuecomment-1153554144 :hat-tip:

Please let me know which way you go, and what questions or other issues you encounter.

chriskacerguis commented 2 years ago

Ahhh...yes, that was the missing piece. Thank you so much for your help so quickly!!!!

Note for anyone who is running into this, there is my requirements.txt (I had to add a few other things for route53).

octodns==0.9.17
boto3==1.24.14
octodns_route53==0.0.2
pycountry_convert==0.7.2

Thanks again @solvaholic