<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rohit Gohri</title>
    <description>The latest articles on DEV Community by Rohit Gohri (@rohit_gohri).</description>
    <link>https://dev.to/rohit_gohri</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F347399%2F5728878b-23f3-41c0-872c-60f6ae780e14.jpeg</url>
      <title>DEV Community: Rohit Gohri</title>
      <link>https://dev.to/rohit_gohri</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rohit_gohri"/>
    <language>en</language>
    <item>
      <title>Jira CI/CD Integration</title>
      <dc:creator>Rohit Gohri</dc:creator>
      <pubDate>Sun, 08 Aug 2021 05:00:00 +0000</pubDate>
      <link>https://dev.to/rohit_gohri/jira-ci-cd-integration-3l1g</link>
      <guid>https://dev.to/rohit_gohri/jira-ci-cd-integration-3l1g</guid>
      <description>&lt;p&gt;Integrate your CI/CD pipeline's Build and Deployment information into the Jira Development Panel. Enable better&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4qVbeanb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/rohit-gohri/jira-ci-cd-integration/main/docs/builds-panel.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4qVbeanb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/rohit-gohri/jira-ci-cd-integration/main/docs/builds-panel.png" alt="Builds Panel Preview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Only supports Jira Cloud. Does not support Jira Server (hosted)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Generate Credentials
&lt;/h3&gt;

&lt;p&gt;Generate new OAuth Credentials and copy&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;See:&lt;/strong&gt; &lt;a href="https://support.atlassian.com/jira-cloud-administration/docs/integrate-with-self-hosted-tools-using-oauth/"&gt;https://support.atlassian.com/jira-cloud-administration/docs/integrate-with-self-hosted-tools-using-oauth/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--P31zHbtb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/rohit-gohri/jira-ci-cd-integration/main/docs/oauth-creds.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P31zHbtb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/rohit-gohri/jira-ci-cd-integration/main/docs/oauth-creds.png" alt="OAuth Creds Screen"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Use with Any CI/CD Provider
&lt;/h2&gt;

&lt;p&gt;As long as your CI/CD provider supports running Docker images you may use this integration. Tested in Drone.io, Gitlab CI, and Google Cloud Run.&lt;/p&gt;

&lt;p&gt;Docker Images are available from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gitlab Container Registry: &lt;code&gt;registry.gitlab.com/rohit-gohri/jira-ci-cd-integration&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Github Container Registry: &lt;code&gt;ghcr.io/rohit-gohri/jira-ci-cd-integration&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Docker Hub: &lt;code&gt;boringdownload/jira-integration&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pick whatever you want and is convenient for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Set Env Vars
&lt;/h3&gt;

&lt;p&gt;Configuration for the Docker image is through env vars. Read more in &lt;a href="https://github.com/rohit-gohri/jira-ci-cd-integration#options"&gt;options&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Jira-Gitlab CI/CD
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://gitlab.com/rohit-gohri/jira-ci-cd-integration/-/commits/v0"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--W52GHKXR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://gitlab.com/rohit-gohri/jira-ci-cd-integration/badges/v0/pipeline.svg" alt="pipeline status"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.gitlab.com/ee/ci/variables/#add-a-cicd-variable-to-a-project"&gt;Add a CI/CD Variable to your project&lt;/a&gt; for &lt;code&gt;JIRA_CLIENT_ID&lt;/code&gt; and &lt;code&gt;JIRA_CLIENT_SECRET&lt;/code&gt; (remember to mask them) and then add these steps to your pipeline (we use &lt;code&gt;.post&lt;/code&gt; stage so it runs last)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;jira-integration-on-success:
  stage: .post
  when: on_success
  image: registry.gitlab.com/rohit-gohri/jira-ci-cd-integration:v0
  script: jira-integration
  variables:
    BUILD_STATE: successful
    BUILD_NAME: gitlab-pipeline
    JIRA_INSTANCE: companyname

jira-integration-on-failure:
  extends: jira-integration-on-success
  when: on_failure
  variables:
    BUILD_STATE: failure

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Jira-Drone.io Example
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://cloud.drone.io/rohit-gohri/jira-ci-cd-integration"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U5bv3nOz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cloud.drone.io/api/badges/rohit-gohri/jira-ci-cd-integration/status.svg%3Fref%3Drefs/tags/v0" alt="Build Status"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add secrets for &lt;code&gt;JIRA_CLIENT_ID&lt;/code&gt; and &lt;code&gt;JIRA_CLIENT_SECRET&lt;/code&gt; and then add this to your pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;steps:
  - name: jira-integration
    image: boringdownload/jira-integration:v0
    environment:
      BUILD_NAME: drone-pipeline
      JIRA_INSTANCE: companyname
      JIRA_CLIENT_ID:
        from_secret: jira_client_id
      JIRA_CLIENT_SECRET:
        from_secret: jira_client_secret

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Usage With Github Actions
&lt;/h2&gt;

