Skip to content

Commit

Permalink
feat(e2e_samples): add initial version of Fabric DataOps E2E sample
Browse files Browse the repository at this point in the history
The sample performs IaC deployment using Terraform. It deploys both
Azure and Fabric resources.

The main README.md describes the high-level architecture and has detailed
deployment steps.

Refs: #815

---------

Co-authored-by: Anuj Parashar <promisinganuj@gmail.com>
Co-authored-by: Elena Terenzi <elenaterenzi@hotmail.com>
Co-authored-by: Naga Nandyala <naga.s.p.nandyala@gmail.com>
Co-authored-by: Lace Lofranco <lace.lofranco@gmail.com>
  • Loading branch information
4 people authored Dec 11, 2024
1 parent 894d45b commit 8d04003
Show file tree
Hide file tree
Showing 155 changed files with 7,242 additions and 194 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ about: General issue template
title: '[FEATURE NAME]'
labels: ''
assignees: ''
---
---
34 changes: 17 additions & 17 deletions .github/workflows/bicep-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: Validate AZD template
on:
push:
branches:
- main
- main
paths:
- "infra/**"
- "infra/**"
pull_request:
branches:
- main
- main
paths:
- "infra/**"
- "infra/**"
workflow_dispatch:

jobs:
Expand All @@ -18,18 +18,18 @@ jobs:
permissions:
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Run Microsoft Security DevOps Analysis
uses: microsoft/security-devops-action@preview
id: msdo
continue-on-error: true
with:
tools: templateanalyzer
- name: Run Microsoft Security DevOps Analysis
uses: microsoft/security-devops-action@preview
id: msdo
continue-on-error: true
with:
tools: templateanalyzer

- name: Upload alerts to Security tab
uses: github/codeql-action/upload-sarif@v3
if: github.repository_owner == 'Azure-Samples'
with:
sarif_file: ${{ steps.msdo.outputs.sarifFile }}
- name: Upload alerts to Security tab
uses: github/codeql-action/upload-sarif@v3
if: github.repository_owner == 'Azure-Samples'
with:
sarif_file: ${{ steps.msdo.outputs.sarifFile }}
24 changes: 24 additions & 0 deletions .github/workflows/broken-hyperlinks-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Broken Hyperlinks Check
on:
push:
branches:
- main
pull_request:
branches:
- '**'

jobs:
check-links:
name: linkspector
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Run linkspector
uses: umbrelladocs/action-linkspector@v1
with:
reporter: github-pr-review
fail_on_error: true
config_file: '.linkspector.yml'
55 changes: 55 additions & 0 deletions .github/workflows/code_quality_checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Formatting, Linting & Other Pre-Commit Checks

on:
push:
branches:
- main
pull_request:
branches:
- '**'

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [
3.11.x
]

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[ci]
- name: Install Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: latest

- name: Install TFLint
run: |
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
- name: Install Trivy
run: |
sudo apt-get install -y wget apt-transport-https gnupg lsb-release
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
echo "deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main" | sudo tee -a /etc/apt/sources.list.d/trivy.list
sudo apt-get update
sudo apt-get install -y trivy
- name: Analyze Code Quality via pre-commit checks.
run: pre-commit run --all-files
13 changes: 6 additions & 7 deletions .github/workflows/credscan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ name: Custom Cred Scan
on:
push:
branches:
- main
- single-tech/databricks
- '**'

jobs:
pattern_match_with_secrets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- shell: bash
env:
SECRET: ${{ secrets.ExcludeList }}
run: (( $(grep -riE $SECRET . | wc -l) == 0 ))
- uses: actions/checkout@v2
- shell: bash
env:
SECRET: ${{ secrets.ExcludeList }}
run: (( $(grep -riE $SECRET . | wc -l) == 0 ))
32 changes: 0 additions & 32 deletions .github/workflows/documentation.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/yaml.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ MigrationBackup/

.terraform
.terraform.lock.hcl
plan.tfplan
terraform.tfstate
terraform.tfstate.backup

Expand Down
2 changes: 1 addition & 1 deletion .markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ MD024: false
MD037: false
MD033:
allowed_elements:
- "br"
- "br"
107 changes: 93 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,94 @@
exclude: |
(?x) (
archive/|
single_tech_samples/|
e2e_samples/parking_sensors/
)
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.45.0
hooks:
- id: terraform_fmt
- id: terraform_tflint
- id: terraform_tfsec

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-yaml
- id: no-commit-to-branch
# General checks for style
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: no-commit-to-branch
args: [--branch, main]
- id: check-merge-conflict
- id: trailing-whitespace
- id: check-ast
- id: check-json
- id: detect-private-key
- id: debug-statements
- id: end-of-file-fixer
- id: check-toml
- id: check-yaml
args: ["--unsafe"]
- id: mixed-line-ending
exclude: \.(drawio|drawio\.svg)$
args: [--fix=lf]
- id: check-added-large-files
args: [--maxkb=1024]

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--float-to-top"]
name: isort (sorting imports)

- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
# args: [--check]
name: black (formatting python code)

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.3
hooks:
- id: ruff
args: [--fix]
name: ruff (linting python code)

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
name: mypy (static type checker for Python)
additional_dependencies:
- types-requests
- types-PyYAML

- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
args: [--strict, -c=./.yamllint.yaml]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
hooks:
- id: markdownlint
args: [--config, ./.markdownlint.yml]

# nbQA is a tool to run all the other tools on Jupyter Notebooks
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.1
hooks:
- id: nbqa-isort
# args: ["--float-to-top"] # to prevent all imports to go to the top
- id: nbqa-black
- id: nbqa-ruff
args: ["--fix"]
- id: nbqa-mypy

- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.96.2
hooks:
- id: terraform_fmt
- id: terraform_tflint
- id: terraform_validate
- id: terraform_trivy
args:
- --hook-config=--parallelism-limit=1
- --args=--severity=HIGH,MEDIUM
- --args=--skip-dirs="**/.terraform"
11 changes: 11 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extends: default

rules:
line-length:
disable # Disable line length check
document-start:
disable # Disable document start check
comments-indentation:
disable
truthy:
disable
18 changes: 9 additions & 9 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Microsoft Open Source Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).

Resources:

- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
# Microsoft Open Source Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).

Resources:

- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The following is a set of guidelines to contributing to the DataOps repo.
- [Contributing to an existing sample](#contributing-to-an-existing-sample)
- [Labels](#labels)
- [Branching structure](#branching-structure)
- [Code Quality Checks](#code-quality-checks)
- [Contributor License Agreement (CLA)](#contributor-license-agreement-cla)

## Code of Conduct
Expand Down Expand Up @@ -123,6 +124,12 @@ Developers can also choose to fork the repo and work off that. Make sure to subm

Please delete the source branches after merging the content. Stale branches (no commits in last 120 days) may be deleted without prior notice.

## Code Quality Checks

All code changes go through a set of automated checks to ensure consistency, code quality, and adherence to repository standards before they are merged.

Please refer to the [Pre-commit Guide](./docs/pre_commit_guide.md) to learn about the various pre-commit checks applied to the code.

## Contributor License Agreement (CLA)

Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [https://cla.opensource.microsoft.com](https://cla.opensource.microsoft.com).
Expand Down
Loading

0 comments on commit 8d04003

Please sign in to comment.