Skip to content

Commit

Permalink
Configure Markdown Linter (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
fkorotkov authored Sep 29, 2023
1 parent 2da8bc0 commit 8e79669
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 16 deletions.
14 changes: 8 additions & 6 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ env:
task:
name: Test on Sonoma
alias: test
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
persistent_worker:
labels:
name: dev-mini
Expand All @@ -30,10 +29,17 @@ task:
path: "integration-tests/pytest-junit.xml"
format: junit

task:
name: Markdown Lint
only_if: $CIRRUS_BRANCH != 'gh-pages' && changesInclude('**.md')
container:
image: node:latest
install_script: npm install -g markdownlint-cli
lint_script: markdownlint --config=docs/.markdownlint.yml docs/

task:
name: Lint
alias: lint
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
macos_instance:
image: ghcr.io/cirruslabs/macos-sonoma-xcode:$XCODE_TAG
lint_script:
Expand All @@ -47,7 +53,6 @@ task:
only_if: $CIRRUS_TAG == ''
name: Build
alias: build
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
macos_instance:
image: ghcr.io/cirruslabs/macos-sonoma-xcode:$XCODE_TAG
build_script: swift build --product tart
Expand All @@ -61,7 +66,6 @@ task:
depends_on:
- lint
- build
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
macos_instance:
image: ghcr.io/cirruslabs/macos-sonoma-xcode:$XCODE_TAG
env:
Expand Down Expand Up @@ -97,7 +101,6 @@ task:
- lint
- test
- build
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
macos_instance:
image: ghcr.io/cirruslabs/macos-sonoma-xcode:$XCODE_TAG
env:
Expand Down Expand Up @@ -144,7 +147,6 @@ task:
task:
name: Deploy Documentation
only_if: $CIRRUS_BRANCH == 'main'
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
container:
image: ghcr.io/cirruslabs/mkdocs-material-insiders:latest
registry_config: ENCRYPTED[!cf1a0f25325aa75bad3ce6ebc890bc53eb0044c02efa70d8cefb83ba9766275a994b4831706c52630a0692b2fa9cfb9e!]
Expand Down
12 changes: 12 additions & 0 deletions docs/.markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"default": true
"MD002": false # First heading should be a top level heading
"MD007": # Unordered list indentation
indent: 4
"MD009": false # Trailing spaces
"MD013": false # Line length
"MD025": false # Multiple top level headings in the same document
"MD026": false # Trailing punctuation in heading
"MD033": false # Inline HTML
"MD041": false # First line in file should be a top level heading
"MD045": false # OK not to have a description for an image
"MD046": false # Code block style [Expected: fenced; Actual: indented]
2 changes: 1 addition & 1 deletion docs/blog/posts/2023-04-28-orchard-ssh-over-grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ On bootstrap, each Orchard worker establishes a `Watch()` RPC stream and waits f

Once `PortForward` instruction is received, the worker connects to the specified VM and port locally and opens a new `PortForward()` RPC stream with the controller, carrying the unique `session` identifier in the gRPC metadata to help distinguish several port forwarding requests.

We’re using a pretty ingenious Golang package that turns any gRPC stream into a `net.Conn`: https://github.com/mitchellh/go-grpc-net-conn. This allows us to abstract from the gRPC details and simply proxy two `net.Conns`, thus providing the port forwarding functionality.
We’re using a pretty ingenious [Golang package that turns any gRPC stream into a `net.Conn`](https://github.com/mitchellh/go-grpc-net-conn). This allows us to abstract from the gRPC details and simply proxy two `net.Conns`, thus providing the port forwarding functionality.

We’ve also initially considered using [Yamux](https://github.com/hashicorp/yamux) to only keep a single connection with each worker, however, that involves the burden of dealing with flow control and potential implementation bugs associated with it, so we’ve decided to simply open an additional connection for each port forwarding session and let the OS deal with it.

Expand Down
8 changes: 4 additions & 4 deletions docs/blog/posts/2023-09-20-tart-2.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ allocate time to continue improving Tart which brings us to the section below.
In the last 7 months we've had 12 feature releases that brought a lot of features requested by the community. Here are just
a few of them to highlight:

* [Custom GitLab Runner Executor](/integrations/gitlab-runner/).
* [Cluster Management via Orchard](2023-04-25-orchard-ga.md).
* Numerous compatibility improvements for all kinds of OCI-registries.
* Sonoma Support (see details [below](#macos-sonoma-updates)).
-[Custom GitLab Runner Executor](/integrations/gitlab-runner/).
-[Cluster Management via Orchard](2023-04-25-orchard-ga.md).
-Numerous compatibility improvements for all kinds of OCI-registries.
-Sonoma Support (see details [below](#macos-sonoma-updates)).

But one of the most requested features/complaints was around pulling huge Tart images from remote OCI-compatible registries.
With an ideal network conditions `tart pull` worked pretty good but in case of any network issues it was required to
Expand Down
6 changes: 3 additions & 3 deletions docs/integrations/github-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ Here is a high-level overview of how Cirrus Runners service manages runners for
- Cirrus Runner GitHub App is subscribed to [`workflow_job`](https://docs.github.com/en/webhooks/webhook-events-and-payloads#workflow_job).
- Upon receiving a new event targeting Cirrus Runners via `runs-on` property the following steps take place:

* Non-personal information about your job is saved to perform health checking of Cirrus Runners execution.
* Cirrus Runners GitHub App has only one permission that allows generating temporary registration tokens for
- Non-personal information about your job is saved to perform health checking of Cirrus Runners execution.
- Cirrus Runners GitHub App has only one permission that allows generating temporary registration tokens for
self-hosted GitHub Actions Runners. Note that Cirrus Runners GitHub App itself doesn't have access to contents of
repositories in your organization.
* Cirrus Runners Service creates a new single use Tart VM, generates a temporary registration tokens for self-hosted runners
- Cirrus Runners Service creates a new single use Tart VM, generates a temporary registration tokens for self-hosted runners
and passes it without storing inside the VM for the GitHub Actions Runner service to [start a ephemeral runner](https://github.blog/changelog/2021-09-20-github-actions-ephemeral-self-hosted-runners-new-webhooks-for-auto-scaling/).

- Cirrus Runners service continuously monitors health of the Tart VM executing your job to make sure it runs to completion.
Expand Down
2 changes: 2 additions & 0 deletions docs/integrations/vm-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ Here is a [repository with Packer templates](https://github.com/cirruslabs/macos

## Working with a Remote OCI Container Registry

<!-- markdownlint-disable MD034 -->
For example, let's say you want to push/pull images to a registry hosted at https://acme.io/.
<!-- markdownlint-enable MD034 -->

### Registry Authorization

Expand Down
1 change: 0 additions & 1 deletion docs/licensing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ will be required to obtain a paid license.
The virtual CPU cores of Tart VMs are not tied to specific physical cores of the host CPU. Instead, for optimal performance
Tart VMs will automatically try to balance compute between all available cores of the host CPU. As a result,
all performance and energy-efficient cores of the host CPU are always counted towards the license usage.


# License Tiers

Expand Down
1 change: 0 additions & 1 deletion docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,3 @@ mount -t virtiofs com.apple.virtio-fs.automount /mnt/shared
```

The directory we've mounted above will be accessible from the `/mnt/shared/project` path inside a guest VM.

0 comments on commit 8e79669

Please sign in to comment.