Skip to content

Maintenance updates#477

Merged
monfresh merged 7 commits intomainfrom
mb-maintenance-updates
Apr 25, 2024
Merged

Maintenance updates#477
monfresh merged 7 commits intomainfrom
mb-maintenance-updates

Conversation

@monfresh
Copy link
Contributor

@monfresh monfresh commented Apr 25, 2024

This PR contains some maintenance updates:

  • Update Ruby to 3.2.4
  • Update jekyll, nokogiri, rspec, bundler to latest versions
  • Fix warning about excerpt when running local server
  • Update CircleCI config.yml to take advantage of orbs

See the individual commit messages for more details.

@monfresh monfresh force-pushed the mb-maintenance-updates branch 4 times, most recently from ca5158a to e6deda3 Compare April 25, 2024 15:42
@monfresh monfresh marked this pull request as ready for review April 25, 2024 15:50
Copy link
Contributor

@Sgtpluck Sgtpluck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!!! 🙏

Copy link
Contributor

@ajfarkas ajfarkas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great to see.
Are we not using store_test_results or store_artifacts in the circleCI config?

echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV;
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV;

- node/install
Copy link
Contributor

@aduth aduth Apr 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat, I didn't know CircleCI had built-in support for NVM! That feels a lot nicer / safer than running code directly from GitHub 😅 I wonder if that's always been a thing, or if it's a new feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this feature is relatively new. I forget when I first discovered it. Maybe in the past 2 years? It looks like the Node Orb was originally created in 2018, but I'm not sure if it had all of today's functionality back then.

Comment on lines +23 to +24
- node/install-packages
- ruby/install-deps
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also didn't realize they had these conveniences with built-in caching 🎉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, and built-in test reporting as well.

@monfresh
Copy link
Contributor Author

@ajfarkas That's a good question. Previously, the store_test_results and store_artifacts steps weren't doing anything because the config never created the /tmp/test-results folder 😄 You can verify this by looking at this old workflow, and see the error under the "Uploading Test Results" section: https://app.circleci.com/pipelines/github/GSA-TTS/identity-dev-docs/1131/workflows/35c7197a-c963-4381-8ed1-652aee33e6a4/jobs/1363

With this new config, RSpec test results should be uploaded automatically, but it looks like the Node tests are not. Either way, given the nature of the tests, and that they run in about 30 seconds, I don't think we have much use for CircleCI's Test Insights.

By default, the excerpt separator in Jekyll is a double newline. This is mainly for blogs that want to list the latest posts, but only show an excerpt.

To determine how much of the beginning of the post to show in the excerpt, you define the stopping point by adding a double newline after it. Or you can specify your own custom separator.

In a couple of our posts, namely `user-info.md` and `certificates.md`, the post content starts with a Liquid tag, and the content between the Liquid tags contains double newlines (i.e. an empty line between paragraphs). If excerpts were used, this would result in invalid Liquid syntax because the excerpt output would be missing the end Liquid tag.

To overcome this, Jekyll inserts the closing tag to appease Liquid, but the output might be missing content, hence the warning.

To get rid of this warning, I defined a custom excerpt separator in `_config.yml`

References:
https://jekyllrb.com/docs/posts/#post-excerpts

https://talk.jekyllrb.com/t/whats-the-deal-with-found-a-liquid-block-containing-the-excerpt-separator-n-n/5289/4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants