Giter Club home page Giter Club logo

gigalixir-action's People

Contributors

bahelms avatar bottlenecked avatar christiantovar avatar dependabot[bot] avatar erikcameron avatar henrik avatar iangreenleaf avatar ltk avatar mhanberg avatar mikehostetler avatar raulpe7eira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gigalixir-action's Issues

prefer Number() to window.parseInt()

Hi @mhanberg , feel free to close this issue if it's not actually relevant.

I noticed you were using parseInt() in a couple spots:

I think you might want to use Number() instead. Otherwise, perhaps consider passing an explicit radix parameter to parseInt().

Here are some of the differences in the behavior between these two functions:

~> node
> parseInt('42beef')
42
> Number('42beef')
NaN
> parseInt('42beef', 16)
4374255
> Number('42beef')
NaN
> 

Only add key & wait for deploy if a migration is running

We've got MIGRATIONS: false set and our Github action still waits for the deploy to be successful, wasting a few extra minutes every deploy of our Github Action's quota.

Wouldn't it make more sense to move these two lines into the if statement and only run them if you plan to run migrations?

await core.group("Adding private key to gigalixir", async () => {
      await exec.exec(path.join(__dirname, "../bin/add-private-key"), [sshPrivateKey]);
    });

    await core.group("Waiting for new release to deploy", async () => {
      await waitForNewRelease(currentRelease, gigalixirApp, 1);
    });

gigalixir-action fails on missing 'six' Python lib

Hey there,

2 days ago, when I did the last release of the app, [email protected] did output the following libraries that installed:

certifi-2023.7.22 cffi-1.16.0 charset-normalizer-3.3.2 click-8.1.7 cryptography-41.0.5 gigalixir-1.9.0 idna-3.4 pyOpenSSL-23.3.0 pycparser-2.21 pygments-2.16.1 pypng-0.20220715.0 qrcode-7.4.2 requests-2.31.0 rollbar-0.16.3 six-1.16.0 stripe-7.4.0 typing-extensions-4.8.0 urllib3-2.1.0

Today, it installed:

certifi-2023.7.22 cffi-1.16.0 charset-normalizer-3.3.2 click-8.1.7 cryptography-41.0.5 gigalixir-1.9.0 idna-3.4 pyOpenSSL-23.3.0 pycparser-2.21 pygments-2.16.1 pypng-0.20220715.0 qrcode-7.4.2 requests-2.31.0 rollbar-1.0.0 stripe-7.5.0 typing-extensions-4.8.0 urllib3-2.1.0

The result is that since today, the 'six' library is missing and Gigalixir action fails on trying to login:

Logging in to gigalixir
  /opt/hostedtoolcache/Python/3.8.1/x64/bin/gigalixir login -e *** -y -p ***
  Traceback (most recent call last):
    File "/opt/hostedtoolcache/Python/3.8.1/x64/bin/gigalixir", line 5, in <module>
      from gigalixir import cli
    File "/opt/hostedtoolcache/Python/3.8.1/x64/lib/python3.8/site-packages/gigalixir/__init__.py", line 8, in <module>
      from . import observer as gigalixir_observer
    File "/opt/hostedtoolcache/Python/3.8.1/x64/lib/python3.8/site-packages/gigalixir/observer.py", line 13, in <module>
      from . import app as gigalixir_app
    File "/opt/hostedtoolcache/Python/3.8.1/x64/lib/python3.8/site-packages/gigalixir/app.py", line 13, in <module>
      from . import presenter
    File "/opt/hostedtoolcache/Python/3.8.1/x64/lib/python3.8/site-packages/gigalixir/presenter.py", line 6, in <module>
      from six import u as unicode
  ModuleNotFoundError: No module named 'six'
Error: The process '/opt/hostedtoolcache/Python/3.8.1/x64/bin/gigalixir' failed with exit code 1

I have fixed the issue for myself, by installing the missing library in my yaml file:

      - uses: actions/setup-python@v4
        with:
          python-version: 3.8.1

      - run: pip3 install six

      - uses: gigalixir/[email protected]
        with:
          ...

but it probably is because rollbar updated and you probably need to explicitly depend on the 'six' library, or something like that :)

All the best and Happy Friday!

How to deploy a specific branch to Gigalixir?

We are using the dev branch as our main branch and I want to deploy dev branch to Gigalixir. From command line I can do it as git push gigalixir dev:master, but how to do that from this action?

Cannot find module '@actions/core'

Hi, I'm getting the following error when trying to deploy with new tagv0.4.2

Run mhanberg/[email protected]

internal/modules/cjs/loader.js:800
    throw err;
    ^