&lt;p&gt;You can also use this as a Github Action if you want to send release information to Jira.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/rohit-gohri/jira-ci-cd-integration/actions/workflows/test-release.yml"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iQa2arBS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/rohit-gohri/jira-ci-cd-integration/actions/workflows/test-release.yml/badge.svg" alt="test-release workflow"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Add OAuth Creds as secrets to Github
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;See:&lt;/strong&gt; &lt;a href="https://docs.github.com/en/actions/reference/encrypted-secrets"&gt;https://docs.github.com/en/actions/reference/encrypted-secrets&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add Client ID as &lt;code&gt;JIRA_CLIENT_ID&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Add Client Secret as &lt;code&gt;JIRA_CLIENT_SECRET&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GutPbYs1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/rohit-gohri/jira-ci-cd-integration/main/docs/github-secrets.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GutPbYs1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/rohit-gohri/jira-ci-cd-integration/main/docs/github-secrets.png" alt="Github Secrets"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Update Github Workflow
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Use in Builds Pipeline
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- name: Jira Integration
  if: ${{ always() }}
  uses: rohit-gohri/jira-ci-cd-integration@v0
  with:
    event_type: build
    state: ${{ job.status }}
    jira_instance: companyname # Subdomain for Jira Cloud
    client_id: ${{ secrets.JIRA_CLIENT_ID }}
    client_secret: ${{ secrets.JIRA_CLIENT_SECRET }}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Use in Deployment Pipeline
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- name: Jira Integration
  if: ${{ always() }}
  uses: rohit-gohri/jira-ci-cd-integration@v0
  with:
    event_type: deployment
    state: ${{ job.status }}
    issue: JCI-3, JCI-6 # Comma separated list of issues being deployed/released. You are expected to generate this yourself in a previous step
    jira_instance: companyname # Subdomain for Jira Cloud
    client_id: ${{ secrets.JIRA_CLIENT_ID }}
    client_secret: ${{ secrets.JIRA_CLIENT_SECRET }}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>jira</category>
      <category>devops</category>
      <category>gitlab</category>
      <category>drone</category>
    </item>
    <item>
      <title>OpenAPI for Docusaurus! 📘</title>
      <dc:creator>Rohit Gohri</dc:creator>
      <pubDate>Tue, 19 Jan 2021 17:30:00 +0000</pubDate>
      <link>https://dev.to/rohit_gohri/openapi-for-docusaurus-cnf</link>
      <guid>https://dev.to/rohit_gohri/openapi-for-docusaurus-cnf</guid>
      <description>&lt;p&gt;Introducing "Redocusaurus": &lt;a href="https://github.com/redocly/redoc" rel="noopener noreferrer"&gt;Redoc&lt;/a&gt; for &lt;a href="https://v2.docusaurus.io/" rel="noopener noreferrer"&gt;Docusaurus&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://npmjs.com/package/redocusaurus/" rel="noopener noreferrer"&gt;Redocusaurus&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://npmjs.com/package/redocusaurus/" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.shields.io%2Fnpm%2Fdw%2Fredocusaurus" alt="npm downloads"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is it?
&lt;/h2&gt;

&lt;p&gt;It is a preset that allows you to easily integrate OpenAPI documentation into your docs site made with docusaurus. It has 2 main components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/rohit-gohri/redocusaurus/tree/main/packages/docusaurus-theme-redoc" rel="noopener noreferrer"&gt;docusaurus-theme-redoc&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using Redoc as a React component, this provides 2 theme components, &lt;code&gt;@theme/ApiDoc&lt;/code&gt; and &lt;code&gt;@theme/Redoc&lt;/code&gt;. You can use them directly in js pages in Docusaurus.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/rohit-gohri/redocusaurus/tree/main/packages/docusaurus-plugin-redoc" rel="noopener noreferrer"&gt;docusaurus-plugin-redoc&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This creates routes from your OpenAPI files or URLs and renders with the components provided by the theme.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to set it up?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Install the preset&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

npm i --save redocusaurus



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Add it to your &lt;code&gt;docusaurus.config.js&lt;/code&gt;:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

