Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(schematic): fds 828 merge main into feature branch #2465

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e82e87f
feat(schematic): integration testing (#2398)
andrewelamb Dec 8, 2023
454f220
Update schematic-api-ci.yml
andrewelamb Dec 8, 2023
6d93bd9
Update schematic-api-ci.yml
andrewelamb Dec 8, 2023
6167b61
Update schematic-api-ci.yml
andrewelamb Dec 8, 2023
fa0a365
Update schematic-api-ci.yml
andrewelamb Dec 8, 2023
f21ac45
Update schematic-api-ci.yml
andrewelamb Dec 11, 2023
0b3f4ae
Update schematic-api-ci.yml
andrewelamb Dec 11, 2023
82ecb41
Update schematic-api-ci.yml
andrewelamb Dec 11, 2023
09c8415
Update schematic-api-ci.yml
andrewelamb Dec 11, 2023
4cd4cec
add paging, and split connected noeds into two endpoints
andrewelamb Jan 2, 2024
1c5917b
paginated preoject datasets query
andrewelamb Jan 3, 2024
00bd798
paginated preoject datasets query
andrewelamb Jan 3, 2024
9879df6
paginated dataset files endpoint
andrewelamb Jan 3, 2024
ba85d96
pagniate project manifests endpoint
andrewelamb Jan 3, 2024
a27b679
paginate get node dependencies
andrewelamb Jan 3, 2024
e709fa6
paginate get node dependencies
andrewelamb Jan 3, 2024
48578b4
paginate node properties endpoint
andrewelamb Jan 3, 2024
00b32bb
paginate validation rules endpoint
andrewelamb Jan 3, 2024
15ee507
paginate get projects endpoint
andrewelamb Jan 3, 2024
3df7ee0
handle merge conflict
andrewelamb Jan 3, 2024
90ad971
update schematic and other packages
andrewelamb Jan 5, 2024
f9b18b1
remove uneeded type ignores
andrewelamb Jan 5, 2024
d0ff913
added generate manifest endpoints
andrewelamb Jan 8, 2024
4dbd035
temp commit
andrewelamb Jan 17, 2024
97ae847
handle merge conflict
andrewelamb Jan 17, 2024
436f7b0
delete manifest file
andrewelamb Jan 17, 2024
e72c8a6
add generate manifest endpoint
andrewelamb Jan 17, 2024
28513cc
Merge branch 'main' into feat-fds-828-generate-endpoint
andrewelamb Jan 19, 2024
81bfc6d
fix broken tests
andrewelamb Jan 19, 2024
83a068a
ci(sage-monorepo): create a GH composite action to setup the dev cont…
tschaffter Jan 23, 2024
8329b03
Temporarily comment out sonar scan for pushes to main (#2443)
tschaffter Jan 24, 2024
42d2baa
Touch one file (#2444)
tschaffter Jan 24, 2024
8b8d0d0
Restore sonar scan in CI workflow (#2446)
tschaffter Jan 24, 2024
6d102b8
Undo openchallenges-app touch (#2447)
tschaffter Jan 24, 2024
c747a3a
Add name when running `.github/actions/setup-dev-container` (#2451)
tschaffter Jan 24, 2024
0781807
ci(sage-monorepo): experiment with `pull_request_target` (#2453)
tschaffter Jan 25, 2024
71fcf75
ci(sage-monorepo): try sonar scan trigger (#2454)
tschaffter Jan 25, 2024
cf36874
ci(sage-monorepo): test sonar scan from PR from fork (#2455)
tschaffter Jan 25, 2024
37e8647
ci(sage-monorepo): try new sonar scan workflow for PRs (#2456)
tschaffter Jan 25, 2024
78cb3b3
ci(sage-monorepo): try sonar scan workflow triggered by fork PR (#2457)
tschaffter Jan 25, 2024
19352e8
ci(sage-monorepo): parametrize sonar scanner tool (#2458)
tschaffter Jan 25, 2024
34d3b2e
ci(sage-monorepo): fix how env vars are passed to the dev container (…
tschaffter Jan 26, 2024
80bd375
ci(sage-monorepo): try sonar scan again for PRs originating from fork…
tschaffter Jan 26, 2024
40c13c0
ci(sage-monorepo): test Sonar workflow with label-based approval (#2461)
tschaffter Jan 26, 2024
a82867c
Touch two oc projects (#2462)
tschaffter Jan 26, 2024
8f736ac
Merge branch 'main' into feat-fds-828-generate-endpoint
andrewelamb Jan 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 44 additions & 12 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "Sage Dev Container",
"image": "ghcr.io/sage-bionetworks/sage-devcontainer:be08406",

"containerEnv": {
"NX_BASE": "${localEnv:NX_BASE}",
"NX_BRANCH": "${localEnv:NX_BRANCH}",
Expand All @@ -11,20 +10,21 @@
"NX_HEAD": "${localEnv:NX_HEAD}",
"NX_RUN_GROUP": "${localEnv:NX_RUN_GROUP}",
"SONAR_TOKEN": "${localEnv:SONAR_TOKEN}",
"SONAR_PULL_REQUEST_NUMBER": "${localEnv:SONAR_PULL_REQUEST_NUMBER}",
"DOCKER_USERNAME": "${localEnv:DOCKER_USERNAME}",
"DOCKER_PASSWORD": "${localEnv:DOCKER_PASSWORD}"
},

"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2.4.0": {
"version": "24.0.5",
"moby": false
}
},

"customizations": {
"codespaces": {
"openFiles": ["README.md"]
"openFiles": [
"README.md"
]
},
"vscode": {
"extensions": [
Expand Down Expand Up @@ -66,13 +66,43 @@
}
}
},

"forwardPorts": [
2432, 3000, 3306, 4200, 4211, 5017, 5200, 5432, 5601, 7010, 7080, 7200, 7888, 8010, 8071, 8000,
8080, 8081, 8082, 8083, 8084, 8085, 8086, 8090, 8091, 8092, 8200, 8787, 8888, 8889, 9090, 9104,
9200, 9411, 27017
2432,
3000,
3306,
4200,
4211,
5017,
5200,
5432,
5601,
7010,
7080,
7200,
7888,
8010,
8071,
8000,
8080,
8081,
8082,
8083,
8084,
8085,
8086,
8090,
8091,
8092,
8200,
8787,
8888,
8889,
9090,
9104,
9200,
9411,
27017
],

"portsAttributes": {
"2432": {
"label": "itlas-postgres",
Expand Down Expand Up @@ -219,8 +249,10 @@
"onAutoForward": "silent"
}
},

"remoteUser": "vscode",
"shutdownAction": "stopContainer",
"runArgs": ["--name", "sage_devcontainer"]
}
"runArgs": [
"--name",
"sage_devcontainer"
]
}
80 changes: 80 additions & 0 deletions .github/actions/setup-dev-container/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: 'Set up the dev container'
description: 'Installs the dev container CLI, fetches caches (if exist), and starts the dev container'
runs:
using: 'composite'
steps:
- name: Set up Yarn cache
uses: actions/cache@v3
with:
path: '/tmp/.yarn/cache'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Set up Renv cache
uses: actions/cache@v3
with:
path: '/tmp/.cache/R/renv/cache'
key: ${{ runner.os }}-renv-cache-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-cache-

- name: Set up Poetry cache
uses: actions/cache@v3
with:
path: '/tmp/.cache/pypoetry'
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}

- name: Set up venv cache
uses: actions/cache@v3
with:
path: |
/tmp/.local/share/virtualenv
**/.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}

- name: Set up Gradle cache
uses: actions/cache@v3
with:
path: |
/tmp/.gradle/caches
/tmp/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Install the Dev Container CLI
shell: bash
run: npm install -g @devcontainers/[email protected]

- name: Start the dev container
shell: bash
run: |
mkdir -p \
/tmp/.yarn/cache \
/tmp/.cache/R/renv/cache \
/tmp/.cache/pypoetry \
/tmp/.local/share/virtualenv \
/tmp/.gradle/caches \
/tmp/.gradle/wrapper

devcontainer up \
--mount type=bind,source=/tmp/.yarn/cache,target=/workspaces/sage-monorepo/.yarn/cache \
--mount type=bind,source=/tmp/.cache/R/renv/cache,target=/home/vscode/.cache/R/renv/cache \
--mount type=bind,source=/tmp/.cache/pypoetry,target=/home/vscode/.cache/pypoetry \
--mount type=bind,source=/tmp/.local/share/virtualenv,target=/home/vscode/.local/share/virtualenv \
--mount type=bind,source=/tmp/.gradle/caches,target=/home/vscode/.gradle/caches \
--mount type=bind,source=/tmp/.gradle/wrapper,target=/home/vscode/.gradle/wrapper \
--workspace-folder ../sage-monorepo

- name: Prepare the workspace
shell: bash
run: |
devcontainer exec --workspace-folder ../sage-monorepo bash -c "
sudo chown -R vscode:vscode \
/workspaces/sage-monorepo \
/home/vscode/.cache \
/home/vscode/.local \
/home/vscode/.gradle \
&& . ./dev-env.sh \
&& workspace-install-affected"
158 changes: 9 additions & 149 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
NX_CLOUD_ENCRYPTION_KEY: ${{ secrets.NX_CLOUD_ENCRYPTION_KEY }}
NX_CLOUD_ENV_NAME: 'linux'
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
DOCKER_USERNAME: ${{ github.actor }}
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -31,78 +31,8 @@ jobs:
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v3

- name: Set up Yarn cache
uses: actions/cache@v3
with:
path: '/tmp/.yarn/cache'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Set up Renv cache
uses: actions/cache@v3
with:
path: '/tmp/.cache/R/renv/cache'
key: ${{ runner.os }}-renv-cache-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-cache-

- name: Set up Poetry cache
uses: actions/cache@v3
with:
path: '/tmp/.cache/pypoetry'
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}

- name: Set up venv cache
uses: actions/cache@v3
with:
path: |
/tmp/.local/share/virtualenv
**/.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}

- name: Set up Gradle cache
uses: actions/cache@v3
with:
path: |
/tmp/.gradle/caches
/tmp/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Install the Dev Container CLI
run: npm install -g @devcontainers/[email protected]

- name: Start the dev container
run: |
mkdir -p \
/tmp/.yarn/cache \
/tmp/.cache/R/renv/cache \
/tmp/.cache/pypoetry \
/tmp/.local/share/virtualenv \
/tmp/.gradle/caches \
/tmp/.gradle/wrapper

devcontainer up \
--mount type=bind,source=/tmp/.yarn/cache,target=/workspaces/sage-monorepo/.yarn/cache \
--mount type=bind,source=/tmp/.cache/R/renv/cache,target=/home/vscode/.cache/R/renv/cache \
--mount type=bind,source=/tmp/.cache/pypoetry,target=/home/vscode/.cache/pypoetry \
--mount type=bind,source=/tmp/.local/share/virtualenv,target=/home/vscode/.local/share/virtualenv \
--mount type=bind,source=/tmp/.gradle/caches,target=/home/vscode/.gradle/caches \
--mount type=bind,source=/tmp/.gradle/wrapper,target=/home/vscode/.gradle/wrapper \
--workspace-folder ../sage-monorepo

- name: Prepare the workspace
run: |
devcontainer exec --workspace-folder ../sage-monorepo bash -c "
sudo chown -R vscode:vscode \
/workspaces/sage-monorepo \
/home/vscode/.cache \
/home/vscode/.local \
/home/vscode/.gradle \
&& . ./dev-env.sh \
&& workspace-install-affected"
- name: Set up the dev container
uses: ./.github/actions/setup-dev-container

- name: Lint the affected projects
run: |
Expand All @@ -124,10 +54,10 @@ jobs:
devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
&& nx affected --target=integration-test"

- name: Scan the affected projects with Sonar
run: |
devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
&& nx affected --target=sonar"
# - name: Scan the affected projects with Sonar
# run: |
# devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
# && nx affected --target=sonar"

- name: Publish the images of the affected projects
run: |
Expand Down Expand Up @@ -161,78 +91,8 @@ jobs:
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v3

- name: Set up Yarn cache
uses: actions/cache@v3
with:
path: '/tmp/.yarn/cache'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Set up Renv cache
uses: actions/cache@v3
with:
path: '/tmp/.cache/R/renv/cache'
key: ${{ runner.os }}-renv-cache-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-cache-

- name: Set up Poetry cache
uses: actions/cache@v3
with:
path: '/tmp/.cache/pypoetry'
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}

- name: Set up venv cache
uses: actions/cache@v3
with:
path: |
/tmp/.local/share/virtualenv
**/.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}

- name: Set up Gradle cache
uses: actions/cache@v3
with:
path: |
/tmp/.gradle/caches
/tmp/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Install the Dev Container CLI
run: npm install -g @devcontainers/[email protected]

- name: Start the dev container
run: |
mkdir -p \
/tmp/.yarn/cache \
/tmp/.cache/R/renv/cache \
/tmp/.cache/pypoetry \
/tmp/.local/share/virtualenv \
/tmp/.gradle/caches \
/tmp/.gradle/wrapper

devcontainer up \
--mount type=bind,source=/tmp/.yarn/cache,target=/workspaces/sage-monorepo/.yarn/cache \
--mount type=bind,source=/tmp/.cache/R/renv/cache,target=/home/vscode/.cache/R/renv/cache \
--mount type=bind,source=/tmp/.cache/pypoetry,target=/home/vscode/.cache/pypoetry \
--mount type=bind,source=/tmp/.local/share/virtualenv,target=/home/vscode/.local/share/virtualenv \
--mount type=bind,source=/tmp/.gradle/caches,target=/home/vscode/.gradle/caches \
--mount type=bind,source=/tmp/.gradle/wrapper,target=/home/vscode/.gradle/wrapper \
--workspace-folder ../sage-monorepo

- name: Prepare the workspace
run: |
devcontainer exec --workspace-folder ../sage-monorepo bash -c "
sudo chown -R vscode:vscode \
/workspaces/sage-monorepo \
/home/vscode/.cache \
/home/vscode/.local \
/home/vscode/.gradle \
&& . ./dev-env.sh \
&& workspace-install"
- name: Set up the dev container
uses: ./.github/actions/setup-dev-container

- name: Lint the affected projects
run: |
Expand Down
Loading
Loading