From a7fcb7d1c96d0997824718c91e65612317599bd3 Mon Sep 17 00:00:00 2001 From: Shardul Vaidya Date: Mon, 19 Feb 2024 13:35:01 -0500 Subject: [PATCH 01/10] Added Workflow to generate docs everytime to ensure they're always up to date --- .github/workflows/ci-docs-workflow.yaml | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/ci-docs-workflow.yaml diff --git a/.github/workflows/ci-docs-workflow.yaml b/.github/workflows/ci-docs-workflow.yaml new file mode 100644 index 0000000..2443877 --- /dev/null +++ b/.github/workflows/ci-docs-workflow.yaml @@ -0,0 +1,26 @@ +name: ci-docs-workflow +run-name: Generating docs for ${{ github.ref }} +on: + pull_request: + branches: + - main + - dev +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install deps + run: npm i + + - name: Generate docs + run: oclif readme + + - name: Commit docs + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git commit -am "Generate docs" + git push From fcba1c048474765fc649c058ec0665e38cd481de Mon Sep 17 00:00:00 2001 From: Shardul Vaidya Date: Mon, 19 Feb 2024 13:35:13 -0500 Subject: [PATCH 02/10] Added Workflow to generate docs everytime to ensure they're always up to date --- .github/workflows/ci-docs-workflow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-docs-workflow.yaml b/.github/workflows/ci-docs-workflow.yaml index 2443877..5d70c27 100644 --- a/.github/workflows/ci-docs-workflow.yaml +++ b/.github/workflows/ci-docs-workflow.yaml @@ -22,5 +22,5 @@ jobs: run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git commit -am "Generate docs" + git commit -am "Generate docs: ${{ github.ref }}" git push From 97d7e5cf7365a24308bbe734c6eccc82d284a82a Mon Sep 17 00:00:00 2001 From: Shardul Vaidya Date: Mon, 19 Feb 2024 13:42:17 -0500 Subject: [PATCH 03/10] Fixed issue with workflow --- .github/workflows/ci-docs-workflow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-docs-workflow.yaml b/.github/workflows/ci-docs-workflow.yaml index 5d70c27..0425468 100644 --- a/.github/workflows/ci-docs-workflow.yaml +++ b/.github/workflows/ci-docs-workflow.yaml @@ -16,7 +16,7 @@ jobs: run: npm i - name: Generate docs - run: oclif readme + run: npx oclif readme - name: Commit docs run: | From 503dc5dd85e60cb441507949eff7ffc2f7c7a323 Mon Sep 17 00:00:00 2001 From: Shardul Vaidya Date: Mon, 19 Feb 2024 13:55:08 -0500 Subject: [PATCH 04/10] Attempting fix of failed push --- .github/workflows/ci-docs-workflow.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-docs-workflow.yaml b/.github/workflows/ci-docs-workflow.yaml index 0425468..7ede0c9 100644 --- a/.github/workflows/ci-docs-workflow.yaml +++ b/.github/workflows/ci-docs-workflow.yaml @@ -6,7 +6,7 @@ on: - main - dev jobs: - build: + docs: runs-on: ubuntu-latest steps: - name: Checkout code @@ -19,8 +19,10 @@ jobs: run: npx oclif readme - name: Commit docs + env: + HEAD_REF: ${{ github.event.workflow_run.head_branch }} run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git commit -am "Generate docs: ${{ github.ref }}" - git push + git push origin HEAD:$HEAD_REF From 8ee3f6aa8b60a9f815e6b2d5fcd9e637bac9995e Mon Sep 17 00:00:00 2001 From: Shardul Vaidya Date: Mon, 19 Feb 2024 14:08:49 -0500 Subject: [PATCH 05/10] Debugging workflow --- .github/workflows/ci-docs-workflow.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-docs-workflow.yaml b/.github/workflows/ci-docs-workflow.yaml index 7ede0c9..68b8ce2 100644 --- a/.github/workflows/ci-docs-workflow.yaml +++ b/.github/workflows/ci-docs-workflow.yaml @@ -22,6 +22,7 @@ jobs: env: HEAD_REF: ${{ github.event.workflow_run.head_branch }} run: | + echo ${{ github.event.workflow_run }} git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git commit -am "Generate docs: ${{ github.ref }}" From f29b379fd77cd098634168060c437a68d1462a2f Mon Sep 17 00:00:00 2001 From: Shardul Vaidya Date: Mon, 19 Feb 2024 14:23:41 -0500 Subject: [PATCH 06/10] Debugging workflow, changing to auto generating docs on pushes to main --- .github/workflows/ci-docs-workflow.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-docs-workflow.yaml b/.github/workflows/ci-docs-workflow.yaml index 68b8ce2..b8d767f 100644 --- a/.github/workflows/ci-docs-workflow.yaml +++ b/.github/workflows/ci-docs-workflow.yaml @@ -1,7 +1,7 @@ name: ci-docs-workflow run-name: Generating docs for ${{ github.ref }} on: - pull_request: + push: branches: - main - dev @@ -19,11 +19,8 @@ jobs: run: npx oclif readme - name: Commit docs - env: - HEAD_REF: ${{ github.event.workflow_run.head_branch }} run: | - echo ${{ github.event.workflow_run }} git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git commit -am "Generate docs: ${{ github.ref }}" - git push origin HEAD:$HEAD_REF + git push From 2a41c5082455681bf5dbf47412724d35cde7be6e Mon Sep 17 00:00:00 2001 From: Shardul Vaidya Date: Tue, 20 Feb 2024 11:45:12 -0500 Subject: [PATCH 07/10] Changed workflow to run npm prepack instead of just oclif readme --- .github/workflows/ci-docs-workflow.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci-docs-workflow.yaml b/.github/workflows/ci-docs-workflow.yaml index b8d767f..5117fd3 100644 --- a/.github/workflows/ci-docs-workflow.yaml +++ b/.github/workflows/ci-docs-workflow.yaml @@ -4,7 +4,6 @@ on: push: branches: - main - - dev jobs: docs: runs-on: ubuntu-latest @@ -16,7 +15,7 @@ jobs: run: npm i - name: Generate docs - run: npx oclif readme + run: npm run prepack - name: Commit docs run: | From b1652420cab3a93309eedb94c57a4941555b10f4 Mon Sep 17 00:00:00 2001 From: Shardul Vaidya Date: Thu, 22 Feb 2024 23:06:39 -0500 Subject: [PATCH 08/10] Added a good enough contribution doc to get people started with sleek-transformer. --- doc/contributing.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 doc/contributing.md diff --git a/doc/contributing.md b/doc/contributing.md new file mode 100644 index 0000000..c68c68b --- /dev/null +++ b/doc/contributing.md @@ -0,0 +1,35 @@ +# Open Source Contribution Guide +Welcome potential contributors! This document provides information and guidelines for contributing to this open +source project. + +### Project Overview +The Sleek transformer is driven to assist partners quickly onboard their helm charts onto the EKS addon +environment (known as Sleek). This system attempts to cover pre-validation checks we conduct before allowing partner +addons into the AWS Console. + +### Getting Started +To add a new command to this CLI, simply add a new file in `./src/commands/` that extends from `SleekCommand`. +Our standard best practice is to separate the static aspects used to generate the OCLIF docs into a separate folder such +as `./src/commandOpts` just to make it easier to read the functional vs. descriptive aspects of code. + +### Command Management +This project uses OCLIF (Open CLI Framework) to manage commands. OCLIF provides a simple yet powerful framework +for building CLI applications in Node.js. With OCLIF, commands are defined as classes that extend the base +Command class. This allows commands to have common properties like name, description, args and flags. + +The commands are then registered with OCLIF via the commands property on the program class. OCLIF takes +care of parsing args, initializing the command class, and executing the command. This makes it easy to add, remove, +and manage commands without having to rewrite the CLI parser. + +### Contribution Workflow + +1. Fork the repo. +2. Make modifications to code/documentation that are relevant to your contribution +3. Ensure the CLI compiles and is still usable: + 1. Run `npm run prepack` in the context of the folder to ensure everything in the build and docs is up to date + 2. Run `npm pack` to package your modifications + 3. Install the modifications to your local environment using `npm i ` + 4. Validate that the modifications you made pass runtime verification. +4. Submit a PR against this repo with your modifications +5. If there's feedback against the PR, address it. +6. Once the maintainers think it's appropriate to merge, they will merge it. From 8c9b7119eb37019975ee75e7fa7424d0cd74120d Mon Sep 17 00:00:00 2001 From: Shardul Vaidya Date: Thu, 22 Feb 2024 23:21:48 -0500 Subject: [PATCH 09/10] Clarified getting started. --- doc/contributing.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/contributing.md b/doc/contributing.md index c68c68b..896fd88 100644 --- a/doc/contributing.md +++ b/doc/contributing.md @@ -12,6 +12,12 @@ To add a new command to this CLI, simply add a new file in `./src/commands/` tha Our standard best practice is to separate the static aspects used to generate the OCLIF docs into a separate folder such as `./src/commandOpts` just to make it easier to read the functional vs. descriptive aspects of code. +This entire CLI is heavily I/O bound, so please try and use Async/Await at appropriate locations. We separate the interface +and logic aspects of the CLI by creating services that are called from the UI classes: +* `./src/commands/` - contains all the interface files +* `./src/services/` - contains all the services and logic +* `./src/commandOpts/` - contains all the interface static properties (used to generate OCLIF documentation) + ### Command Management This project uses OCLIF (Open CLI Framework) to manage commands. OCLIF provides a simple yet powerful framework for building CLI applications in Node.js. With OCLIF, commands are defined as classes that extend the base From 3951535b5e0c3998bf53b9ad272ab9218a0bdf7c Mon Sep 17 00:00:00 2001 From: Shardul Vaidya Date: Thu, 22 Feb 2024 23:30:08 -0500 Subject: [PATCH 10/10] Clarified getting started and added more to project overview. --- doc/contributing.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/contributing.md b/doc/contributing.md index 896fd88..10826ee 100644 --- a/doc/contributing.md +++ b/doc/contributing.md @@ -7,6 +7,9 @@ The Sleek transformer is driven to assist partners quickly onboard their helm ch environment (known as Sleek). This system attempts to cover pre-validation checks we conduct before allowing partner addons into the AWS Console. +The goal is to speed up the iterative process for onboarding partners into the EKS addons environment, increasing the +throughput of partner addons by letting them validate against our checks before they engage with AWS Engineering. + ### Getting Started To add a new command to this CLI, simply add a new file in `./src/commands/` that extends from `SleekCommand`. Our standard best practice is to separate the static aspects used to generate the OCLIF docs into a separate folder such