jan_soubusta
01/05/2023, 12:57 PMTAP_GITHUB_ACCESS_TOKEN
is not correctly propagated into a running container.
Trying to investigate it, but cannot override the entry point to e.g. bash to find out what is happening inside.
Cannot find the source code of your Dockefile, from which you build your meltano/meltano image.
Please, send the source code or guide me how to override the entry point.prakhar_srivastava
01/05/2023, 1:09 PMprakhar_srivastava
01/05/2023, 1:11 PMjan_soubusta
01/05/2023, 1:22 PMdocker run meltano /bin/sh
, resp. I need to test this with docker-compose, where I declare the variable in docker-compose.yaml
and need to login into the container executing a shell and validate that the variable is set properlyjan_soubusta
01/05/2023, 1:23 PMextract_load_1 | 2023-01-05T12:46:00.638363Z [info ] singer_sdk.exceptions.RetriableAPIError: 401 Client Error: b'{"message":"This endpoint requires you to be authenticated.","documentation_url":"<https://docs.github.com/graphql/guides/forming-calls-with-graphql#authenticating-with-graphql>"}' (Reason: Unauthorized) for path: /graphql cmd_type=elb consumer=False name=tap-github-repo producer=True stdio=stderr string_id=tap-github-repo
extract_load_1 | 2023-01-05T12:46:00.809613Z [error ] Extractor failed
jan_soubusta
01/05/2023, 1:23 PMSven Balnojan
01/05/2023, 1:24 PMjan_soubusta
01/05/2023, 1:26 PMmeltano
, it does not work.
I tried to override the entry point like this:
ENTRYPOINT ["bash", "-c"]
Rebuilt the image and ran:
docker-compose exec -it extract_load ls -la /
Zero outputSven Balnojan
01/05/2023, 1:27 PMSven Balnojan
01/05/2023, 1:28 PMjan_soubusta
01/05/2023, 1:29 PM(.venv) jacek@holly:~/work/src/gooddata-data-pipeline$ docker run --entrypoint /bin/sh meltano/meltano ls -la
/bin/sh: 0: cannot open ls: No such file
jan_soubusta
01/05/2023, 1:29 PMjan_soubusta
01/05/2023, 1:29 PMjan_soubusta
01/05/2023, 1:29 PM(.venv) jacek@holly:~/work/src/gooddata-data-pipeline$ docker run --entrypoint /bin/sh meltano/meltano /bin/ls /
/bin/ls: 1: Syntax error: ")" unexpected
Sven Balnojan
01/05/2023, 1:32 PMjan_soubusta
01/05/2023, 1:36 PMSven Balnojan
01/05/2023, 1:36 PMSven Balnojan
01/05/2023, 1:37 PMjan_soubusta
01/05/2023, 1:41 PMextract_load:
build:
context: src
dockerfile: Dockerfile_meltano
entrypoint:
- bash
- -c
command:
- "echo $TAP_GITHUB_ACCESS_TOKEN: $$TAP_GITHUB_ACCESS_TOKEN"
The variable is set correctly.
What could cause the 401 unauthorized error when this variable is set?jan_soubusta
01/05/2023, 1:42 PMpat_nadolny
01/05/2023, 1:43 PMjan_soubusta
01/05/2023, 1:52 PMextract_load:
build:
context: src
dockerfile: Dockerfile_meltano
command:
- run
- tap-github-repo
- target-postgres
- tap-github-org
- target-postgres
environment:
POSTGRES_HOST: gooddata-cn-ce
POSTGRES_PORT: 5432
POSTGRES_USER: demouser
POSTGRES_PASS: demopass
POSTGRES_DBNAME: demo
POSTGRES_INPUT_SCHEMA: cicd_input_stage2
MELTANO_DATABASE_URI: "<postgresql://demouser:demopass@gooddata-cn-ce:5432/demo?options=-csearch_path%3Dmeltano>"
TAP_GITHUB_ACCESS_TOKEN: "xxxxxxxxxxxxxxxxxxx"
jan_soubusta
01/05/2023, 1:53 PMjan_soubusta
01/05/2023, 1:53 PMARG MELTANO_IMAGE=meltano/meltano:v2.12.0-python3.10
FROM $MELTANO_IMAGE
WORKDIR /project
# Copy over Meltano project directory
COPY meltano.yml meltano.yml
RUN meltano install
# Don't allow changes to containerized project files
ENV MELTANO_PROJECT_READONLY 1
# Expose default port used by `meltano ui`
EXPOSE 5000
ENTRYPOINT ["meltano"]
jan_soubusta
01/05/2023, 1:55 PMSven Balnojan
01/05/2023, 2:17 PMSven Balnojan
01/05/2023, 2:19 PMjan_soubusta
01/05/2023, 2:29 PMSven Balnojan
01/05/2023, 2:30 PMSven Balnojan
01/05/2023, 2:48 PMjan_soubusta
01/05/2023, 5:01 PMSven Balnojan
01/06/2023, 7:15 AM