Error: Cannot find module '@actions/core'
Require stack:
- /home/runner/work/_actions/mhanberg/gigalixir-action/v0.4.2/dist/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
    at Function.Module._load (internal/modules/cjs/loader.js:690:27)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.833 (/home/runner/work/_actions/mhanberg/gigalixir-action/v0.4.2/dist/index.js:157:33)
    at __nccwpck_require__ (/home/runner/work/_actions/mhanberg/gigalixir-action/v0.4.2/dist/index.js:199:42)
    at Object.842 (/home/runner/work/_actions/mhanberg/gigalixir-action/v0.4.2/dist/index.js:8:14)
    at __nccwpck_require__ (/home/runner/work/_actions/mhanberg/gigalixir-action/v0.4.2/dist/index.js:199:42)
    at /home/runner/work/_actions/mhanberg/gigalixir-action/v0.4.2/dist/index.js:216:18
    at Object.<anonymous> (/home/runner/work/_actions/mhanberg/gigalixir-action/v0.4.2/dist/index.js:217:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/runner/work/_actions/mhanberg/gigalixir-action/v0.4.2/dist/index.js'
  ]
}

Migration error : duplicate_table

I have been using v0.1.0 for a couple months... working fine, started getting following error during 'migration'... updated to v0.3.0 and receive the same error... thoughts?


Running migrations
/usr/local/bin/gigalixir ps:migrate -a ***
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Permanently added '[us-east-1.aws.ssh.gigalixir.com]:31789,[52.73.201.137]:31789' (ECDSA) to the list of known hosts.
21:57:33.995 [info] == Running 20200429160003 Backoffice.Repo.Migrations.CreateEmployeeTable.change/0 forward
21:57:33.996 [info] create table employees
▸ Given the following expression: Ecto.Migrator.run(List.first(Application.get_env(:, :ecto_repos)), Application.app_dir(:, "priv/repo/migrations"), :up, all: true)
▸ The remote call failed with:
▸ ** (exit) %Postgrex.Error{connection_id: 19266, message: nil, postgres: %{code: :duplicate_table, file: "heap.c", line: "1066", message: "relation "employees" already exists", pg_code: "42P07", routine: "heap_create_with_catalog", severity: "ERROR"}, query: nil}
▸ (ecto_sql 3.4.2) lib/ecto/adapters/sql.ex:612: Ecto.Adapters.SQL.raise_sql_call_error/1
▸ (elixir 1.10.3) lib/enum.ex:1396: Enum."-map/2-lists^map/1-0-"/2
▸ (ecto_sql 3.4.2) lib/ecto/adapters/sql.ex:705: Ecto.Adapters.SQL.execute_ddl/4
▸ (ecto_sql 3.4.2) lib/ecto/migration/runner.ex:343: Ecto.Migration.Runner.log_and_execute_ddl/3
▸ (ecto_sql 3.4.2) lib/ecto/migration/runner.ex:117: anonymous fn/6 in Ecto.Migration.Runner.flush/0
▸ (elixir 1.10.3) lib/enum.ex:2111: Enum."-reduce/3-lists^foldl/2-0-"/3
▸ (ecto_sql 3.4.2) lib/ecto/migration/runner.ex:116: Ecto.Migration.Runner.flush/0
▸ (stdlib 3.11.2) timer.erl:166: :timer.tc/1
Command '[u'ssh', u'-t', u'[email protected]', u'-p', u'31789', u'gigalixir_run', u'migrate']' returned non-zero exit status 1

Executing Action with API Key

Motivation

I'm planning to set up this action for my Elixir project, and noticed that the Action's instructions make it seem like the Action only takes the Gigalixir username and password.

Gigalixir also supports an API key for interaction with the API it seems, that I think might be a better option, as it would let you supply just an API token that may be revoked, instead of what seems like the login credentials for the whole Gigalixir account.

Is it possible currently to use the API key (as another Action Secret), or if not, how difficult would it be to add support to the Action?

I saw some more information about the API key can here:

https://buildmedia.readthedocs.org/media/pdf/gigalixir/latest/gigalixir.pdf

21.5 Authentication When you login with your email and password, you receive an API key. This API key is stored in your ~/.netrc file. Commands generally use your ~/.netrc file to authenticate with few exceptions.

pip install gigalixir failing

Hi, I'm getting the following error today when trying to deploy

