2022-01-23 18:47:06 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								.DEFAULT_GOAL := help
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:48:42 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								PY_SOURCE ?= ingestion/src
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-30 18:23:47 +11:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								include ingestion/Makefile
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-01 14:27:44 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-23 18:47:06 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								.PHONY: help
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								help:
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 07:10:37 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":"}; {printf "\033[35m%-35s\033[0m %s\n", $$2, $$3}'
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-23 18:47:06 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-05 07:04:40 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								.PHONY: prerequisites
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								prerequisites:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									./scripts/check_prerequisites.sh
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-19 14:44:36 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								.PHONY: install_e2e_tests
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								install_e2e_tests:  ## Install the ingestion module with e2e test dependencies (playwright)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									python -m pip install "ingestion[e2e_test]/"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									playwright install --with-deps
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: run_e2e_tests
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								run_e2e_tests: ## Run e2e tests
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-25 20:47:51 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									pytest --screenshot=only-on-failure --output="ingestion/tests/e2e/artifacts" $(ARGS) --slowmo 5 --junitxml=ingestion/junit/test-results-e2e.xml ingestion/tests/e2e
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-19 14:44:36 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-23 18:47:06 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								## Yarn
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: yarn_install_cache
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								yarn_install_cache:  ## Use Yarn to install UI dependencies
							 | 
						
					
						
							
								
									
										
										
										
											2021-12-28 23:16:52 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									cd openmetadata-ui/src/main/resources/ui && yarn install --frozen-lockfile
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-23 18:47:06 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								.PHONY: yarn_start_dev_ui
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								yarn_start_dev_ui:  ## Run the UI locally with Yarn
							 | 
						
					
						
							
								
									
										
										
										
											2021-12-28 23:16:52 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									cd openmetadata-ui/src/main/resources/ui && yarn start
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-23 18:47:06 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-08 14:04:57 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								.PHONY: yarn_start_e2e
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								yarn_start_e2e:  ## Run the e2e tests locally with Yarn
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									cd openmetadata-ui/src/main/resources/ui && yarn playwright:run
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: yarn_start_e2e_ui
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								yarn_start_e2e_ui:  ## Run the e2e tests locally in UI mode with Yarn
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									cd openmetadata-ui/src/main/resources/ui && yarn playwright:open
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: yarn_start_e2e_codegen
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								yarn_start_e2e_codegen:  ## generate playwright code
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									cd openmetadata-ui/src/main/resources/ui && yarn playwright:codegen
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2022-05-23 09:51:34 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								.PHONY: py_antlr
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								py_antlr:  ## Generate the Python code for parsing FQNs
							 | 
						
					
						
							
								
									
										
										
										
											2022-09-14 23:14:02 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									antlr4 -Dlanguage=Python3 -o ingestion/src/metadata/generated/antlr ${PWD}/openmetadata-spec/src/main/antlr4/org/openmetadata/schema/*.g4
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-18 18:32:28 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: js_antlr
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								js_antlr:  ## Generate the Python code for parsing FQNs
							 | 
						
					
						
							
								
									
										
										
										
											2022-09-14 23:14:02 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									antlr4 -Dlanguage=JavaScript -o openmetadata-ui/src/main/resources/ui/src/generated/antlr ${PWD}/openmetadata-spec/src/main/antlr4/org/openmetadata/schema/*.g4
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-18 18:32:28 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-30 18:23:47 +11:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								## Ingestion models generation
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: generate
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								generate:  ## Generate the pydantic models from the JSON Schemas to the ingestion module
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@echo "Running Datamodel Code Generator"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@echo "Make sure to first run the install_dev recipe"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rm -rf ingestion/src/metadata/generated
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									mkdir -p ingestion/src/metadata/generated
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									python scripts/datamodel_generation.py
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(MAKE) py_antlr js_antlr
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(MAKE) install
							 | 
						
					
						
							
								
									
										
										
										
											2022-05-23 09:51:34 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: install_antlr_cli
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								install_antlr_cli:  ## Install antlr CLI locally
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									echo '#!/usr/bin/java -jar' > /usr/local/bin/antlr4
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									curl https://www.antlr.org/download/antlr-4.9.2-complete.jar >> /usr/local/bin/antlr4
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									chmod 755 /usr/local/bin/antlr4
							 | 
						
					
						
							
								
									
										
										
										
											2022-06-27 15:14:04 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-28 23:06:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								## SNYK
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								SNYK_ARGS := --severity-threshold=high
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: snyk-ingestion-report
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								snyk-ingestion-report:  ## Uses Snyk CLI to validate the ingestion code and container. Don't stop the execution
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@echo "Validating Ingestion container..."
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-23 11:42:20 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									docker build -t openmetadata-ingestion:scan -f ingestion/Dockerfile.ci .
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									snyk container test openmetadata-ingestion:scan --file=ingestion/Dockerfile.ci $(SNYK_ARGS) --json > security-report/ingestion-docker-scan.json | true;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-28 23:06:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@echo "Validating ALL ingestion dependencies. Make sure the venv is activated."
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									cd ingestion; \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										pip freeze > scan-requirements.txt; \
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-09 21:54:08 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										snyk test --file=scan-requirements.txt --package-manager=pip --command=python3 $(SNYK_ARGS) --json > ../security-report/ingestion-dep-scan.json | true; \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										snyk code test $(SNYK_ARGS) --json > ../security-report/ingestion-code-scan.json | true;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-28 23:06:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: snyk-airflow-apis-report
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								snyk-airflow-apis-report:  ## Uses Snyk CLI to validate the airflow apis code. Don't stop the execution
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@echo "Validating airflow dependencies. Make sure the venv is activated."
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									cd openmetadata-airflow-apis; \
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-09 21:54:08 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    	snyk code test $(SNYK_ARGS) --json > ../security-report/airflow-apis-code-scan.json | true;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-28 23:06:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: snyk-catalog-report
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								snyk-server-report:  ## Uses Snyk CLI to validate the catalog code and container. Don't stop the execution
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@echo "Validating catalog container... Make sure the code is built and available under openmetadata-dist"
							 | 
						
					
						
							
								
									
										
										
										
											2023-03-06 08:58:53 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									docker build -t openmetadata-server:scan -f docker/development/Dockerfile .
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									snyk container test openmetadata-server:scan --file=docker/development/Dockerfile $(SNYK_ARGS) --json > security-report/server-docker-scan.json | true;
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-09 21:54:08 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									snyk test --all-projects $(SNYK_ARGS) --json > security-report/server-dep-scan.json | true;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									snyk code test --all-projects --severity-threshold=high --json > security-report/server-code-scan.json | true;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-28 23:06:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: snyk-ui-report
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								snyk-ui-report:  ## Uses Snyk CLI to validate the UI dependencies. Don't stop the execution
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-09 21:54:08 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									snyk test --file=openmetadata-ui/src/main/resources/ui/yarn.lock $(SNYK_ARGS) --json > security-report/ui-dep-scan.json | true;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-28 23:06:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: snyk-dependencies-report
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-29 13:08:12 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								snyk-dependencies-report:  ## Uses Snyk CLI to validate the project dependencies: MySQL, Postgres and ES. Only local testing.
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-28 23:06:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@echo "Validating dependencies images..."
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-09 21:54:08 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									snyk container test mysql/mysql-server:latest $(SNYK_ARGS) --json > security-report/mysql-scan.json | true;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									snyk container test postgres:latest $(SNYK_ARGS) --json > security-report/postgres-scan.json | true;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									snyk container test docker.elastic.co/elasticsearch/elasticsearch:7.10.2 $(SNYK_ARGS) --json > security-report/es-scan.json | true;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-28 23:06:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-01-19 12:38:02 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								.PHONY: snyk-ingestion-base-slim-report
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								snyk-ingestion-base-slim-report:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@echo "Validating Ingestion Slim Container"
							 | 
						
					
						
							
								
									
										
										
										
											2024-01-19 16:12:57 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									docker build -t openmetadata-ingestion-base-slim:scan -f ingestion/operators/docker/Dockerfile.ci --build-arg INGESTION_DEPENDENCY=slim .
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									snyk container test openmetadata-ingestion-base-slim:scan --file=ingestion/operators/docker/Dockerfile.ci $(SNYK_ARGS) --json > security-report/ingestion-docker-base-slim-scan.json | true;
							 | 
						
					
						
							
								
									
										
										
										
											2024-01-19 12:38:02 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-28 23:06:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								.PHONY: snyk-report
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								snyk-report:  ## Uses Snyk CLI to run a security scan of the different pieces of the code
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@echo "To run this locally, make sure to install and authenticate using the Snyk CLI: https://docs.snyk.io/snyk-cli/install-the-snyk-cli"
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-09 21:54:08 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									rm -rf security-report
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									mkdir -p security-report
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-28 23:06:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(MAKE) snyk-ingestion-report
							 | 
						
					
						
							
								
									
										
										
										
											2024-01-19 12:38:02 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(MAKE) snyk-ingestion-base-slim-report
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-28 23:06:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(MAKE) snyk-airflow-apis-report
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(MAKE) snyk-server-report
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(MAKE) snyk-ui-report
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-02 17:10:35 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(MAKE)	export-snyk-pdf-report
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-28 23:06:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-02 17:10:35 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								.PHONY: export-snyk-pdf-report
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								export-snyk-pdf-report:  ## export json file from security-report/ to HTML
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-28 23:06:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@echo "Reading all results"
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-09 21:54:08 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									npm install snyk-to-html -g
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									ls security-report | xargs -I % snyk-to-html -i security-report/% -o security-report/%.html
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-02 17:10:35 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									pip install pdfkit
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									pip install PyPDF2
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									python scripts/html_to_pdf.py
							 | 
						
					
						
							
								
									
										
										
										
											2022-10-11 07:50:49 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Ingestion Operators
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: build-ingestion-base-local
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								build-ingestion-base-local:  ## Builds the ingestion DEV docker operator with the local ingestion files
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(MAKE) install_dev generate
							 | 
						
					
						
							
								
									
										
										
										
											2024-01-19 14:18:07 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									docker build -f ingestion/operators/docker/Dockerfile.ci . -t openmetadata/ingestion-base:local
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: build-ingestion-base-slim-local
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								build-ingestion-base-local:  ## Builds the ingestion DEV docker operator with the local ingestion files
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(MAKE) install_dev generate
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									docker build -f ingestion/operators/docker/Dockerfile.ci . -t openmetadata/ingestion-base-slim:local --build-arg INGESTION_DEPENDENCY=slim
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-11 13:29:51 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-10 11:40:30 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#Upgrade release automation scripts below
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-13 11:40:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								.PHONY: update_all
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-10 11:40:30 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								update_all:  ## To update all the release related files run make update_all RELEASE_VERSION=2.2.2
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-13 11:40:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@echo "The release version is: $(RELEASE_VERSION)" ; \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(MAKE) update_maven ; \
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-10 11:40:30 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(MAKE) update_pyproject_version ; \
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-13 11:40:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(MAKE) update_dockerfile_version ; \
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-10 11:40:30 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(MAKE) update_dockerfile_ri_version ; \
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-13 11:40:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#remove comment and use the below section when want to use this sub module "update_all" independently to update github actions
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-10 11:40:30 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#make update_all RELEASE_VERSION=2.2.2
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-13 11:40:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: update_maven
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 07:10:37 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								update_maven:  ## To update the common and pom.xml maven version
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-10 11:40:30 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@echo "Updating Maven projects to version $(RELEASE_VERSION)..."; \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									mvn versions:set -DnewVersion=$(RELEASE_VERSION)
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-13 11:40:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#remove comment and use the below section when want to use this sub module "update_maven" independently to update github actions
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#make update_maven RELEASE_VERSION=2.2.2
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-10 11:40:30 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								.PHONY: update_pyproject_version
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								update_pyproject_version:  ## To update the pyproject.toml files
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-05 23:45:21 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									file_paths="ingestion/pyproject.toml \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												openmetadata-airflow-apis/pyproject.toml"; \
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-10 11:40:30 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									echo "Updating pyproject.toml versions to $(RELEASE_VERSION)... "; \
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-13 11:40:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									for file_path in $$file_paths; do \
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-10 11:40:30 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									    python3 scripts/update_version.py update_pyproject_version -f $$file_path -v $(RELEASE_VERSION) ; \
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-13 11:40:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									done
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-10 11:40:30 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# Commented section for independent usage of the module update_pyproject_version independently to update github actions
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#make update_pyproject_version RELEASE_VERSION=2.2.2
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-13 11:40:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: update_dockerfile_version
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 07:10:37 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								update_dockerfile_version:  ## To update the dockerfiles version
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-17 11:33:47 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@file_paths="docker/docker-compose-ingestion/docker-compose-ingestion.yml \
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-13 11:40:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										     docker/docker-compose-openmetadata/docker-compose-openmetadata.yml \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										     docker/docker-compose-quickstart/docker-compose-postgres.yml \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										     docker/docker-compose-quickstart/docker-compose.yml"; \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									echo "Updating docker github action release version to $(RELEASE_VERSION)... "; \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									for file_path in $$file_paths; do \
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-10 11:40:30 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									    python3 scripts/update_version.py update_docker_tag -f $$file_path -t $(RELEASE_VERSION) ; \
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-13 11:40:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									done
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#remove comment and use the below section when want to use this sub module "update_dockerfile_version" independently to update github actions
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#make update_dockerfile_version RELEASE_VERSION=2.2.2
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-10 11:40:30 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								.PHONY: update_dockerfile_ri_version
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								update_dockerfile_ri_version:  ## To update the dockerfile RI_VERSION argument
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-13 11:40:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@file_paths="ingestion/Dockerfile \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									             ingestion/operators/docker/Dockerfile"; \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									echo "Updating ingestion dockerfile release version to $(PY_RELEASE_VERSION)... "; \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									for file_path in $$file_paths; do \
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-10 11:40:30 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									    python3 scripts/update_version.py update_ri_version -f $$file_path -v $(RELEASE_VERSION) --with-python-version ; \
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-13 11:40:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									done
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-10 11:40:30 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									python3 scripts/update_version.py update_ri_version -f docker/docker-compose-quickstart/Dockerfile -v $(RELEASE_VERSION)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#remove comment and use the below section when want to use this sub module "update_dockerfile_ri_version" independently to update github actions
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#make update_dockerfile_ri_version RELEASE_VERSION=2.2.2
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-13 11:40:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#Upgrade release automation scripts above
							 | 
						
					
						
							
								
									
										
										
										
											2025-08-03 21:15:51 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: update_typescript_types
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								update_typescript_types:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@echo "Generating JSON to TS files"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									./openmetadata-ui/src/main/resources/ui/json2ts-generate-all.sh -l true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@echo "Generating antlr typescript files"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(MAKE) js_antlr
							 |