Docker can't find bind source path for entrypoint script, even though file exists - docker

I'm trying to build a service (Google Cloud Composer, which is basically just Airflow) locally via Docker. However, I'm getting the following error message:
│ http+docker://localhost/v1.41/containers/create?name=composer-local-dev-gcp_composer_locally: Bad Request ("invalid mount │
│ config for type "bind": bind source path does not exist: │
│ /opt/homebrew/lib/python3.10/site-packages/composer_local_dev/docker_files/entrypoint.sh")
However, such a file does exist and is executable:
16777233 2895095 -rwxr-xr-x 1 <my_unix_name> admin 0 1281 "Feb 13 14:26:24 2023" "Feb 13 14:26:24 2023" "Feb 13 14:26:24 2023" "Feb 10 17:04:20 2023" 4096 8 0 /opt/homebrew/lib/python3.10/site-packages/composer_local_dev/docker_files/entrypoint.sh
I've confirmed my user is a member of the "admin" group, so I don't think this is a file permissions error.
How can I get Docker to recognize this entrypoint and run the relevant script?

Related

[Solved]: Error resolving image name 'debian-cloud/debian-9': Could not find image or family debian-cloud/debian-9

Google Cloud Skills Boost
(Quest) Secure Workloads in Google Kubernetes Engine
(Lab) Securing Applications on Kubernetes Engine - Three Examples
On the section "Provisioning the Kubernetes Engine cluster", run the command
make create
I got into an error:
enter code here
│ Error: Error resolving image name 'debian-cloud/debian-9': Could not find image or family debian-cloud/debian-9
│
│ with module.bastion.google_compute_instance.instance,
│ on modules/instance/main.tf line 54, in resource "google_compute_instance" "instance":
│ 54: resource "google_compute_instance" "instance" {
Step 1: Run the command to see the available images
gcloud compute images list | grep debian
Step 2: At the project root, run the below command
vi ./terraform/modules/instance/main.tf
Step 3: At VIM normal mode, search for the debian-9 by type /debian-9, hit enter
// Specify the Operating System Family and version.
boot_disk {
initialize_params {
image = "debian-cloud/debian-9"
}
}
Step 4: As my case, the debian-10 is available. So I change the above block code into
// Specify the Operating System Family and version.
boot_disk {
initialize_params {
image = "debian-cloud/debian-10"
}
}
Step 5: Change directory to the project root, then re-run the command make create.

Special characters in Jenkins console log 39m, 90m

We are seeing special characters in Jenkins console logs:
What we expect:
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Cypress: 9.7.0 │
│ Browser: Chrome 104 (headless) │
│ Node Version: v14.20.0 (/usr/bin/node)
└────────────────────────────────────────────────────────────────────────────────────────────────┘
What we see in Jenkins:
[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m
Running: [90mwfo/speech-iq/configuration/synonyms/synonyms.spec.js[39m
Is there any configs to be twaeaked in Jenkins to get rid of the special characters?
We tried some suggestings as per Jenkins console output has these strange characters from grunt command [31m[[39m... , buut no luck
Please advise!
Setting the NO_COLOR environment variable to 1 should fix the problem in the case of Cypress. https://docs.cypress.io/guides/continuous-integration/introduction#Colors
https://stackoverflow.com/a/15146516/4213184
The only option I found is to append the command with --no--color, Answer is in above link.

Liquibase "Cannot find the declaration of element 'databaseChangeLog'" in xml changeLog file

Following This guide from Liquibase's official website I've created my own changelog-master.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="https://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
<includeAll path="/home/username/liquibase/examples/sqlite-test" filter="sql"/>
</databaseChangeLog>
I've then created the liquibase.properties file in the same folder:
# Enter the path for your changelog file.
changeLogFile=changelog-master.xml
#### Enter the Target database 'url' information ####
url=jdbc:sqlite://home/username/liquibase/examples/sqlite-test/testdb
Which is correct because if I run a normal .sql changelog it runs correctly and updates my DB.
I've then created a changelog file in sql which has to be automatically executed when launching liquibase update which is 000020-changelog.sql
--liquibase formatted sql
--changeset daniel:3
create table phonebook(name TEXT, surname TEXT, type TEXT, phone_number TEXT);
But when I go and launch liquibase update I get an error from the XML parser:
Unexpected error running Liquibase: cvc-elt.1.a: Cannot find the declaration of element 'databaseChangeLog'.
And I can't understand what the problem is. I've checked multiple times if the changelog-master.xml file is correct and it looks like it is. And from what I can find the cvc-elt.1.a is an XML Parsing error, like databaseChangeLog it's not declared in the xml schema.
I'm doing this so that in the future I can create as many changelogs as I want and have them executed one after the other automatically.
I've been looking for some solutions for this problem but I can't find anything. I've found a link to the official forums but it's now a dead link.
Extra info:
Liquibase version 4.0.0
Installed JRE: openjdk 11.0.8 2020-07-14
OS: Debian 10
SQLite version 3.27.2
08/09/2020 edit:
as asked in the comments this is the project's structure:
root#dev-machine:/home/username/liquibase/examples/sqlite-test# ls -la
total 68
drwxr-xr-x 2 root root 4096 Sep 4 17:28 .
drwxr-xr-x 5 username username 4096 Sep 4 17:02 ..
-rw-r--r-- 1 root root 139 Sep 4 13:35 000020-changelog.sql
-rw-r--r-- 1 root root 118 Sep 4 13:36 000030-changelog.sql
-rw-r--r-- 1 root root 201 Sep 4 17:05 000040-changelog.sql
-rw-r--r-- 1 root root 240 Sep 4 17:28 000050-changelog.sql
-rw-r--r-- 1 root root 456 Sep 4 14:22 changelog-master.xml
-rw-r--r-- 1 root root 2637 Sep 4 16:36 liquibase.properties
-rw-r--r-- 1 root root 32768 Sep 4 17:28 testdb
testdb is the sqlite database I'm using to test liquibase. The .sql files are the consecutive changelogs that must be run to update the DB
What was causing the issue I was having was the fact that in my changelog-master.xml I had an outdated XSD version, which was causing something to break into the XML Parser. To fix it I've changed it with the following:
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd
http://www.liquibase.org/xml/ns/pro
http://www.liquibase.org/xml/ns/pro/liquibase-pro-4.0.xsd
http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.0.xsd
">
<includeAll path="schema/"/>
</databaseChangeLog>
and moved all my *.sql files into the schema/ folder. Other than that I've renamed all my .sql files using the *.databasetype.sql namescheme, in my case 000020-changelog.sqlite.sql. Had to do this because otherwise the files that used --liquibase formatted sql wouldn't be executed.
For me, this issue is more related to http and https. The following shows the successful config:
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" <-- NOT HTTPS!
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <-- NOT HTTPS!
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog <-- NOT HTTPS!
https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.4.xsd">
<includeAll path="changelogs/" relativeToChangelogFile="true"/>
</databaseChangeLog>
If http in any one of the three line is changed to https, it will throw the exception:
liquibase.exception.ChangeLogParseException: Error parsing line 6 column 70
of classpath:db/main.xml: cvc-elt.1.a: Cannot find the declaration of
element 'databaseChangeLog'.

Unable to update Google-Cloud-Composer environment variables

I am unable to update an already created google-cloud-composer environment. This happens if I am working with an already created environment but not when I am creating a new one. Seems like I am missing some default settings here. Has anyone else faced a similar issue?
gcloud composer environments list --locations us-east1
┌───────────────┬──────────┬─────────┬──────────────────────────┐
│ NAME │ LOCATION │ STATE │ CREATE_TIME │
├───────────────┼──────────┼─────────┼──────────────────────────┤
│ dummy-airflow │ us-east1 │ RUNNING │ 2018-11-21T09:50:19.793Z │
└───────────────┴──────────┴─────────┴──────────────────────────┘
cloud composer environments update dummy-airflow
--location us-east1 --update-env-variables gcp_project=data-rubrics
Waiting for [projects/data-rubrics/locations/us-east1/environments/dummy-airflow] to be updated with [projects/data-rubrics/locations/us-
east1/operations/b6746709-1529-4d67-a08c-453de1a0063a]...failed.
ERROR: (gcloud.composer.environments.update) Error updating [projects/data-rubrics/locations/us-east1/environments/dummy-airflow]: Operation [projects/data-rubrics/locations/us-east1/operations/b6746709-1529-4d67-a08c-453de1a0063a] failed: Composer Backend timed out. Currently running tasks are [stage: CP_COMPOSER_AGENT_RUNNING
description: "Composer Agent Running. Latest Agent Stage: stage: PATCH_CREATED\n ."
response_timestamp {
seconds: 1543236373
nanos: 570000000
}
].
The issue was resolved by performing the two steps below:
Disable and then Enable the Cloud Composer API; and
Set the AIRFLOW_GPL_UNIDECODE to yes.

grails emacs mode - "Cannot open load file" "project-mode"

I am trying to use emacs for grails development. Tried on grails-emacs-mode
There are emacs and emacs23 on my ubuntu 12.04.
prayag#prayag:~$ ls -l /usr/share/emacs[tab][tab]
emacs/ emacs23/
As the grails-emacs-mode suggests, I copied grails-mode.el and primary.org files to my emacs23/site-list
prayag#prayag:~$ ls -l /usr/share/emacs23/site-lisp/
total 32
-rw-r--r-- 1 root root 3013 Nov 17 00:39 debian-startup.elc
drwxr-xr-x 2 root root 4096 Nov 17 00:39 dictionaries-common
-rw-r--r-- 1 root root 18205 Feb 14 01:11 grails-mode.el
-rw-r--r-- 1 root root 0 Feb 14 01:11 primary.org
-rw-r--r-- 1 root root 106 Sep 22 01:16 subdirs.el
Then, created init.el inside .emacs.d as there exists no .emacs file in home directory. The init.el conatains
(require 'grails-mode)
(setq grails-mode t)
(setq project-mode t)
(add-to-list 'auto-mode-alist '("\.gsp$" . nxml-mode)) ; Use whatever mode you want for views.
(project-load-all) ; Loads all saved projects. Recommended, but not required.
now, opening emacs23 doesn't show any grails in the menubar.
I also tried
M-x
load-file .emacs.d/init.el
which throws
Warning (initialization): An error occurred while loading `/home/prayag/.emacs.d/init.el':
File error: Cannot open load file, project-mode
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the `--debug-init' option to view a complete error backtrace.
On starting emacs23 --debug-init, following error is thrown.
Debugger entered--Lisp error: (file-error "Cannot open load file" "project-mode")
require(project-mode)
eval-buffer(#<buffer *load*<2>> nil "/usr/share/emacs/23.3/site-lisp/grails-mode.el" nil t) ; Reading at buffer position 422
load-with-code-conversion("/usr/share/emacs/23.3/site-lisp/grails-mode.el" "/usr/share/emacs/23.3/site-lisp/grails-mode.el" nil t)
require(grails-mode)
eval-buffer(#<buffer *load*> nil "/home/prayag/.emacs.d/init.el" nil t) ; Reading at buffer position 23
load-with-code-conversion("/home/prayag/.emacs.d/init.el" "/home/prayag/.emacs.d/init.el" t t)
load("/home/prayag/.emacs.d/init" t t)
#[nil "\205\264
grails-mode requires project-mode as mentioned on the emacs-grails-mode page. So, you'll also need to install project-mode.
Also grab the remaining groovy packages(all but grails-mode) from here.
emacs-grails-mode-ext is a modest contribution to grails-mode allowing you to run Grails commands directly from emacs. For a given project(project-mode), you can run Grails commands such as create-domain-class, create-service, etc.
I also use the function ido-find-file-in-tag-files from here, I bind it to C-x C-M-f .
Simple guide with emacs-grails-mode:
Create a project from the command line or eshell -> grails create-app yourapp
Using dired, go to your Grails project folder
M-x project-new -> to create a new project(project-mode)
M-x project-save -> Save the project
M-x project-load-and-select -> Your project-name as argument
There's also a Grails menu if you use the menubar
You could also use my current emacs setup here, if you have emacs24 installed. I believe that it's available for Ubuntu 12.04, but I'm not sure. I usually build emacs from source on OSX or I use emacs-snapshot in Ubuntu.
Hope this helps.
I don't know Grail-mode at all. I've just clicked your link, and they state that project-mode is a dependency:
Dependencies:
project-mode is the only dependency.
As a consequence you will also have to install it. Link to the Emacs project code.
I am hoping for you this project does not have additional dependencies...
As a side note: later, try to install the last emacs (v24) which embeds a very convenient way to deal with package installation and dealing with packages dependencies. I've just check it out, it is present on an alternative (but very know) repository: Marmalade-repo.org.

Resources