iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
👹

Productivity Weekly (2021-02-03 Issue)

に公開

Hello. I'm Hirakiba from the Productivity Improvement Team at Cybozu, Inc.

Our Productivity Improvement Team holds an internal meeting every Wednesday called "Productivity Weekly," where we share tips and topics discovered during the week related to improving developer productivity.
This article is a compilation of the topics from that meeting.

This is the 12th installment. You can find past articles here.

news

npm 7 is now generally available!

https://github.blog/2021-02-02-npm-7-is-now-generally-available/
npm v7 is now Generally Available. In v7, features like workspaces and diff output have been added, yarn.lock is now supported, and there are several breaking changes.

The workspaces feature makes it easier to manage multiple packages when they are combined into a single repository (monorepo). While yarn already had a workspace feature, I believe this makes it easier to create monorepos with npm as well.
npm diff is a new command that allows you to compare packages and display the differences. For example, when upgrading a dependency version, you can now check what changes were made right at your fingertips[1].

https://blog.watilde.com/2020/10/14/npm-v7の主な変更点まとめ/
This article provides a nice summary of the changes.

https://dev.to/ruyadorno/npm-diff-23dh
Also, this article has more details regarding the diff feature.

Test Automation Platform "Autify" Now Offers Long-Awaited Mobile App Support

https://autify.com/ja/news/release_autify-for-mobile-beta

Autify, a test automation platform, has begun providing a version compatible with mobile apps.
Testing mobile apps usually requires preparing physical verification devices, but with this, such devices are unnecessary. I think the exciting points are that features characteristic of the conventional Autify, such as "no-code automation" and "AI detecting and auto-repairing differences caused by updates," can now also be used for mobile apps.

Although it said "mobile apps," I wondered if it might actually refer to Web apps instead of native apps, but since it states:

"Autify for Mobile (Beta)" has been developed with all our might to meet the requests from customers using the Web version who said, "we want a version compatible with mobile native apps."

it seems to support mobile native apps rather than just mobile Web apps.

Google releases "sqlcommenter" as open source to facilitate investigation when SQL generated by ORM is slow; supports major frameworks like Rails, Spring, and Django

https://www.publickey1.jp/blog/21/googleormsqlsqlcommenterrailsspringdjango.html

A tool called sqlcommenter has been released as OSS. By adding comments to SQL statements generated by ORMs, it simplifies the investigation of which SQL statements are leading to performance degradation during performance testing.
However, because the supported languages, frameworks, and databases are limited[2], sqlcommenter may not be usable if you are using a language or framework not on the list. Looking at it differently, it might be a contribution opportunity.

know-how

Keeping your GitHub Actions and workflows secure: Untrusted input - GitHub Security Lab

https://securitylab.github.com/research/github-actions-untrusted-input

This is an article about vulnerabilities that occur when handling user input, such as issue bodies received as context in GitHub Actions, poorly.
It's not that GitHub Actions itself has a vulnerability, but rather that it can become vulnerable depending on the Action or Workflow configuration.
Specifically, directly embedding expression syntax into scripts (e.g., run: echo ${{ event.comment.body }}) carries the risk of executing malicious code.

The article recommends storing input in environment variables before use as a best practice for avoidance.

- name: print title
  env:
    TITLE: ${{ github.event.issue.title }}
  run: echo "$TITLE"

(The above code is quoted from the article)

Summary of using multi-account security services with AWS Organizations - fu3ak1's tech days

https://fu3ak1.hatenablog.com/entry/2021/01/28/002536

This article introduces methods for performing security-related settings as collectively as possible when creating new AWS accounts in a multi-account environment.

In addition to the collective setting methods, it summarizes whether each service supports "Organizations aggregation," "Delegation to members," and "Automatic activation upon account addition" in a clear table. It also includes links to the setup methods, which seems very helpful.

DevOps capabilities | Google Cloud

https://cloud.google.com/solutions/devops/capabilities?hl=en

This is a list of indicators for improving software delivery and organizational performance. It includes descriptions of each indicator, as well as explanations on how to improve and measure them.
It should be a good reference when you want to improve software delivery and organizational performance. However, reading everything might take a significant amount of time.

Explaining the Apple M1 Chip

https://youtu.be/JidLSX4F4ic
This is a video where Techanalye Co., Ltd., a research and analysis company, provides an easy-to-understand explanation of their analysis results for the Apple M1 chip.
They prepare photos of the Apple M1 chip and explain where and what kind of CPUs and GPUs are mounted.
Since the explanation is easy enough for someone who knows nothing about computers to understand, I recommend it to everyone who is interested.
You can learn more by subscribing to the Techanalye Report linked in the video description[3].

Managing Terraform secrets with mozilla/sops - the world as code

https://chroju.dev/blog/terraform_with_sops

When dealing with secrets in Terraform, since you cannot write secrets in plain text in tf files, managing secrets with Terraform often feels difficult.
This article explains how to solve such problems using an encryption tool called SOPS and a Terraform provider called terraform-provider-sops.

By encrypting secrets with SOPS and referencing them from within tf files using terraform-provider-sops, you can manage secrets in the same repository without writing them in plain text in the tf files. It seems that AWS KMS or GCP KMS is used for decryption.

I also had trouble with the same thing before when creating AWS Secrets Manager resources and ended up creating only the Secrets Manager resources via the AWS Console. Using the method in this article seems to make management easier.

[Report] Speeding up CI with Lambda parallel execution #reinvent #ZDC205

https://dev.classmethod.jp/articles/no-more-idling-creating-parallel-builds-using-serverless-ci/

This is a report article on a re:Invent 2020 session about speeding up CI using AWS Lambda.
After verifying reductions in build time and parallel execution of jobs, it tells a story of creating a serverless CI system using Lambda to exceed the limits of parallel execution in existing CI services, thereby speeding up the CI.

Reading this article along with the session video will likely deepen your understanding.

tool

LeakCop

https://leakcop.info/
A service has been announced that monitors GitHub and notifies users if code that should not be public is released. It is possible to monitor just by registering a copyright or specific words. The service is scheduled to start in March 2021, and pre-registration is available.

While I feel it might not be that difficult to build your own, considering the cost of maintenance and operation, using a SaaS like this might be a good idea.

Afterword

There were more topics than usual this week, and it took quite a bit of time to research them as I wrote the article.

Personally, I'm quietly happy about npm v7's monorepo support. Since yarn was superior for creating clean monorepos with JS/TS, switching my mindset was a hassle for me as I usually use npm.
Since I haven't used the npm workspaces feature yet, I'm not sure how it compares to yarn workspaces, so I'd like to check it out.

Also, on a personal note, I'll be speaking to students interested in Cybozu's technology and development culture soon. If any students reading this are interested, I'd be happy if you could join.
https://twitter.com/Shitimi_613/status/1356928413513052161?s=20

The Productivity Improvement Team holds these sharing sessions every week. If you're interested in such a team, click the link below!
https://blog.cybozu.io/entry/2020/08/31/080000

脚注
  1. Previously, people apparently used sites like npmfs to easily check differences. ↩︎

  2. Although it supports many... it seems that PHP, which has a fairly large population, is not supported. ↩︎

  3. For individuals, it seems possible to read for 38,000 yen per year (including back numbers; 26,000 yen for students). ↩︎

GitHubで編集を提案

Discussion