module.exports = {
 // ...
 presets: [
   // ... Other preset configs
   [
     'redocusaurus',
     {
       specs: [{
         route: '/api/',
         spec: 'https://redocly.github.io/redoc/openapi.yaml',
       }],
     }
   ],
 ],
 // ...
};



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;Rebuild your site and you will have your OpenAPI docs available at the &lt;code&gt;/api/&lt;/code&gt; route.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Extra features over directly using Redoc
&lt;/h2&gt;

&lt;p&gt;The theme includes redoc settings and some custom css to make it match the &lt;code&gt;@docusaurus/classic&lt;/code&gt; theme. Along with support for &lt;strong&gt;Dark Mode&lt;/strong&gt; and &lt;strong&gt;Server Side Rendering&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Docs
&lt;/h2&gt;

&lt;p&gt;Find the docs and examples at the website : &lt;a href="https://redocusaurus.vercel.app/" rel="noopener noreferrer"&gt;https://redocusaurus.vercel.app/&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Github Repo
&lt;/h2&gt;

&lt;p&gt;Find the source and know more on &lt;a href="https://github.com/rohit-gohri/redocusaurus" rel="noopener noreferrer"&gt;Github.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/rohit-gohri/redocusaurus" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.shields.io%2Fgithub%2Fstars%2Frohit-gohri%2Fredocusaurus%3Fstyle%3Dsocial" alt="github badge"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>openapi</category>
      <category>docs</category>
      <category>react</category>
      <category>documentation</category>
    </item>
    <item>
      <title>The Hidden Cost of AWS ELBs</title>
      <dc:creator>Rohit Gohri</dc:creator>
      <pubDate>Tue, 01 Sep 2020 13:00:00 +0000</pubDate>
      <link>https://dev.to/rohit_gohri/the-hidden-cost-of-aws-elbs-49k9</link>
      <guid>https://dev.to/rohit_gohri/the-hidden-cost-of-aws-elbs-49k9</guid>
      <description>&lt;p&gt;This past month we had a really high AWS bill, and it was supposed to be high but not THIS high. The culprit - "Data Transfer Out". I'm sure I'm not the only one who has had to deal with this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Some Context
&lt;/h2&gt;

&lt;p&gt;We had a NodeJS service running on EC2 in an Auto Scaling Group (ASG) behind an Application Load Balancer (ALB) that was supposed to handle a huge volume of requests. We were expecting a consistent increase in traffic this month, so we had made estimates on how it would affect our costs. We had expected some high data transfer out of our Application Load Balancer (ALB) but this was a consistent 4-5x of our estimates. Time to investigate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Analysing the Data
&lt;/h2&gt;

&lt;p&gt;After filtering Cost Explorer data with tags, it was clear that the ALB was the source of these costs. I immediately went to CloudWatch and checked the "Processed Bytes" metric of the ALB.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cloud Watch
&lt;/h3&gt;

&lt;p&gt;Processed Bytes is supposed to be &lt;em&gt;"the total number of bytes processed by the load balancer over IPv4 and IPv6 ... includes traffic to and from clients"&lt;/em&gt;, so ideally Processed Bytes should be greater than the "Data Transfer Out". But it was not..?&lt;/p&gt;

&lt;p&gt;Our stats showed Processed Bytes to be around what our estimates had predicted for this amount of traffic. But Cost Explorer was showing a number that was 4-5 times that. Time to contact support.&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS Support
&lt;/h3&gt;

&lt;p&gt;We raised a support request to AWS, but we didn't have high hopes because we were not on the premium support plan. But it was worth a shot.&lt;/p&gt;

&lt;h3&gt;
  
  
  ELB Access Logs
&lt;/h3&gt;

&lt;p&gt;Next up, we enabled ALB Access Logs to an S3 bucket and let it generate some logs for some time. Upon checking the logs, we were certain that this wasn't a problem at the application level. The access logs showed response size consistent with what we had estimated, no inflation due to extra headers or something like that.&lt;/p&gt;

&lt;h3&gt;
  
  
  VPC Flow Logs
&lt;/h3&gt;

&lt;p&gt;We wondered if there was some other service running that might be communicating over an Elastic IP or public IP instead of a private IP. To check that, we enabled VPC Flow logs to another S3 bucket and let it generate some logs for some time.&lt;/p&gt;

&lt;p&gt;We didn't find any services that might be communicating over Elastic IP but we did find some services that could be moved to the same Availability Zone (AZ) and reduced some Regional Data Transfer costs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frantic Googling
&lt;/h2&gt;

