Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/_auth_daemon_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- name: Extract Version from Tag
id: tags
run: echo version=$(echo "${{ github.ref }}" | awk -F '[@v]' '{print $3}') >> $GITHUB_OUTPUT
run: echo version=$(echo "${{ github.ref }}" | awk -F '[@v]' '{print $3}') >> $GITHUB_OUTPUT

- name: Docker Metadata
id: meta
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_dashboard_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

- name: Extract Version from Tag
id: tags
run: echo version=$(echo "${{ github.ref }}" | awk -F '[@v]' '{print $3}') >> $GITHUB_OUTPUT
run: echo version=$(echo "${{ github.ref }}" | awk -F '[@v]' '{print $3}') >> $GITHUB_OUTPUT

- name: Docker Metadata
id: meta
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_github_pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v7
with:
separate-directories: true
separate-directories: true

- name: Download Merged Artifact
uses: actions/download-artifact@v6.0.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_graph_proxy_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- name: Extract Version from Tag
id: tags
run: echo version=$(echo "${{ github.ref }}" | awk -F '[@v]' '{print $3}') >> $GITHUB_OUTPUT
run: echo version=$(echo "${{ github.ref }}" | awk -F '[@v]' '{print $3}') >> $GITHUB_OUTPUT

- name: Docker Metadata
id: meta
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/_helm_lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ jobs:
--target-branch=${{ github.event.repository.default_branch }}
--validate-maintainers=false
--check-version-increment=true
--lint-conf=.lintconf.yaml
2 changes: 1 addition & 1 deletion .github/workflows/_sessionspaces_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- name: Extract Version from Tag
id: tags
run: echo version=$(echo "${{ github.ref }}" | awk -F '[@v]' '{print $3}') >> $GITHUB_OUTPUT
run: echo version=$(echo "${{ github.ref }}" | awk -F '[@v]' '{print $3}') >> $GITHUB_OUTPUT

- name: Docker Metadata
id: meta
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
github-app-id: 1010045
github-app-private-key: ${{ secrets.GRAPH_FEDERATOR }}
publish: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/graph-proxy@') }}

frontend_code:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
Expand Down Expand Up @@ -177,12 +177,12 @@ jobs:
release_please:
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main')
uses: ./.github/workflows/_release_please.yaml
secrets:
secrets:
release_please_token: ${{ secrets.RELEASE_PLEASE_CLIENT_SECRET }}
permissions:
contents: write
pull-requests: write

telemetry_code:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
Expand All @@ -203,4 +203,3 @@ jobs:
steps:
- name: Lint Workflows
uses: diamondlightsource/workflows@main

8 changes: 8 additions & 0 deletions .lintconf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
extends: default

rules:
document-start: disable
line-length: disable
comments:
min-spaces-from-content: 1
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
2 changes: 1 addition & 1 deletion backend/auth-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ rustls = { workspace = true, features = ["aws-lc-rs"] }
sea-orm = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
serde_yaml = { workspace = true }
serde_yaml = { workspace = true }
sodiumoxide = "0.2.7"
thiserror = { workspace = true }
tokio = { workspace = true, features = ["full"] }
Expand Down
1 change: 0 additions & 1 deletion backend/auth-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ Outputs Base64-encoded public and private keys to set in service config.
```sh
cd migration && cargo run
```

1 change: 0 additions & 1 deletion backend/auth-daemon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ The daemon resolves the subject (the user whose stored refresh token to load) at
|------|--------|-------------|
| `/` | any | Authenticated proxy to the configured GraphQL endpoint |
| `/healthz` | `GET` | Health check (returns 202) |

1 change: 0 additions & 1 deletion backend/auth-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ Serves on port `5173` by default (configurable in `config.yaml`).
| `/auth/logout` | `POST` | Clear session and delete stored tokens |
| `/healthcheck` | `GET` | Health check (returns 202) |
| `/*` | any | Authenticated proxy to the GraphQL backend |

1 change: 0 additions & 1 deletion backend/graph-proxy/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
.devcontainer
target