Installing gigalixir
  /usr/bin/sudo pip install gigalixir --ignore-installed six
  The directory '/home/runner/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
  The directory '/home/runner/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
  Collecting gigalixir
    Downloading https://files.pythonhosted.org/packages/66/98/c698c1577d1f3aec71a71df51af39547aace3a79f3e5c724ab203cd9a542/gigalixir-1.2.2.tar.gz
      Complete output from command python setup.py egg_info:
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/tmp/pip-build-QkIpa5/gigalixir/setup.py", line 41, in <module>
          'sure',
        File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 128, in setup
          _install_setup_requires(attrs)
        File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 123, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 513, in fetch_build_eggs
          replace_conflicting=True,
        File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 774, in resolve
          replace_conflicting=replace_conflicting
        File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1057, in best_match
          return self.obtain(req, installer)
        File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1069, in obtain
          return installer(requirement)
        File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 580, in fetch_build_egg
          return cmd.easy_install(req)
        File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 698, in easy_install
          return self.install_item(spec, dist.location, tmpdir, deps)
        File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 724, in install_item
          dists = self.install_eggs(spec, download, tmpdir)
        File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 909, in install_eggs
          return self.build_and_install(setup_script, setup_base)
        File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1177, in build_and_install
          self.run_setup(setup_script, setup_base, args)
        File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1165, in run_setup
          raise DistutilsError("Setup script exited with %s" % (v.args[0],))
      distutils.errors.DistutilsError: Setup script exited with error: package directory 'find_namespace:' does not exist
      
      ----------------------------------------
  Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-QkIpa5/gigalixir/
Error: The process '/usr/bin/sudo' failed with exit code 1

This is from yesterday's logs (when I deployed successfully

Installing gigalixir
  /usr/bin/sudo pip install gigalixir --ignore-installed six
  The directory '/home/runner/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
  The directory '/home/runner/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
  Collecting gigalixir
    Downloading https://files.pythonhosted.org/packages/66/98/c698c1577d1f3aec71a71df51af39547aace3a79f3e5c724ab203cd9a542/gigalixir-1.2.2.tar.gz
  Collecting six
    Downloading https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
  Collecting click>=6.7 (from gigalixir)
    Downloading https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whl (82kB)
  Collecting pyOpenSSL>=19.1.0 (from gigalixir)
    Downloading https://files.pythonhosted.org/packages/b2/5e/06351ede29fd4899782ad335c2e02f1f862a887c20a3541f17c3fa1a3525/pyOpenSSL-20.0.1-py2.py3-none-any.whl (54kB)
  Collecting pygments>=2.2.0 (from gigalixir)
    Downloading https://files.pythonhosted.org/packages/be/39/32da3184734730c0e4d3fa3b2b5872104668ad6dc1b5a73d8e477e5fe967/Pygments-2.5.2-py2.py3-none-any.whl (896kB)
  Collecting qrcode>=6.1 (from gigalixir)
    Downloading https://files.pythonhosted.org/packages/42/87/4a3a77e59ab7493d64da1f69bf1c2e899a4cf81e51b2baa855e8cc8115be/qrcode-6.1-py2.py3-none-any.whl
  Collecting requests>=2.20.0 (from gigalixir)
    Downloading https://files.pythonhosted.org/packages/29/c1/24814557f1d22c56d50280771a17307e6bf87b70727d975fd6b2ce6b014a/requests-2.25.1-py2.py3-none-any.whl (61kB)
  Collecting rollbar>=0.13.11 (from gigalixir)
    Downloading https://files.pythonhosted.org/packages/9d/b1/7c51f2308bdea13c857aab16ef0bdb786231401d7236575db1c60de50282/rollbar-0.15.2.tar.gz (49kB)
  Collecting stripe>=1.28.0 (from gigalixir)
    Downloading https://files.pythonhosted.org/packages/81/b0/f849388f242bc1ffb1570c5fe5173f7d7ab308a3131ff7926da8c5c058e8/stripe-2.55.2-py2.py3-none-any.whl (204kB)
  Collecting cryptography>=3.2 (from pyOpenSSL>=19.1.0->gigalixir)
    Downloading https://files.pythonhosted.org/packages/86/41/44173175d378c9e3a73294bb33c73725f7726def5ce267af6bd11b72eb23/cryptography-3.3.2-cp27-cp27mu-manylinux1_x86_64.whl (2.7MB)
  Collecting chardet<5,>=3.0.2 (from requests>=2.20.0->gigalixir)
    Downloading https://files.pythonhosted.org/packages/19/c7/fa589626997dd07bd87d9269342ccb74b1720384a4d739a1872bd84fbe68/chardet-4.0.0-py2.py3-none-any.whl (178kB)
  Collecting certifi>=2017.4.17 (from requests>=2.20.0->gigalixir)
    Downloading https://files.pythonhosted.org/packages/5e/a0/5f06e1e1d463903cf0c0eebeb751791119ed7a4b3737fdc9a77f1cdfb51f/certifi-2020.12.5-py2.py3-none-any.whl (147kB)
  Collecting urllib3<1.27,>=1.21.1 (from requests>=2.20.0->gigalixir)
    Downloading https://files.pythonhosted.org/packages/23/fc/8a49991f7905261f9ca9df5aa9b58363c3c821ce3e7f671895442b7100f2/urllib3-1.26.3-py2.py3-none-any.whl (137kB)
  Collecting idna<3,>=2.5 (from requests>=2.20.0->gigalixir)
    Downloading https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl (58kB)
  Collecting enum34; python_version < "3" (from cryptography>=3.2->pyOpenSSL>=19.1.0->gigalixir)
    Downloading https://files.pythonhosted.org/packages/6f/2c/a9386903ece2ea85e9807e0e062174dc26fdce8b05f216d00491be29fad5/enum34-1.1.10-py2-none-any.whl
  Collecting cffi>=1.12 (from cryptography>=3.2->pyOpenSSL>=19.1.0->gigalixir)
    Downloading https://files.pythonhosted.org/packages/50/5e/b4d3cff96422425dfcaa0a09414b5b17b311e74e56a4c457b16396dd73a7/cffi-1.14.4-cp27-cp27mu-manylinux1_x86_64.whl (389kB)
  Collecting ipaddress; python_version < "3" (from cryptography>=3.2->pyOpenSSL>=19.1.0->gigalixir)
    Downloading https://files.pythonhosted.org/packages/c2/f8/49697181b1651d8347d24c095ce46c7346c37335ddc7d255833e7cde674d/ipaddress-1.0.23-py2.py3-none-any.whl
  Collecting pycparser (from cffi>=1.12->cryptography>=3.2->pyOpenSSL>=19.1.0->gigalixir)
    Downloading https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112kB)
  Installing collected packages: click, six, enum34, pycparser, cffi, ipaddress, cryptography, pyOpenSSL, pygments, qrcode, chardet, certifi, urllib3, idna, requests, rollbar, stripe, gigalixir
    Running setup.py install for rollbar: started
      Running setup.py install for rollbar: finished with status 'done'
    Running setup.py install for gigalixir: started
      Running setup.py install for gigalixir: finished with status 'done'
  Successfully installed certifi-2020.12.5 cffi-1.14.4 chardet-4.0.0 click-7.1.2 cryptography-3.3.2 enum34-1.1.10 gigalixir-1.2.2 idna-2.10 ipaddress-1.0.23 pyOpenSSL-20.0.1 pycparser-2.20 pygments-2.5.2 qrcode-6.1 requests-2.25.1 rollbar-0.15.2 six-1.15.0 stripe-2.55.2 urllib3-1.26.3

Not sure what the problem is yet- the .tar.gz path looks the same in both cases. Could something changed with the underlying Github infra?

SSH key still required without migrations

Run mhanberg/[email protected]
  with:
    GIGALIXIR_USERNAME: ***
    GIGALIXIR_PASSWORD: ***
    GIGALIXIR_APP: ***
    MIGRATIONS: false
    GIGALIXIR_CLEAN: false
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.8.1/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.1/x64/lib
Error: Input required and not supplied: SSH_PRIVATE_KEY

Python error: 'Command "python setup.py egg_info" failed with error code 1'

Please see: https://github.com/henrik/qed/runs/2106042247?check_suite_focus=true

This is what my ci.yml looked like at that point: https://github.com/henrik/qed/blob/1ab951dd94b420d082ce7c8c77b4b3b48718cc39/.github/workflows/ci.yml

Run mhanberg/[email protected]
  with:
    GIGALIXIR_USERNAME: ***
    GIGALIXIR_PASSWORD: ***
    GIGALIXIR_APP: qed
    SSH_PRIVATE_KEY: ***
  
    MIGRATIONS: false
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.8.1/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.1/x64/lib
Installing gigalixir
  /usr/bin/sudo pip install gigalixir --ignore-installed six
  The directory '/home/runner/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
  The directory '/home/runner/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
  Collecting gigalixir
    Downloading https://files.pythonhosted.org/packages/c5/88/f83e5d3d1ecc2354c3b523e5fc0c7f6625e912889ca28e5bdca66a69af43/gigalixir-1.2.3.tar.gz
      Complete output from command python setup.py egg_info:
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/tmp/pip-build-0GzfnZ/gigalixir/setup.py", line 41, in <module>
          'sure',
        File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 128, in setup
          _install_setup_requires(attrs)
        File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 123, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 513, in fetch_build_eggs
          replace_conflicting=True,
        File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 774, in resolve
          replace_conflicting=replace_conflicting
        File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1057, in best_match
          return self.obtain(req, installer)
        File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1069, in obtain
          return installer(requirement)
        File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 580, in fetch_build_egg
          return cmd.easy_install(req)
        File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 698, in easy_install
          return self.install_item(spec, dist.location, tmpdir, deps)
        File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 724, in install_item
          dists = self.install_eggs(spec, download, tmpdir)
        File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 909, in install_eggs
          return self.build_and_install(setup_script, setup_base)
        File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1177, in build_and_install
          self.run_setup(setup_script, setup_base, args)
        File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1165, in run_setup
          raise DistutilsError("Setup script exited with %s" % (v.args[0],))
      distutils.errors.DistutilsError: Setup script exited with error: package directory 'find_namespace:' does not exist
      
      ----------------------------------------
  Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-0GzfnZ/gigalixir/