&lt;p&gt;After eliminating all possible sources of Data Transfer we still had no clue what was the source of the Cost other than that it was from the ALB. This led to frantic googling and sending/explaining the problem statement to various people.&lt;/p&gt;

&lt;p&gt;Then over the weekend, trying to think of keywords that would not lead me down to more documentation, I finally found this &lt;a href="https://stackoverflow.com/a/55259794"&gt;StackOverflow answer&lt;/a&gt;:&lt;/p&gt;


&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;h1&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7Gn-iPj_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
            &lt;a href="https://stackoverflow.com/questions/55259424/aws-elb-how-can-i-see-how-many-bytes-of-outbound-network-traffic-an-ssl-enabled" rel="noopener noreferrer"&gt;
              
            &lt;/a&gt;
        &lt;/h1&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Mar 20 '19&lt;/span&gt;
            &lt;span&gt;Comments: 5&lt;/span&gt;
            &lt;span&gt;Answers: 1&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/55259424/aws-elb-how-can-i-see-how-many-bytes-of-outbound-network-traffic-an-ssl-enabled" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y9mJpuJP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          0
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wif5Zq3z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;I'm curious to know how much total outbound bytes an ELB generates.  As far as I can tell, this will be something like&lt;/p&gt;
&lt;p&gt;(size of http responses) + (size of SSL handshake transactions)&lt;/p&gt;

&lt;p&gt;I can calculate the former by looking at my web server logs.  However, I'm having a hard…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    
      &lt;a href="https://stackoverflow.com/questions/55259424/aws-elb-how-can-i-see-how-many-bytes-of-outbound-network-traffic-an-ssl-enabled" rel="noopener noreferrer"&gt;Open Full Question&lt;/a&gt;
    
  &lt;/div&gt;
&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;A. The handshake of a TLS connection is pretty much constant and do not depend on your application. So your function is really : number of connections * ( size of http responses + constant)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And it finally clicked, the missing piece of the puzzle. Since HTTPS was handled directly by the ALB, it wouldn't show in the Access Logs as the instance didn't have to deal with it.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://netsekure.org/2010/03/tls-overhead/"&gt;Here&lt;/a&gt; is an article that estimates the payload to average ~6.5k (depending on your certificate size). Our response sizes were really small, and this could be a major part of the response size if the user was visiting the site for the first time. Since a lot of the traffic was new, it would be a significant chunk.&lt;/p&gt;

&lt;p&gt;That led to even more Googling on how HTTPS might affect AWS ELB costs and we came upon &lt;a href="https://gameanalytics.com/blog/reduce-costs-https-api-aws.html"&gt;this very good article&lt;/a&gt; that also suggested increasing the default timeout for idle connections to 10 minutes for the ALB along with changing the certificate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing Different HTTPS Certs
&lt;/h2&gt;

&lt;p&gt;We were currently using the default certificate generated by Amazon Certificate Manager (ACM) with the Load Balancer. We tested the size of the TLS handshake with &lt;a href="https://www.wormly.com/test_ssl"&gt;Wormly Test SSL Tool&lt;/a&gt; and then replaced it with one generated with Let's Encrypt. To be thorough we also tested TLS handshake sizes of different websites with different Certificate Authorities.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Certificate Issuer&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Certificate Type&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;SSL Handshake Size (Bytes)&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;ACM&lt;/td&gt;
&lt;td&gt;Wildcard (RSA 2048 bits)&lt;/td&gt;
&lt;td&gt;5971&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Let's Encrypt&lt;/td&gt;
&lt;td&gt;Single (RSA 2048 bits)&lt;/td&gt;
&lt;td&gt;3753&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Let's Encrypt&lt;/td&gt;
&lt;td&gt;Wildcard (RSA 2048 bits)&lt;/td&gt;
&lt;td&gt;3702&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Let's Encrypt&lt;/td&gt;
&lt;td&gt;Wildcard (ECC 256 bits)&lt;/td&gt;
&lt;td&gt;3323&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DigiCert&lt;/td&gt;
&lt;td&gt;Single (ECC 256 bits)&lt;/td&gt;
&lt;td&gt;3311&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sectigo&lt;/td&gt;
&lt;td&gt;Wildcard (RSA 2048 bits)&lt;/td&gt;
&lt;td&gt;6720&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;DigiCert was the best with respect to size, but Let's Encrypt was close enough (&amp;amp; free!). ECC certificates are not compatible with some older browsers, so we generated both the smaller ECC and RSA certificates through &lt;a href="https://github.com/acmesh-official/acme.sh/"&gt;acme.sh&lt;/a&gt; and uploaded them through AWS CLI. The ALB will automatically select the best one depending on the client (read more &lt;a href="https://aws.amazon.com/blogs/aws/new-application-load-balancer-sni/"&gt;here&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;After adding them to the ALB listener and letting Cost Explorer catch up for a day, we saw a significant decrease in our Data Transfer Out Costs for the same number of requests.&lt;/p&gt;