6 changes: 3 additions & 3 deletions backend/graph-proxy/src/graphql/workflows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,7 @@ mod tests {
r#"
query {{
workflows(
visit: {{proposalCode: "{}", proposalNumber: {}, number: {}}},
visit: {{proposalCode: "{}", proposalNumber: {}, number: {}}},
filter: {{ workflowStatusFilter: {{ error: true }}, creator: "enu43627" }}
) {{
nodes {{
Expand Down Expand Up @@ -1658,7 +1658,7 @@ mod tests {
r#"
query {{
workflows(
visit: {{proposalCode: "{}", proposalNumber: {}, number: {}}},
visit: {{proposalCode: "{}", proposalNumber: {}, number: {}}},
filter: {{ workflowStatusFilter: {{ failed: true, error: true, succeeded: false, pending: false, running: false }} }}
) {{
nodes {{
Expand Down Expand Up @@ -1708,7 +1708,7 @@ mod tests {
r#"
query {{
workflows(
visit: {{proposalCode: "{}", proposalNumber: {}, number: {}}},
visit: {{proposalCode: "{}", proposalNumber: {}, number: {}}},
filter: {{ creator: "abc12345" }}
) {{
nodes {{
Expand Down
2 changes: 1 addition & 1 deletion backend/graph-proxy/src/validate_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ struct IntrospectionEndpointProviderMetadata {
}
impl AdditionalProviderMetadata for IntrospectionEndpointProviderMetadata {}

/// The concrete type returned by OIDC discovery
/// The concrete type returned by OIDC discovery
type ProviderMetadataWithInstrospectionEndpoint = ProviderMetadata<
IntrospectionEndpointProviderMetadata,
CoreAuthDisplay,
Expand Down
2 changes: 1 addition & 1 deletion backend/identity-mapper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

This is an MVP to collect user group information to patch Argo Worflows and Pod securityContext based on LDAP information.

TODO: replace with a rust implementation.
TODO: replace with a rust implementation.
4 changes: 2 additions & 2 deletions backend/sessionspaces/.devcontainer.local/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ systemctl --user enable --now podman.socket

2) Proxy the LDAP. The LDAP is only accessible from workstations, the local cluster is usable on a root laptop. We get around this by proxying the LDAP traffic via a workstation. Something like this should work, with your own workstation as the ssh host.

```bash
```bash
ssh -L 1389:ldapmaster.diamond.ac.uk:389 USER@WORKSTATION
```

Expand All @@ -45,4 +45,4 @@ cargo run

The kind cluster can be deleted and re-created on demand when a clean-slate is desired.

View the created namespaces/configmaps with 'kubectl' (pre-installed in the dev dockerfile)
View the created namespaces/configmaps with 'kubectl' (pre-installed in the dev dockerfile)
6 changes: 3 additions & 3 deletions backend/sessionspaces/tests/fixtures/bl_sessions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ INSERT INTO
`startDate`,
`endDate`
)
VALUES
VALUES
(40, 30, 1, "i03", "2009-06-19 09:00:00","2009-07-19 09:00:00"),
(41, 30, 2, "i04-1", "2010-06-19 00:00:00", "2010-06-19 00:00:00"),
(43, 31, 4, "i22", "2011-01-19 00:00:00", "2011-01-19 00:00:00"),
(41, 30, 2, "i04-1", "2010-06-19 00:00:00", "2010-06-19 00:00:00"),
(43, 31, 4, "i22", "2011-01-19 00:00:00", "2011-01-19 00:00:00"),
(44, 31, 5, "p45", "2011-01-19 00:00:00", "2011-01-19 00:00:00");
4 changes: 2 additions & 2 deletions backend/sessionspaces/tests/fixtures/persons.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ INSERT INTO
`personId`,
`login`
)
VALUES
(20, "foo"),
VALUES
(20, "foo"),
(21, "bar");
2 changes: 1 addition & 1 deletion backend/sessionspaces/tests/fixtures/proposals.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ INSERT INTO
`proposalNumber`,
`proposalCode`
)
VALUES
VALUES
(30, "10030", "sw"),
(31, "10031", "cm")
10 changes: 5 additions & 5 deletions backend/sessionspaces/tests/fixtures/session_has_person.sql
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
INSERT INTO
INSERT INTO
`Session_has_Person` (
`sessionId`,
`personId`
)
VALUES
VALUES
(40, 20),
(41, 20),
(42, 20),
(43, 21),
(41, 20),
(42, 20),
(43, 21),
(44, 21);
2 changes: 1 addition & 1 deletion charts/apps/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v2
name: apps
description: An argocd app to deploy apps inside the virtual cluster
type: application
version: 0.5.12
version: 0.5.13
9 changes: 6 additions & 3 deletions charts/apps/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,16 @@ kyverno:
enabled: true
kyverno_policy_execution_duration_seconds:
enabled: true
disabledLabelDimensions: ["resource_namespace", "resource_request_operation"]
disabledLabelDimensions:
["resource_namespace", "resource_request_operation"]
kyverno_validating_policy_execution_duration_seconds:
enabled: true
disabledLabelDimensions: ["resource_namespace", "resource_request_operation"]
disabledLabelDimensions:
["resource_namespace", "resource_request_operation"]
kyverno_image_validating_policy_execution_duration_seconds:
enabled: true
disabledLabelDimensions: ["resource_namespace", "resource_request_operation"]
disabledLabelDimensions:
["resource_namespace", "resource_request_operation"]
kyverno_admission_review_duration_seconds:
enabled: true
disabledLabelDimensions: ["resource_namespace"]
Expand Down
2 changes: 1 addition & 1 deletion charts/argocd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: argocd
description: ArgoCD, with a few extras
type: application

version: 0.3.34
version: 0.3.35
dependencies:
- name: common
version: 2.23.0
Expand Down
1 change: 0 additions & 1 deletion charts/argocd/staging-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ argo-cd:
ingress:
enabled: true
host: argo-cd.staging.workflows.diamond.ac.uk

2 changes: 1 addition & 1 deletion charts/dashboard/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: dashboard
description: A dashboard for Diamond workflows
type: application
version: 0.2.27
version: 0.2.28
appVersion: 0.1.15
dependencies:
- name: common
Expand Down
1 change: 0 additions & 1 deletion charts/dashboard/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ spec:
targetPort: dashboard
protocol: TCP
{{- end }}

2 changes: 1 addition & 1 deletion charts/events/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: events
description: Data Analysis event triggering
type: application

version: 0.3.5
version: 0.3.6

dependencies:
- name: argo-events
Expand Down
4 changes: 2 additions & 2 deletions charts/events/crds/trigger-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
properties:
lifetime:
type: string
pattern: '^(\d+[smh]|forever)$'
pattern: '^(\d+[smh]|forever)$'
enabled:
type: boolean
default: true
Expand Down Expand Up @@ -86,7 +86,7 @@ spec:
properties:
lifetime:
type: string
pattern: '^(\d+[smh]|forever)$'
pattern: '^(\d+[smh]|forever)$'
default: 24h
templateRef:
type: string
Expand Down
12 changes: 6 additions & 6 deletions charts/events/hooks/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CustomizeRequest(TypedDict):
controller: dict
parent: dict

"""
"""
A JSON object representing the desired resource description. A list of these
constitutes the response expected from the customize hook
"""
Expand Down Expand Up @@ -114,22 +114,22 @@ def sync(self, parent: dict, related: dict) -> SyncResponse:
"type": "string",
"value": [workflow.triggerOnMessageType],
})

if namespace != "events":
dataFilters.append({
"path": "body.doc.instrument_session",
"type": "string",
"value": [namespace],
})

if dataFilters:
dependency.update({"filters": {"data": dataFilters}})

dependencies.append(dependency)

sensorParams = [{
"src": {
"dependencyName": name,
"dependencyName": name,
"dataKey": "body.doc.instrument_session"
},
"dest": "metadata.namespace"
Expand Down Expand Up @@ -214,7 +214,7 @@ def customize(self, parent: dict) -> list[ResourceRule]:
sourceTypes: list[str] = list(parent.get("spec", {}).keys())

if not sourceTypes or not beamline:
return []
return []

return [{
"apiVersion": "workflows.diamond.ac.uk/v1alpha1",
Expand Down
6 changes: 3 additions & 3 deletions charts/events/templates/event-bus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ spec:
{{- if $eventBus.resources }}
containerTemplate:
resources:
{{- $eventBus.resources | toYaml | nindent 10 }}
{{- $eventBus.resources | toYaml | nindent 10 }}
{{- end }}
{{- if $eventBus.metricsresources }}
{{- if $eventBus.metricsresources }}
metricsContainerTemplate:
resources:
{{- $eventBus.metricsresources | toYaml | nindent 10 }}
{{- $eventBus.metricsresources | toYaml | nindent 10 }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/events/templates/event-sources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
ports:
- port: {{$eventSource.port }}
targetPort: {{$eventSource.port }}
{{- if $eventSource.webhook }}
{{- if $eventSource.webhook }}
webhook:
{{- $eventSource.webhook | toYaml | nindent 6 }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/events/templates/example-trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
parameters:
- name: visitdir
path: doc.data_session_directory

---
apiVersion: workflows.diamond.ac.uk/v1alpha1
kind: ClusterTriggerTemplate
Expand Down
2 changes: 1 addition & 1 deletion charts/events/templates/stomp-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ spec:
- |
cp /scripts/stomp-server.py .
pip install expiringdict deepmerge stomp.py pydantic grpcio-tools --disable-pip-version-check --root-user-action=ignore
python -m grpc_tools.protoc -I /protos --python_out=. --pyi_out=. --grpc_python_out=. /protos/generic.proto &&
python -m grpc_tools.protoc -I /protos --python_out=. --pyi_out=. --grpc_python_out=. /protos/generic.proto &&
python stomp-server.py
env:
- name: PYTHONUNBUFFERED
Expand Down
Loading
Loading