Git Product home page Git Product logo

Comments (9)

mpscholten avatar mpscholten commented on June 3, 2024 1

You could also try to create an empty migration file as a workaround btw

from ihp.

mpscholten avatar mpscholten commented on June 3, 2024 1

Did you run git add Application/Migration? If the files are not tracked by git, nix flake will not see them

from ihp.

mpscholten avatar mpscholten commented on June 3, 2024

Does your app have a migration? If not, can you run mkdir -p Application/Migration?

from ihp.

AronNovak avatar AronNovak commented on June 3, 2024

@mpscholten

 aaron   105-deployment  ~  gizra  example-app  cat Application/Migration/
20231120_DummyMigration.hs  Migration.hs                
 aaron   105-deployment  ~  gizra  example-app  cat Application/Migration/20231120_DummyMigration.hs 
-- This is a dummy migration file.
 aaron   105-deployment  ~  gizra  example-app  cat Application/Migration/Migration.hs 
 aaron   105-deployment  ~  gizra  example-app  deploy-to-nixos ihp-app
building the system configuration...
error:
       … while calling the 'head' builtin

         at /nix/store/3qq9i5znbx951wqpn7rs0jjw5zq3mxlj-source/lib/attrsets.nix:820:11:

          819|         || pred here (elemAt values 1) (head values) then
          820|           head values
             |           ^
          821|         else

       … while evaluating the attribute 'value'

         at /nix/store/3qq9i5znbx951wqpn7rs0jjw5zq3mxlj-source/lib/modules.nix:807:9:

          806|     in warnDeprecation opt //
          807|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          808|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: getting status of '/nix/store/z3xi86j58l6igblyv56pk1bbsnag2ffd-source/Application/Migration': No such file or directory

I made a few attempts to create a dummy migration, but it gives the same error.
I am a bit unsure how error handling is done, so if the errors related to head and value can cause the last error, or the other way around. Normally this project does compile and has some test coverage as well.

from ihp.

AronNovak avatar AronNovak commented on June 3, 2024

@mpscholten Success, with the dummy migration file, I am able to proceed further, now I can tackle the SSH connectivity, but that's a different topic. Thanks!

from ihp.

AronNovak avatar AronNovak commented on June 3, 2024

After allowing the SSH connection, the same, well similar error returns back at a different phase.

 aaron   105-deployment  ~  gizra  example-app  deploy-to-nixos ihp-app
building the system configuration...
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/rxgrjbnbcwnbxhsz2c7cpia8sngimqfm-nixos-system-unnamed-23.11.20231003.ea0284a.drv^*'
ssh: connect to host ec2-54-155-151-14.eu-west-1.compute.amazonaws.com port 22: Connection timed out
error: failed to start SSH connection to 'ihp-app'
^C

< -- opening SSH port at the security group config -- >

 aaron   105-deployment  ~  gizra  example-app  SIGINT  deploy-to-nixos ihp-app
building the system configuration...
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/rxgrjbnbcwnbxhsz2c7cpia8sngimqfm-nixos-system-unnamed-23.11.20231003.ea0284a.drv^*'
these 3943 derivations will be built:
  /nix/store/b7irlwi2wjlx5aj1dghx4c8k3ax6m56q-busybox.drv
< -- all the packages here -- >
  /nix/store/zw01jza1ms2asxhyvicqlnk0jwd7dymy-bitvec-1.1.5.0-doc
error: invalid character in Base64 string: ''
Failed to start migrate.service: Unit migrate.service not found.

Application/Migration/20231120_DummyMigration.hs contains:

module Application.Migration20231120 where

import IHP.Migration
import IHP.ModelSupport
import Database.PostgreSQL.Simple

instance Migration where
    up = pure () -- No operation on up migration
    down = pure () -- No operation on down migration

With a blank Migration file, I have exactly the same error.

from ihp.

AronNovak avatar AronNovak commented on June 3, 2024

https://github.com/amitaibu/ihp-landing-page/pull/33/files - equivalent on an OSS repo, same error.

from ihp.

AronNovak avatar AronNovak commented on June 3, 2024

Likely I should provide a proper dummy Migration that can be initialized as a service.

from ihp.

mpscholten avatar mpscholten commented on June 3, 2024

@AronNovak i think this is fix, right?

from ihp.

Related Issues (20)

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.