&lt;p&gt;It was still not equal to the estimates we had, but it will never be because we never considered the TLS handshake size in our estimates. AWS Costs really are a mystery until you actually get the bill.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>infrastructure</category>
      <category>devops</category>
    </item>
    <item>
      <title>CI/CD for your Resume!</title>
      <dc:creator>Rohit Gohri</dc:creator>
      <pubDate>Fri, 28 Aug 2020 20:08:44 +0000</pubDate>
      <link>https://dev.to/rohit_gohri/ci-cd-for-your-resume-541h</link>
      <guid>https://dev.to/rohit_gohri/ci-cd-for-your-resume-541h</guid>
      <description>&lt;p&gt;After ending up with countless PDFs of my resume and never being sure of which one is the final version. I decided to start versioning it with the tool I already knew, Git. After finding a good enough LaTeX template, a &lt;code&gt;git init&lt;/code&gt;, and some commits later, I had a good enough resume template with a working Github Action that would publish the generated PDF as a release artifact on every tag. I also added generated PDFs as build artifacts for every commit to preview changes without having access to a working LaTeX env, so that one may be able to make edits from their phone.&lt;/p&gt;

&lt;h3&gt;
  
  
  My Workflow
&lt;/h3&gt;

&lt;p&gt;I simply edit the &lt;code&gt;tex&lt;/code&gt; file using the Web Editor and commit my changes. The "Preview" workflow will build and generate a pdf that I can preview using the build artifact. &lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SlBm9iFQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vn4gw2ao2lizjrv104g1.png" alt="Preview Workflow" width="880" height="269"&gt;
&lt;/h4&gt;

&lt;p&gt;Once I'm satisfied with the edits, I will create a new release, this will trigger the "Release" pipeline. It will build and publish the pdf as a release artifact.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oa_wpl9_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2gtgdln4ler0yoqitu74.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oa_wpl9_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2gtgdln4ler0yoqitu74.png" alt="Release Workflow" width="880" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The release is what allows me to always have access to the latest version of my resume at the &lt;code&gt;/releases/latest/download/Preview.pdf&lt;/code&gt; path of my repository. &lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://github.com/rohit-gohri/resume-template/releases/latest/download/Preview.pdf"&gt;Download latest version&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;More than that, I can preview it directly in my browser using Google Docs by using &lt;code&gt;https://docs.google.com/viewer?url=https://github.com/&amp;lt;username&amp;gt;/&amp;lt;repo&amp;gt;/releases/latest/download/Preview.pdf&lt;/code&gt;. I can create a short url of this that I can give to anyone knowing it'll always point to the latest resume without having to worry about updating it.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://docs.google.com/viewer?url=https://github.com/rohit-gohri/resume-template/releases/latest/download/Preview.pdf"&gt;Preview latest version using Google Docs&lt;/a&gt;
&lt;/h4&gt;

&lt;h3&gt;
  
  
  Submission Category: Wacky Wildcards
&lt;/h3&gt;

&lt;p&gt;When I first realized I could basically code my resume in LaTeX, it finally stopped becoming something I dreaded doing and became something I actively wanted to improve. Adding CI/CD to it was the next natural step.&lt;/p&gt;

&lt;h3&gt;
  
  
  Yaml File or Link to Code
&lt;/h3&gt;

