Skip to content

Commit 692a5e4

Browse files
authored
Merge pull request #1113 from alan-turing-institute/release-candidate-3.4.0
Release candidate 3.4.0
2 parents ac51a45 + 72e79d6 commit 692a5e4

569 files changed

Lines changed: 17499 additions & 16226 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.PSScriptAnalyzerSettings.psd1

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
# Ignore error when a function has both 'Username' and 'Password'
88
# arguments
99
"PSAvoidUsingUsernameAndPasswordParams",
10-
# Ignore error around Write-Host. This is done to ensure that messages
11-
# are actually logged to the console rather than forming part of the
12-
# output of a function
13-
"PSAvoidUsingWriteHost",
1410
# Ignore DSC errors as we want to phase out opaque DSC calls
1511
"PSDSCDscTestsPresent",
1612
"PSDSCDscExamplesPresent",
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
name: Bug report
3+
about: Use this template for reporting a bug
4+
title: "<short description of issue>"
5+
labels: "type: bug"
6+
assignees: ""
7+
---
8+
9+
<!--
10+
Before reporting a problem:
11+
- Make sure you are able to reproduce it on the [latest version](https://github.com/alan-turing-institute/data-safe-haven/releases)
12+
- Search the existing issues.
13+
- Refer to [our documentation](https://alan-turing-institute.github.io/data-safe-haven/).
14+
15+
In order to help categorise your issue, please take the time to label it with at least one label from **each of** the following categories
16+
17+
- type (bug; enhancement; documentation; question)
18+
- affected (developers; users)
19+
- severity (minor; medium; embarrassing; broken / unusable)
20+
21+
Additionally, if you think this would be a good issue for newcomers to tackle then please add the `good first issue` label.
22+
23+
:tada: Thank you!
24+
-->
25+
26+
## :computer: System information
27+
28+
- Operating System: <!-- Which operating system are you using: Windows, Linux, macOS etc. -->
29+
- Data Safe Haven version: <!-- Which version of the Data Safe Haven are you using: 3.0.0, 3.1.1 etc. -->
30+
- Powershell version: <!-- Which version of Powershell are you using: use CheckRequirements.ps1 if unsure -->
31+
- `Az` Powershell module version: <!-- Which version of the Az Powershell module are you using: use CheckRequirements.ps1 if unsure -->
32+
- `Microsoft.Graph` Powershell module version: <!-- Which version of the Microsoft.Graph Powershell module are you using: use CheckRequirements.ps1 if unsure -->
33+
- `Poshstache` module version: <!-- Which version of the Microsoft.Graph Powershell module are you using: use CheckRequirements.ps1 if unsure -->
34+
## :strawberry: Desired behaviour
35+
36+
<!--
37+
A clear and concise description of what the behaviour should be when this issue is closed.
38+
39+
Include specific tasks (if any) in the order in which they need to be done.
40+
- [ ] Task 1
41+
- [ ] Task 2
42+
- [ ] Task 3
43+
-->
44+
45+
## :no_entry_sign: Actual behaviour
46+
47+
<!--
48+
What happens now and (if relevant) an explanation of why this is incorrect
49+
-->
50+
51+
## :recycle: To reproduce
52+
53+
<!--
54+
How can the current behaviour be reproduced? Include some steps to reproduce the problem.
55+
56+
Example:
57+
1. Deploy an SRE with option X set to Y
58+
2. Attempt to perform action Z
59+
3. Observe the following failure/error message
60+
-->
61+
62+
<!-- OPTIONAL
63+
## :deciduous_tree: Log messages
64+
65+
<details>
66+
<summary>First set of log messages</summary>
67+
68+
```none
69+
Your log details here
70+
```
71+
</details>
72+
73+
<details>
74+
<summary>Second set of log messages</summary>
75+
76+
```none
77+
Your log details here
78+
```
79+
</details>
80+
-->
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Enhancement request
3+
about: Use this template for requested new features or extensions to existing features
4+
title: "<short description of issue>"
5+
labels: "type: enhancement"
6+
assignees: ""
7+
---
8+
9+
<!--
10+
Before opening an issue:
11+
- Make sure you are able to reproduce it on the [latest version](https://github.com/alan-turing-institute/data-safe-haven/releases)
12+
- Search the existing issues.
13+
- Refer to [our documentation](https://alan-turing-institute.github.io/data-safe-haven/).
14+
15+
In order to help categorise your issue, please take the time to label it with at least one label from **each of** the following categories
16+
17+
- type (bug; enhancement; documentation; question)
18+
- affected (developers; users)
19+
- severity (minor; medium; embarrassing; broken / unusable)
20+
21+
Additionally, if you think this would be a good issue for newcomers to tackle then please add the `good first issue` label.
22+
23+
:tada: Thank you!
24+
-->
25+
26+
## :computer: System information
27+
28+
- Operating System: <!-- Which operating system are you using: Windows, Linux, macOS etc. -->
29+
- Data Safe Haven version: <!-- Which version of the Data Safe Haven are you using: 3.0.0, 3.1.1 etc. -->
30+
31+
## :strawberry: Desired behaviour
32+
33+
<!--
34+
A clear and concise description of what the behaviour should be when this issue is closed.
35+
36+
Include specific tasks (if any) in the order in which they need to be done.
37+
- [ ] Task 1
38+
- [ ] Task 2
39+
- [ ] Task 3
40+
-->

.github/issue_template.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/pull_request_template.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<!--
2-
### :vertical_traffic_light: Your checklist for this pull request
3-
Please review the [guidelines for contributing](../CONTRIBUTING.md) to this repository.
2+
Thank you for your pull request!
3+
4+
Before going any further, please review the [guidelines for contributing](../CONTRIBUTING.md) to this repository.
45
56
- Make sure that you give your pull request a meaningful title (*e.g.* `Enable foobar integration` rather than `515 foobar`)
7+
- Make sure that you are targeting the **develop branch**
68
- If this pull request is not ready to merge yet, please add `WIP:` to the beginning of the name as well as marking it as a **draft** pull request
79
- Make sure that your branch is up-to-date with the **develop branch** (you probably started your branch from develop but it may have changed since then)
810
- There is **no need** to use GitHub labels for pull requests. The issue(s) which this pull request is closing should have the appropriate labels.
@@ -12,24 +14,22 @@ Please review the [guidelines for contributing](../CONTRIBUTING.md) to this repo
1214
-->
1315

1416
### :arrow_heading_up: Summary
17+
1518
<!--
1619
Please explain what your pull request does here.
20+
You might (optionally) want to include screenshots here.
1721
-->
1822

1923
### :closed_umbrella: Related issues
20-
<!--
21-
If your pull request will close any open issues (hopefully it will!) then add `Closes #<issue number>` here.
22-
-->
2324

24-
#### :camera: Screenshots
2525
<!--
26-
Optionally include screenshots here.
26+
If your pull request will close any open issues (hopefully it will!) then add `Closes #<issue number>` here.
2727
-->
2828

2929
### :microscope: Tests
30+
3031
<!--
3132
- Document any manual tests that you have carried out (*e.g.* deploying a new SHM and/or SRE) and confirm which commit you did this with
3233
- Note that automated tests will be run as part of the CI process and will block this PR until they pass.
3334
- Additionally, a successful code review may be required before this PR can be merged.
3435
-->
35-

.github/scripts/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
lxml
2+
natsort
3+
requests
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#! /usr/bin/env python3
2+
from lxml import html
3+
import hashlib
4+
import requests
5+
6+
remote_page = requests.get("https://docs.microsoft.com/en-us/sql/azure-data-studio/download-azure-data-studio", allow_redirects=True)
7+
root = html.fromstring(remote_page.content)
8+
short_link = root.xpath("//a[contains(text(), '.deb file')]/@href")[0]
9+
10+
remote_content = requests.get(short_link, allow_redirects=True)
11+
sha256 = hashlib.sha256(remote_content.content).hexdigest()
12+
version = remote_content.url.split("-")[-1].replace(".deb", "")
13+
remote = "/".join(remote_content.url.split("/")[:-1] + ["|DEBFILE|"])
14+
15+
with open("deployment/secure_research_desktop/packages/deb-azuredatastudio.version", "w") as f_out:
16+
f_out.write(f"hash: {sha256}\n")
17+
f_out.write(f"version: {version}\n")
18+
f_out.write("debfile: azuredatastudio-linux-|VERSION|.deb\n")
19+
f_out.write(f"remote: {remote}\n")
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#! /usr/bin/env python3
2+
import json
3+
from lxml import html
4+
from natsort import natsorted
5+
import requests
6+
7+
output = {}
8+
remote_page = requests.get("https://repo1.maven.org/maven2/com/microsoft/sqlserver/mssql-jdbc/", allow_redirects=True)
9+
root = html.fromstring(remote_page.content)
10+
output["mssql_jdbc"] = natsorted([v for v in root.xpath("//a[contains(text(), 'jre8/')]/@href") if v != "../"])[-1].replace("/", "")
11+
12+
remote_page = requests.get("https://repo1.maven.org/maven2/org/postgresql/pgjdbc-versions/", allow_redirects=True)
13+
root = html.fromstring(remote_page.content)
14+
output["pgjdbc"] = natsorted([v for v in root.xpath("//a[contains(text(), '/')]/@href") if v != "../"])[-1].replace("/", "")
15+
16+
remote_page = requests.get("https://repo1.maven.org/maven2/org/postgresql/postgresql/", allow_redirects=True)
17+
root = html.fromstring(remote_page.content)
18+
output["postgresql"] = natsorted([v for v in root.xpath("//a[contains(text(), '/')]/@href") if v != "../"])[-1].replace("/", "")
19+
20+
remote_page = requests.get("https://repo1.maven.org/maven2/net/postgis/postgis-jdbc/", allow_redirects=True)
21+
root = html.fromstring(remote_page.content)
22+
postgis_jdbc_versions = natsorted([v for v in root.xpath("//a[contains(text(), '/')]/@href") if v != "../"])
23+
24+
remote_page = requests.get("https://repo1.maven.org/maven2/net/postgis/postgis-geometry/", allow_redirects=True)
25+
root = html.fromstring(remote_page.content)
26+
postgis_geometry_versions = natsorted([v for v in root.xpath("//a[contains(text(), '/')]/@href") if v != "../"])
27+
28+
postgis = natsorted(set(postgis_jdbc_versions).intersection(set(postgis_geometry_versions)))[-1].replace("/", "")
29+
output["postgis_geometry"] = postgis
30+
output["postgis_jdbc"] = postgis
31+
32+
with open("deployment/secure_research_desktop/packages/dbeaver-driver-versions.json", "w") as f_out:
33+
f_out.writelines(json.dumps(output, indent=4, sort_keys=True))

.github/scripts/update_rstudio.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#! /usr/bin/env python3
2+
from lxml import html
3+
import hashlib
4+
import requests
5+
6+
remote_page = requests.get("https://www.rstudio.com/products/rstudio/download/", allow_redirects=True)
7+
root = html.fromstring(remote_page.content)
8+
short_link = [link for link in root.xpath("//a[contains(text(), '.deb')]/@href") if "debian" not in link][0]
9+
10+
remote_content = requests.get(short_link, allow_redirects=True)
11+
sha256 = hashlib.sha256(remote_content.content).hexdigest()
12+
version = "-".join(remote_content.url.split("/")[-1].split("-")[1:-1])
13+
remote = "/".join(remote_content.url.split("/")[:-1] + ["|DEBFILE|"])
14+
15+
with open("deployment/secure_research_desktop/packages/deb-rstudio.version", "w") as f_out:
16+
f_out.write(f"hash: {sha256}\n")
17+
f_out.write(f"version: {version}\n")
18+
f_out.write("debfile: rstudio-|VERSION|-amd64.deb\n")
19+
f_out.write(f"remote: {remote}\n")
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
name: Build allow lists
3+
4+
# Run workflow on pushes to matching branches
5+
on: # yamllint disable-line rule:truthy
6+
push:
7+
branches: [develop]
8+
schedule:
9+
- cron: "0 0 */6 * *" # run every six days in order to keep the cache fresh
10+
11+
# checkout needs 'contents:read'
12+
# pull request needs 'pull-requests:write' and 'contents:write'
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
17+
env:
18+
TIMEOUT_REACHED: 0
19+
20+
jobs:
21+
build_allow_lists:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v2
26+
27+
- name: Cache dependencies
28+
uses: actions/cache@v2
29+
with:
30+
path: environment_configs/package_lists/dependency-cache.json
31+
key: dependencies-${{ github.sha }} # request a cache that does not yet exist
32+
restore-keys: dependencies- # use prefix matching to fallback to the most recently created SHA-specific cache
33+
34+
- name: Check PyPI allow list
35+
shell: pwsh
36+
env:
37+
LIBRARIES_IO_API_KEY: ${{ secrets.LIBRARIES_IO_API_KEY }}
38+
run: ./deployment/administration/SHM_Expand_Allowlist_Dependencies.ps1 -Repository pypi -TimeoutMinutes 60 -ApiKey "$env:LIBRARIES_IO_API_KEY" # this will set TIMEOUT_REACHED if the timeout is reached
39+
40+
- name: Check CRAN allow list
41+
shell: pwsh
42+
env:
43+
LIBRARIES_IO_API_KEY: ${{ secrets.LIBRARIES_IO_API_KEY }}
44+
run: ./deployment/administration/SHM_Expand_Allowlist_Dependencies.ps1 -Repository cran -TimeoutMinutes 240 -ApiKey "$env:LIBRARIES_IO_API_KEY" # this will set TIMEOUT_REACHED if the timeout is reached
45+
46+
- name: Check for changes
47+
shell: bash
48+
run: git --no-pager diff -- . ':!environment_configs/package_lists/dependency-cache.json'
49+
50+
- name: Get current date
51+
id: date
52+
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
53+
54+
- name: Create pull request
55+
if: ${{ (! env.TIMEOUT_REACHED) && (! env.ACT) }}
56+
id: pull-request
57+
uses: peter-evans/create-pull-request@dcd5fd746d53dd8de555c0f10bca6c35628be47a # This commit corresponds to tag 3.12.0
58+
with:
59+
commit-message: Update PyPI and CRAN allow lists
60+
committer: GitHub Actions <noreply@github.com>
61+
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
62+
base: develop
63+
branch: package-allowlist-updates
64+
delete-branch: true
65+
title: Update PyPI and CRAN allow lists
66+
body: |
67+
### :arrow_heading_up: Summary
68+
- Apply package allowlist diff from ${{ github.sha }} on ${{ steps.date.outputs.date }}
69+
70+
### :closed_umbrella: Related issues
71+
None
72+
73+
### :microscope: Tests
74+
Allow-list only
75+
labels: |
76+
affected: developers
77+
severity: minor
78+
type: enhancement
79+
draft: false

0 commit comments

Comments
 (0)