Error: The process '/usr/bin/sudo' failed with exit code 1

[Python is busted] Version 0.4.3 fails again

After updating to version 0.4.3, I am now seeing the following error:

/usr/bin/pip3 install gigalixir
  Collecting gigalixir
    Downloading https://files.pythonhosted.org/packages/66/98/c698c1577d1f3aec71a71df51af39547aace3a79f3e5c724ab203cd9a542/gigalixir-1.2.2.tar.gz
      Complete output from command python setup.py egg_info:
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
      ModuleNotFoundError: No module named 'setuptools'
      
      ----------------------------------------
  Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-h6n0b4lw/gigalixir/
Error: The process '/usr/bin/pip3' failed with exit code 1

My github actions file:

name: Test & Deploy @ Gigalixir
on: push

jobs:
  test:
    runs-on: ubuntu-latest
    services:
      db:
        image: postgres:11
        ports: ['5432:5432']
        env:
          POSTGRES_PASSWORD: postgres
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-elixir@v1
        with:
          otp-version: '23.2.1'
          elixir-version: '1.11.2'
      - uses: actions/setup-node@v2
        with:
          node-version: '14'
      - run: mix deps.get
      - working-directory: ./assets
        run: npm install
      - run: mix ci
      - run: ./cypress run --record --key ${{ secrets.CYPRESS_KEY }}

  deploy:
    needs: test
    if: github.ref == 'refs/heads/main'

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
        with:
          ref: main
          fetch-depth: 0

      - uses: mhanberg/[email protected]
        with:
          GIGALIXIR_USERNAME: ${{ secrets.GIGALIXIR_USERNAME }}
          GIGALIXIR_PASSWORD: ${{ secrets.GIGALIXIR_PASSWORD }}
          GIGALIXIR_APP: phonix
          SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
          MIGRATIONS: true

Unable to download action

I am attempting to add this action to my workflow, and when the job runs, it fails because it is unable to download the action.

Logs:

2020-03-05T15:47:35.5966260Z ##[section]Starting: Request a runner to run this job
2020-03-05T15:47:35.9821639Z Requesting a hosted runner in current repository's account/organization with labels: 'ubuntu-latest', require runner match: True
2020-03-05T15:47:36.0701012Z Labels matched hosted runners has been found, waiting for one of them get assigned for this job.
2020-03-05T15:47:36.1038108Z ##[section]Finishing: Request a runner to run this job
2020-03-05T15:47:42.2851843Z Current runner version: '2.165.2'
2020-03-05T15:47:42.2853964Z Prepare workflow directory
2020-03-05T15:47:42.3160237Z Prepare all required actions
2020-03-05T15:47:42.3173489Z Download action repository 'actions/checkout@v2'
2020-03-05T15:47:44.3524413Z Download action repository 'mhanberg/[email protected]'
2020-03-05T15:47:44.4684481Z ##[warning]Failed to download action 'https://api.github.com/repos/mhanberg/gigalixir-action/tarball/v0.1.0'. Error Response status code does not indicate success: 404 (Not Found).
2020-03-05T15:47:44.4689581Z ##[warning]Back off 29.535 seconds before retry.
2020-03-05T15:48:14.1926008Z ##[warning]Failed to download action 'https://api.github.com/repos/mhanberg/gigalixir-action/tarball/v0.1.0'. Error Response status code does not indicate success: 404 (Not Found).
2020-03-05T15:48:14.1932914Z ##[warning]Back off 15.295 seconds before retry.
2020-03-05T15:48:29.6183354Z ##[error]Response status code does not indicate success: 404 (Not Found).

Workflow file:

on: push

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        otp: [22.2.6]
        elixir: [1.10.0]

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-elixir@v1
        with:
          otp-version: ${{ matrix.otp }}
          elixir-version: ${{ matrix.elixir }}

      - name: Setup Node
        uses: actions/setup-node@v1
        with:
          node-version: 12.14.1

      - uses: actions/cache@v1
        id: deps-cache
        with:
          path: deps
          key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}

      - uses: actions/cache@v1
        id: build-cache
        with:
          path: _build
          key: ${{ runner.os }}-build-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}

      - name: Install Dependencies
        run: |
          mix deps.get
          npm --prefix assets install
      - name: Run Tests
        run: |
          mix format --check-formatted
          mix test

  deploy:
    needs: build

    if: github.ref == 'refs/heads/master'

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
        with:
          ref: master
          fetch-depth: 0

      - uses: mhanberg/[email protected]
        with:
          GIGALIXIR_USERNAME: ${{ secrets.GIGALIXIR_USERNAME }}
          GIGALIXIR_PASSWORD: ${{ secrets.GIGALIXIR_PASSWORD }}
          GIGALIXIR_APP: <APP_NAME>
          SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}

Error: The process '/opt/hostedtoolcache/Python/3.8.1/x64/bin/gigalixir' failed with exit code 1

I am trying to run gigalixir on github actions and I am receiving this errors:

Logging in to gigalixir
  /opt/hostedtoolcache/Python/3.8.1/x64/bin/gigalixir login -e $({ secrets.GIGALIXIR_USERNAME }) -y -p $({ secrets.GIGALIXIR_PASSWORD })
  Sorry, we could not authenticate you. If you need to reset your password, run `gigalixir account:password:reset --email=$({ secrets.GIGALIXIR_USERNAME })`.
Error: The process '/opt/hostedtoolcache/Python/3.8.1/x64/bin/gigalixir' failed with exit code 1

I already reseted the password and I have as well my secrets configured on github.

cd.yml file:

name: Gigalixir CD

on:
  push:
    branches:
      - master
jobs:
  deploy:
    if: github.ref == 'refs/heads/master'
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
        with:
          ref: master
          fetch-depth: 0
      - uses: actions/setup-python@v2
        with:
          python-version: 3.8.1
      - uses: mhanberg/[email protected]
        with:
          GIGALIXIR_USERNAME: $({ secrets.GIGALIXIR_USERNAME })
          GIGALIXIR_PASSWORD: $({ secrets.GIGALIXIR_PASSWORD })
          GIGALIXIR_APP: $({ secrets.GIGALIXIR_APP })
          SSH_PRIVATE_KEY: $({ secrets.SSH_PRIVATE_KEY })
          MIGRATIONS: false

Unable to locate executable file: gigalixir

I'm getting the following error with [email protected].

Any ideas?

Error: Unable to locate executable file: gigalixir. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

Getting current replicas

the 'Getting current replicas' check is returning the proper data (same as when I run 'gigalixir ps -a <app_name>' from the command line), but the github action never stops polling... I eventually kill the github action manually in order to stop the polling. thoughts?

here is what the output in the console looks like...
Run mhanberg/[email protected]

Getting current replicas
Waiting 64 seconds...
Getting current replicas
Waiting 128 seconds...
Getting current replicas
Waiting 256 seconds...
Getting current replicas
/usr/local/bin/gigalixir ps -a backoffice
{
"cloud": "aws",
"pods": [
{
"lastState": {},
"name": "backoffice-db6dcf486-xxxxxx",
"sha": "fb33ebad8a362a2e0a74a4exxxxxxx",
"status": "Healthy",
"version": "86"
}
],
"region": "us-east-1",
"replicas_desired": 1,
"replicas_running": 1,
"size": 0.3,
"stack": "gigalixir-18",
"unique_name": "backoffice"
}

Waiting 512 seconds...

build stuck at 0.2.1

Heyo! It looks like the files in the dist directory are behind a version - maybe someone forgot to run ncc build before they committed and bumped the package to 0.3.0?

Thanks for all your work in the Elixir ecosystem, it is much appreciated! 🙇

I can't deploy - Version 3.8.1 was not found in the local cache

Error in the image below:

image

My code is the same as suggested:

deploy:
needs: build # Will only run if the test job succeeds
if: github.ref == 'refs/heads/main' # Only run this job if it is on the main branch

runs-on: ubuntu-latest

steps:
  - uses: actions/checkout@v2
    with:
      ref: main # Check out main instead of the latest commit
      fetch-depth: 0 # Checkout the whole branch

  - uses: actions/setup-python@v2
    with:
      python-version: "3.8.1"

  - uses: mhanberg/[email protected]
    with:
      GIGALIXIR_APP: disguised-massive-moorhen
      GIGALIXIR_CLEAN: true # defaults to false
      GIGALIXIR_USERNAME: ${{ secrets.GIGALIXIR_USERNAME }}
      GIGALIXIR_PASSWORD: ${{ secrets.GIGALIXIR_PASSWORD }}
      MIGRATIONS: false # defaults to true
      SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}