&lt;p&gt;This is a Github Template Project with a LaTeX resume template and Github Workflows. You may use this template or add your own LaTeX files to build those.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/rohit-gohri"&gt;
        rohit-gohri
      &lt;/a&gt; / &lt;a href="https://github.com/rohit-gohri/resume-template"&gt;
        resume-template
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      1 Page LaTeX Resume template with CI/CD 
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
Resume&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://github.com/rohit-gohri/resume-template/actions?query=branch%3Amaster"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h3G0fqzV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/rohit-gohri/resume-template/workflows/Preview/badge.svg%3Fbranch%3Dmaster" alt="Build Status"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer" href="https://github.com/rohit-gohri/resume-template/workflows/Release/badge.svg"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SwMmoHSd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/rohit-gohri/resume-template/workflows/Release/badge.svg" alt="Release"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Automatically built resume with LaTeX. The structure for sections is defined in &lt;code&gt;resume.cls&lt;/code&gt; file. While the content is in &lt;code&gt;resume.tex&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Based on the &lt;a href="https://www.overleaf.com/latex/templates/cv-for-freshers/jkpwvnrdrxpm" rel="nofollow"&gt;CV For Freshers&lt;/a&gt; template on Overleaf.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;
&lt;a href="https://docs.google.com/viewer?url=https://github.com/rohit-gohri/resume-template/releases/latest/download/Preview.pdf" rel="nofollow"&gt;Preview latest version&lt;/a&gt;
&lt;/h4&gt;
&lt;h4&gt;
&lt;a href="https://github.com/rohit-gohri/resume-template/releases/latest/download/Preview.pdf"&gt;Download latest version&lt;/a&gt;
&lt;/h4&gt;
&lt;h4&gt;
&lt;a href="https://github.com/rohit-gohri/resume"&gt;My Resume&lt;/a&gt;
&lt;/h4&gt;
&lt;h2&gt;
Resources&lt;/h2&gt;
&lt;h3&gt;
Blog Post: &lt;a href="https://rohit.page/blog/projects/ci-cd-for-your-resume-wth-this-github-template/?utm_source=github&amp;amp;utm_medium=repo&amp;amp;utm_campaign=hf" rel="nofollow"&gt;CI/CD for your Resume&lt;/a&gt;
&lt;/h3&gt;
&lt;h3&gt;
Links&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/luong-komorebi/Begin-Latex-in-minutes"&gt;Begin Latex&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/dspinellis/latex-advice"&gt;Latex Advice&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://tex.stackexchange.com/questions/553/what-packages-do-people-load-by-default-in-latex" rel="nofollow"&gt;Useful Packages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.overleaf.com/" rel="nofollow"&gt;Overleaf&lt;/a&gt;: Online Editor&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.overleaf.com/latex/templates/cv-for-freshers/jkpwvnrdrxpm" rel="nofollow"&gt;Original Template&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Automatic &lt;a href="https://github.com/rohit-gohri/resume-template/actions"&gt;builds&lt;/a&gt; with Github Actions on every push and automatic &lt;a href="https://github.com/rohit-gohri/resume-template/releases"&gt;releases&lt;/a&gt; on publishing tags&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Using as a template&lt;/h2&gt;
&lt;p&gt;Use the green &lt;strong&gt;"Use this template"&lt;/strong&gt; button to create a new repository with this repository's files as a template. There are two files only:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;resume.cls&lt;/code&gt;: Defines the structure and all the custom commands. No need to modify this.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;resume.tex&lt;/code&gt;: This is the file where all your content for the resume goes. Your name, email, links, etc. are defined through commands. Feel free to move things around and change them.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If there…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/rohit-gohri/resume-template"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  Additional Resources / Info
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;My Resume that is using a similar workflow, but with some added integrations to sync my blog with the latest version of my resume: &lt;a href="https://github.com/rohit-gohri/resume"&gt;resume&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>actionshackathon</category>
      <category>career</category>
      <category>devops</category>
      <category>resume</category>
    </item>
    <item>
      <title>How to get ESlint and Prettier to play nice in VS Code?</title>
      <dc:creator>Rohit Gohri</dc:creator>
      <pubDate>Tue, 28 Apr 2020 18:30:00 +0000</pubDate>
      <link>https://dev.to/rohit_gohri/how-to-get-eslint-and-prettier-to-play-nicely-in-vs-code-3hfo</link>
      <guid>https://dev.to/rohit_gohri/how-to-get-eslint-and-prettier-to-play-nicely-in-vs-code-3hfo</guid>
      <description>&lt;p&gt;Do you have your project setup with both Prettier and Eslint? Do you want them to run in a specific order instead of &lt;a href="https://prettier.io/docs/en/integrating-with-linters.html#use-eslint-to-run-prettier"&gt;using ESLint to run prettier?&lt;/a&gt; Here's how to set your own order in VS Code with this extension:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://marketplace.visualstudio.com/items?itemName=rohit-gohri.format-code-action"&gt;Visual Studio Code Market Place: Format Code Action&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2RaAJ6yl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://vsmarketplacebadge.apphb.com/version-short/rohit-gohri.format-code-action.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2RaAJ6yl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://vsmarketplacebadge.apphb.com/version-short/rohit-gohri.format-code-action.svg" alt="Version" width="140" height="20"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;This extension will register a new &lt;a href="https://code.visualstudio.com/updates/v1_23#_run-code-actions-on-save"&gt;"codeAction"&lt;/a&gt; which will run 'Format Document' using the default formatter (prettier in our case) in VS Code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source.fixAll.format

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using this and the &lt;code&gt;editor.codeActionsOnSave&lt;/code&gt; setting in VS Code you can specify the order in which to run the eslint codeAction, &lt;code&gt;source.fixAll.eslint&lt;/code&gt;, and format document.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Requires: VS Code 1.44+&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Install through VS Code extensions:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=rohit-gohri.format-code-action"&gt;Visual Studio Code Market Place: Format Code Action&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Can also be installed in VS Code: Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ext install rohit-gohri.format-code-action

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;p&gt;You will need both the &lt;a href="https://github.com/prettier/prettier-vscode"&gt;&lt;code&gt;prettier-vscode&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://github.com/microsoft/vscode-eslint"&gt;&lt;code&gt;vscode-eslint&lt;/code&gt;&lt;/a&gt; extensions installed for this config to work.Disbale &lt;code&gt;formatOnSave&lt;/code&gt; and use the &lt;code&gt;source.fixAll.format&lt;/code&gt; codeAction in whatever order you want with VS Code settings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  "editor.formatOnSave": false,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.codeActionsOnSave": [
    "source.fixAll.format",
    "source.fixAll.eslint"
  ]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This runs 'Format Document' with the default formatter (in this case prettier) and then &lt;code&gt;eslint --fix&lt;/code&gt; for all document types.&lt;/p&gt;

