I have a simple React application with an Amplify configuration. When I try to publish it using Amplify (Mac) it ends with the following error:
❯ amplify publish
✔ Successfully pulled backend environment dev from the cloud.
Current Environment: dev
| Category | Resource name | Operation | Provider plugin |
| -------- | ---------------------------- | --------- | ----------------- |
| Api | sls-demo-twitter-state-api-2 | No Change | |
| Hosting | amplifyhosting | No Change | awscloudformation |
No changes detected
Publish started for amplifyhosting
command execution terminated with error
An error occurred during the publish operation: spawn npm.cmd ENOENT
The same configuration runs without any problems on my other client (Windows). Actually Amplify tries to build the app first and this step does not work. I cannot find reason for this.
"amplify publish" basically runs the build & start commands from amplify project configuration,
that you can reconfigure using amplify configure project.
I hope in your machine(Mac) npm is missing.
Install node brew install node and run amplify publish
Related
I distributed a Flutter app using fastlane and Firebase App Distribution. I needed to distribute it again so I incremented the build number in pubspec.yaml file: version: 1.0.0+1 => 1.0.0+2 and Xcode's Build: 1 => 2 and ran git commit and ran fastlane command but the new version of release file wasn't uploaded on App Distribution.
What am I missing?
[18:38:59]: ------------------------------
[18:38:59]: --- Step: default_platform ---
[18:38:59]: ------------------------------
[18:38:59]: Driving the lane 'android development' 🚀
[18:38:59]: ---------------------------------------
[18:38:59]: --- Step: firebase_app_distribution ---
[18:38:59]: ---------------------------------------
[18:38:59]: Authenticating with FIREBASE_TOKEN environment variable
[18:38:59]: 🔐 Authenticated successfully.
[18:39:01]: ✅ This APK has been uploaded before. Skipping upload step.
[18:39:02]: ✅ Posted release notes.
[18:39:03]: ✅ Added testers/groups.
[18:39:03]: 🎉 App Distribution upload finished successfully.
+------+---------------------------+-------------+
| fastlane summary |
+------+---------------------------+-------------+
| Step | Action | Time (in s) |
+------+---------------------------+-------------+
| 1 | default_platform | 0 |
| 2 | firebase_app_distribution | 3 |
+------+---------------------------+-------------+
[18:39:03]: fastlane.tools finished successfully 🎉
Then build the Android apk in release as shown below:
flutter build apk --release
Now for deployment, you have to run the fastlane workflow:
cd android && fastlane deploy && cd -
android/fastlane/Fastfile
For more details
I'm trying to debug a Broken DAG message from the airflow UI, from the accepted answer of Debugging Broken DAGs.
However, with airflow 2.1.0, the airfow list_dags command now prints a usage message:
usage: airflow [-h] GROUP_OR_COMMAND ...
airflow dags list and airflow dags report both give a table with DAGs, but none give the full stack trace I'm looking for.
$ airflow dags report
file | duration | dag_num | task_num | dags
=================+================+=========+==========+=================
/myBROKENDAG.py | 0:00:00.032594 | 0 | 0 |
/example-dag.py | 0:00:00.009614 | 1 | 9 | example_dag
/mydag2.py | 0:00:00.007147 | 1 | 1 | mydag2
Any ideas on how to find the full stack trace for a broken DAG with the new CLI?
What I could figure so far, is from the container or host running the airflow webserver:
cd dags
python myBROKENDAG.py
this also accounted for the UI-defined connection and printed the full stacktrace.
Credit to this answer
I am working with flyway Db migration, and I have download flyway zip folder and placed into my local computer.
I have two files in the sql folder, i.e V1__Create_person_table.sql and V2__Add_people.sql.
Flyway info
Flyway Community Edition 5.2.4 by Boxfuse
Database: jdbc:h2:file:./foobardb (H2 1.4)
Schema version: << Empty Schema >>
+-----------+---------+---------------------+------+--------------+---------+
| Category | Version | Description | Type | Installed On | State |
+-----------+---------+---------------------+------+--------------+---------+
| Versioned | 1 | Create person table | SQL | | Pending |
| Versioned | 2 | Add people | SQL | | Pending |
+-----------+---------+---------------------+------+--------------+---------+
Flyway migrate
Flyway Community Edition 5.2.4 by Boxfuse
Database: jdbc:h2:file:./foobardb (H2 1.4)
Successfully validated 2 migrations (execution time 00:00.020s)
Creating Schema History table: "PUBLIC"."flyway_schema_history"
Current version of schema "PUBLIC": << Empty Schema >>
Migrating schema "PUBLIC" to version 1 - Create person table
Migrating schema "PUBLIC" to version 2 - Add people
Successfully applied 2 migrations to schema "PUBLIC" (execution time 00:00.092s)
Flyway info
Flyway Community Edition 5.2.4 by Boxfuse
Database: jdbc:h2:file:./foobardb (H2 1.4)
Schema version: 2
+-----------+---------+---------------------+------+---------------------+---------+
| Category | Version | Description | Type | Installed On | State |
+-----------+---------+---------------------+------+---------------------+---------+
| Versioned | 1 | Create person table | SQL | 2019-08-19 12:12:40 | Success |
| Versioned | 2 | Add people | SQL | 2019-08-19 12:12:40 | Success |
+-----------+---------+---------------------+------+---------------------+---------+
Now, here the question is: if I want to update or edit somehing in above two sql files, how can I do that, should I edit existing file version 1, version 2 and
save the file and run all the above command again?
You should not edit your existed scripts. I have to add a new one e.g. V3__Update_person_table.sql and correctly update it.
P.S.
In the big project, we have tens of scripts that iteratively modify the empty database to achieve a current status.
After that, usually, when moving to the next release version, we merge all existed scripts into one or two (when we do not need to keep history anymore).
Notes
This is correct. We do not change existed scripts (this is part of CI/CD). All changes should be added additionally with new scripts. Flyway accepts a directory with all scripts.
WE have flyway integrated with Redshift and we are using this as a simple java main program to run all our schema migrations. We also use the info command to print the current version of the database, However this command successfully runs or at least appears to run but does not print the version number.
We have version 4.2 of the flyway jar. What is that we may be missing? Thanks
To manually recreate what the info command line option does in java code you can copy what its implementation does (from the source):
MigrationInfoDumper.dumpToAsciiTable(flyway.info().all())
An example from the docs is shown below:
+-------------+------------------------+---------------------+---------+
| Version | Description | Installed on | State |
+-------------+------------------------+---------------------+---------+
| 1 | Initial structure | | Pending |
| 1.1 | Populate table | | Pending |
| 1.3 | And his brother | | Pending |
+-------------+------------------------+---------------------+---------+
I can check a bundle state from Karaf Console by doing:-
karaf#root>bundle:list | grep camel-test
246 | Active | 50 | 2.16.1 | camel-test
Is there a way I can do this programatically via some script running on the same machine as Karaf or via some REST End Point that Karaf exposes?
I am using Karaf 3.0.5 running under ServiceMix 6.0.1.
As discussed in Karaf User Forum I am able to achieve it using the karaf client:-
jabong#jabong1143:~/Downloads/apache-servicemix-6.1.0/bin$ ./client -l 0 -u karaf "bundle:list" | grep camel-test
246 | Active | 50 | 2.16.1 | camel-test