I'm using Windows 10.

Migration failed (too_many_connections)

Enabled the migration and set the correct SSH Private Key.
However, it raises this error when performing a migration

 [error] Postgrex.Protocol (#PID<0.305.0>) failed to connect: ** (Postgrex.Error) FATAL 53300 (too_many_connections) too many connections for role

Anyone has an idea to fix it?

Any help would be appreciated

Action fails during gigalixir login step with pkg_resources.DistributionNotFound

My deploys have started failing during the login step with this error in the logs: pkg_resources.DistributionNotFound: The 'pyOpenSSL>=0.14; extra == "security"' distribution was not found and is required by requests.

My last successful action ran on Nov 1, using v0.2.1. I have bumped it up to v0.4.0 but still see the same error. I haven't made any other changes to my workflow file in between now (Nov 15) and then.

Thanks so much for creating this action - it's made for a great CI/CD workflow for my project!

Raw Logs:

2020-11-15T19:23:40.1969520Z ##[group]Run mhanberg/[email protected]
2020-11-15T19:23:40.1970542Z with:
2020-11-15T19:23:40.1971940Z   GIGALIXIR_USERNAME: ***
2020-11-15T19:23:40.1972841Z   GIGALIXIR_PASSWORD: ***
2020-11-15T19:23:40.1973714Z   GIGALIXIR_APP: ***
2020-11-15T19:23:40.2021549Z   SSH_PRIVATE_KEY: ***

2020-11-15T19:23:40.2022213Z   MIGRATIONS: false
2020-11-15T19:23:40.2022857Z ##[endgroup]
2020-11-15T19:23:40.2448296Z ##[group]Installing gigalixir
2020-11-15T19:23:40.2509023Z [command]/usr/bin/sudo pip install gigalixir --ignore-installed six
2020-11-15T19:23:43.1397979Z The directory '/home/runner/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
2020-11-15T19:23:43.1401374Z The directory '/home/runner/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
2020-11-15T19:23:43.1431545Z Collecting gigalixir
2020-11-15T19:23:43.2936859Z   Downloading https://files.pythonhosted.org/packages/0d/58/76772c006992ac094791e6d42f14410eacac88a5a19b16bd5073fa2beb67/gigalixir-1.2.1.tar.gz
2020-11-15T19:23:44.2911289Z Collecting six
2020-11-15T19:23:44.3382838Z   Downloading https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
2020-11-15T19:23:44.3416896Z Collecting click>=6.7 (from gigalixir)
2020-11-15T19:23:44.3920091Z   Downloading https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whl (82kB)
2020-11-15T19:23:44.4101555Z Collecting pygments>=2.2.0 (from gigalixir)
2020-11-15T19:23:44.4753279Z   Downloading https://files.pythonhosted.org/packages/be/39/32da3184734730c0e4d3fa3b2b5872104668ad6dc1b5a73d8e477e5fe967/Pygments-2.5.2-py2.py3-none-any.whl (896kB)
2020-11-15T19:23:44.6395489Z Collecting qrcode>=6.1 (from gigalixir)
2020-11-15T19:23:44.6787161Z   Downloading https://files.pythonhosted.org/packages/42/87/4a3a77e59ab7493d64da1f69bf1c2e899a4cf81e51b2baa855e8cc8115be/qrcode-6.1-py2.py3-none-any.whl
2020-11-15T19:23:44.6952237Z Collecting requests>=2.20.0 (from gigalixir)
2020-11-15T19:23:44.7967274Z   Downloading https://files.pythonhosted.org/packages/39/fc/f91eac5a39a65f75a7adb58eac7fa78871ea9872283fb9c44e6545998134/requests-2.25.0-py2.py3-none-any.whl (61kB)
2020-11-15T19:23:44.8147284Z Collecting rollbar>=0.13.11 (from gigalixir)
2020-11-15T19:23:44.9571611Z   Downloading https://files.pythonhosted.org/packages/03/b4/43f2ffb3678d6a16a76b24c5a05c3c727dad50b23808f3e4ddc938a8ac1f/rollbar-0.15.1.tar.gz (48kB)
2020-11-15T19:23:45.1298299Z Collecting stripe>=1.28.0 (from gigalixir)
2020-11-15T19:23:45.3135397Z   Downloading https://files.pythonhosted.org/packages/6c/d0/10fb088453ebe5ab40b940d39022a88bddf86e11fc9f137d36298aafc536/stripe-2.55.0-py2.py3-none-any.whl (204kB)
2020-11-15T19:23:45.3508453Z Collecting chardet<4,>=3.0.2 (from requests>=2.20.0->gigalixir)
2020-11-15T19:23:45.3845606Z   Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
2020-11-15T19:23:45.4035554Z Collecting certifi>=2017.4.17 (from requests>=2.20.0->gigalixir)
2020-11-15T19:23:45.4550339Z   Downloading https://files.pythonhosted.org/packages/c1/6f/3d85f0850962279a7e4c622695d7b3171e95ac65308a57d3b29738b27149/certifi-2020.11.8-py2.py3-none-any.whl (155kB)
2020-11-15T19:23:45.4752811Z Collecting urllib3<1.27,>=1.21.1 (from requests>=2.20.0->gigalixir)
2020-11-15T19:23:45.5469076Z   Downloading https://files.pythonhosted.org/packages/f5/71/45d36a8df68f3ebb098d6861b2c017f3d094538c0fb98fa61d4dc43e69b9/urllib3-1.26.2-py2.py3-none-any.whl (136kB)
2020-11-15T19:23:45.5761979Z Collecting idna<3,>=2.5 (from requests>=2.20.0->gigalixir)
2020-11-15T19:23:45.6130076Z   Downloading https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl (58kB)
2020-11-15T19:23:45.6214327Z Installing collected packages: click, pygments, six, qrcode, chardet, certifi, urllib3, idna, requests, rollbar, stripe, gigalixir
2020-11-15T19:23:46.3153653Z   Running setup.py install for rollbar: started
2020-11-15T19:23:46.5214993Z     Running setup.py install for rollbar: finished with status 'done'
2020-11-15T19:23:46.5921012Z   Running setup.py install for gigalixir: started
2020-11-15T19:23:46.8141100Z     Running setup.py install for gigalixir: finished with status 'done'
2020-11-15T19:23:46.8579881Z Successfully installed certifi-2020.11.8 chardet-3.0.4 click-7.1.2 gigalixir-1.2.1 idna-2.10 pygments-2.5.2 qrcode-6.1 requests-2.25.0 rollbar-0.15.1 six-1.15.0 stripe-2.55.0 urllib3-1.26.2
2020-11-15T19:23:46.9165334Z ##[endgroup]
2020-11-15T19:23:46.9174351Z ##[group]Logging in to gigalixir
2020-11-15T19:23:46.9193457Z [command]/usr/local/bin/gigalixir login -e *** -y -p ***
2020-11-15T19:23:47.0471005Z Traceback (most recent call last):
2020-11-15T19:23:47.0534574Z   File "/usr/local/bin/gigalixir", line 6, in <module>
2020-11-15T19:23:47.0536634Z     from pkg_resources import load_entry_point
2020-11-15T19:23:47.0539934Z   File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3088, in <module>
2020-11-15T19:23:47.0763150Z     @_call_aside
2020-11-15T19:23:47.0768214Z   File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3072, in _call_aside
2020-11-15T19:23:47.0769783Z     f(*args, **kwargs)
2020-11-15T19:23:47.0771739Z   File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3101, in _initialize_master_working_set
2020-11-15T19:23:47.0784276Z     working_set = WorkingSet._build_master()
2020-11-15T19:23:47.0787722Z   File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 574, in _build_master
2020-11-15T19:23:47.0789264Z     ws.require(__requires__)
2020-11-15T19:23:47.0790930Z   File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 892, in require
2020-11-15T19:23:47.0792591Z     needed = self.resolve(parse_requirements(requirements))
2020-11-15T19:23:47.0794483Z   File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 778, in resolve
2020-11-15T19:23:47.0796131Z     raise DistributionNotFound(req, requirers)
2020-11-15T19:23:47.0798602Z pkg_resources.DistributionNotFound: The 'pyOpenSSL>=0.14; extra == "security"' distribution was not found and is required by requests
2020-11-15T19:23:47.0910689Z ##[endgroup]
2020-11-15T19:23:47.0916682Z ##[error]The process '/usr/local/bin/gigalixir' failed with exit code 1

Relevent section of Workflow File:

  deploy:
    needs: test # Will only run if the test job succeeds
    if: github.event_name == 'push' && github.ref == 'refs/heads/master'

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
        with:
          ref: master # Checkout out master instead of the latest commit
          fetch-depth: 0 # Checkout the whole branch

      - uses: mhanberg/[email protected]
        with:
          GIGALIXIR_USERNAME: ${{ secrets.GIGALIXIR_USERNAME }}
          GIGALIXIR_PASSWORD: ${{ secrets.GIGALIXIR_PASSWORD }}
          GIGALIXIR_APP: ${{ secrets.GIGALIXIR_APP_NAME }}
          SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
          MIGRATIONS: false  # defaults to true

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.