&lt;h3&gt;
  
  
  Or for a specific lanuage only:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "[javascript]": {
    "editor.formatOnSave": false,
    "editor.codeActionsOnSave": [
        "source.fixAll.format",
        "source.fixAll.eslint"
    ]
  },

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This would run prettier by default, but for javascript files would run prettier and then eslint. If you want to reverse the order then just reverse the array.&lt;/p&gt;

&lt;h2&gt;
  
  
  Motivation
&lt;/h2&gt;

&lt;p&gt;I wanted to use prettier and eslint together, to override some of prettier's mpre opinionated style rules with a eslint config (particularly &lt;a href="https://github.com/prettier/eslint-config-prettier/issues/26"&gt;brace-style&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Instead of using workarounds like &lt;a href="https://github.com/prettier/prettier-eslint"&gt;&lt;code&gt;prettier-eslint&lt;/code&gt;&lt;/a&gt; which don't work for all eslint configurations as it hasn't been updated to work with &lt;a href="https://github.com/prettier/prettier-eslint/issues/222"&gt;eslint v6 properly&lt;/a&gt;. We can simply run prettier and eslint one by one like one would do on the command line. Here is how that looks like in my &lt;code&gt;package.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  "scripts": {
    "format": "npm run prettier:fix &amp;amp;&amp;amp; npm run lint:fix",
    "lint": "eslint src --ext=js",
    "lint:fix": "npm run lint -- --fix",
    "prettier": "prettier -c",
    "prettier:fix": "npm run prettier -- --write"
  }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;npm run format&lt;/code&gt; command allows me to fix some of the prettier formatting with eslint by running them both in an order. I wanted to replicate this same behavior with my editor's "Format on Save" functionality.&lt;/p&gt;

&lt;p&gt;VS Code only allows setting one default formatter. So I could either run Prettier or run ESLint on save. That was until it introduced &lt;a href="https://code.visualstudio.com/updates/v1_23#_run-code-actions-on-save"&gt;"codeActionsOnSave"&lt;/a&gt;. This separated formatters and "Source" fixers like &lt;code&gt;vscode-eslint&lt;/code&gt;. This is how one would enable both prettier and eslint in VS Code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
  "source.fixAll.eslint": true
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But this would often lead to prettier being run after eslint, and eslint errors still being present as this defined no order for formatters and coder actions.&lt;/p&gt;

&lt;p&gt;Since the &lt;a href="https://code.visualstudio.com/updates/v1_44#_explicit-ordering-for-code-actions-on-save"&gt;March 2020 (v1.44)&lt;/a&gt; update, VS Code allows setting &lt;code&gt;codeActionsOnSave&lt;/code&gt; as an array. This allows setting the order of the code actions.&lt;/p&gt;

&lt;p&gt;This extension uses the &lt;a href="https://code.visualstudio.com/api/references/vscode-api#CodeActionProvider"&gt;&lt;code&gt;CodeActionProvider&lt;/code&gt;&lt;/a&gt; api to implement a simple code action that runs 'Format Document' on the current file. This allows us to disable &lt;code&gt;formatOnSave&lt;/code&gt; and use it as a codeAction instead in a specific order with other extensions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Source
&lt;/h2&gt;

&lt;p&gt;You can find the source on Github:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/rohit-gohri/vscode-format-code-action"&gt;vscode-format-code-action&lt;/a&gt; &lt;a href="https://github.com/rohit-gohri/vscode-format-code-action"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Exopn8ox--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://img.shields.io/github/stars/rohit-gohri/vscode-format-code-action%3Fstyle%3Dsocial" alt="github badge" width="76" height="20"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>eslint</category>
      <category>prettier</category>
      <category>formatter</category>
      <category>vscode</category>
    </item>
    <item>
      <title>DangerJS Plugin - TODOs</title>
      <dc:creator>Rohit Gohri</dc:creator>
      <pubDate>Mon, 16 Mar 2020 18:30:00 +0000</pubDate>
      <link>https://dev.to/rohit_gohri/dangerjs-plugin-todos-3gk1</link>
      <guid>https://dev.to/rohit_gohri/dangerjs-plugin-todos-3gk1</guid>
      <description>&lt;h2&gt;
  
  
  What is It?
&lt;/h2&gt;

&lt;p&gt;A plugin for &lt;a href="https://danger.systems/js"&gt;danger-js&lt;/a&gt; that collects all the "TODO" comments introduced in a pull request (PR) and posts them as a comment on the PR.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.npmjs.com/package/danger-plugin-todos"&gt;NPM JS - Danger Plugin Todos&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;It's a pretty simple plugin that just scans your diff for matching comments, it supports different language style comments including JS, C, C++, Ruby, Java, Elm, HTML, Bash, etc. (&lt;a href="https://github.com/rohit-gohri/danger-plugin-todos/issues"&gt;open an issue&lt;/a&gt; if something is missing). You can also specify custom keywords other than "TODO" or "FIXME".&lt;/p&gt;

&lt;h2&gt;
  
  
  How to set it up?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Set up &lt;a href="https://danger.systems/js"&gt;danger-js&lt;/a&gt; and add it to your continuous integration (CI) pipeline&lt;/li&gt;
&lt;li&gt;Add &lt;a href="https://www.npmjs.com/package/danger-plugin-todos"&gt;danger-plugin-todos&lt;/a&gt; to the "dangerfile" as mentioned in the README&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Next time your CI pipeline runs for any PR this plugin will scan the diff to get all the To-Do comments and post them through danger as a comment on the PR. The comment will update on consecutive runs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Possible Workflows
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Scenario A:
&lt;/h4&gt;

&lt;p&gt;Sometimes when you start work on a feature you see things along the way that need to be fixed and you end up adding a To-Do or Fix-Me comment for them. The feature branch then gets merged and the comments quickly gets forgotten if they were not related to a part of the code base that sees frequent updates.&lt;/p&gt;

&lt;p&gt;To track such To-Dos this plugin can be used, as a list of them will be added as a comment to the PR. This list of To-Dos can then be moved to a new issue before the PR is merged and the issue added to the backlog.&lt;/p&gt;

&lt;h4&gt;
  
  
  Scenario B:
&lt;/h4&gt;

&lt;p&gt;This plugin can also be used to create an actual auto-updating To-Do List.&lt;/p&gt;

&lt;p&gt;Just add all your tasks for the PR in the code as To-Dos and open a Work In Progress (WIP) PR, this will create a list of To-Dos in the PR comments.&lt;/p&gt;

&lt;p&gt;Now, as you work on them and remove them the comment will be updated and your list will become smaller. Once you are done with them the PR will be ready to merge.&lt;/p&gt;

&lt;h2&gt;
  
  
  More Features Incoming
&lt;/h2&gt;

&lt;p&gt;There are some new ideas that are being worked on (&lt;a href="https://github.com/rohit-gohri/danger-plugin-todos/issues"&gt;check the issues here&lt;/a&gt;), like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Generate a link to create a new issue with a list of To-Dos automatically&lt;/strong&gt; : This would be pretty great for our Scenario A above. Link can be customized to support different issue trackers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Show completed To-Dos&lt;/strong&gt; : PRs that complete and remove old To-Dos should be celebrated. This would add a success message on removing old To-Dos.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Anyways, I hope this is useful for you. If you have any ideas on how to make this better feel free to message me on &lt;a href="https://twitter.com/rohit_gohri"&gt;Twitter&lt;/a&gt; or open an issue on the repo.&lt;/p&gt;

</description>
      <category>cicd</category>
      <category>npm</category>
      <category>pr</category>
      <category>todo</category>
    </item>
  </channel>
</rss>
