16 Commits

Author SHA1 Message Date
David Gamero
01cfe404ef
Migrate to esbuild/Vitest and upgrade @actions/* to ESM-only versions (#492)
* Migrate build toolchain from ncc/Jest to esbuild/Vitest

Replace the legacy ncc/Jest/Babel build stack with a modern ESM toolchain:

Build:
- Replace @vercel/ncc with esbuild (--platform=node --target=node20 --format=esm)
- Add createRequire banner for CJS interop in ESM bundle
- Add "type": "module" to package.json
- Add tsc --noEmit typecheck script (esbuild strips types without checking)
- Add typecheck to husky pre-commit hook

Dependencies:
- Bump @actions/core@3, exec@3, io@3, tool-cache@4 (ESM-only)
- Replace jest/ts-jest/@babel/* with vitest@4

Tests:
- Convert 29 test files: jest.fn()→vi.fn(), jest.mock()→vi.mock(), jest.spyOn()→vi.spyOn()
- Fix vitest 4 compat: mockImplementation requires args, mock call tracking, await .rejects

CI:
- Update build step from ncc build → npm run build
- Update composite action to use npm run build

* Switch tsconfig to NodeNext module resolution

Change module/moduleResolution from ES2022/bundler to NodeNext/NodeNext
and target from ES2022 to ES2020.

- Add .js extensions to all relative imports across 59 source/test files
  (required by NodeNext module resolution)
- Add vitest/globals to tsconfig types array for global test API declarations
2026-02-24 11:57:56 -08:00
benjamin
ac0b58c9a5
Add timeout to the rollout status (#425)
* Added timeout to the rollout status and tests for it

* Fixed integration test errors

* Fix for blue green integration test

* Probable fix for integration errors

* No jobs run error fixed

* Changed timeout to file level constant

* Added parsing logic for timeout

* Made tests more concise

* implemented timeout validation check in an extracted utils mod

* Changed function name to parseDuration

* Removed timeout parameter from getResource

---------

Co-authored-by: David Gamero <david340804@gmail.com>
Co-authored-by: Suneha Bose <123775811+bosesuneha@users.noreply.github.com>
2025-07-09 10:22:21 -07:00
David Gamero
99510dff95
case-insensitive resource type (#398)
* case-insensitive resource type

* inline error and throw outside switch

* consistent input naming

* catch failed clustertype parse

* protect raw input

* naming

* format
2025-04-16 11:47:29 -04:00
David Gamero
3d107b044d
v5.0.1 Release with Fleet Types (#358)
* extract resource type

* fleet details

* new release with fleet

* format

* type params

* format

* promote input

* format

* fleet type

* format pls
2024-12-09 17:14:44 -05:00
Audra Stump
d1acc1a47b
enable fleet cluster deployment (#356)
* added fleet exception to rollout cmd

* removed fleet check for rollout

* modified casing

* modified approach for fleet check

* tidying up

* defaulting to Microsoft.ContainerService/managedClusters

* ran prettier command

* modified manifest stablity check

* ran prettier check

* moved lowercase check to beginning

---------

Co-authored-by: audrastump <stumpaudra@microsoft.com>
2024-12-06 14:32:48 -05:00
Bram de Hart
a462095a3c
Make annotating resources optional (#287)
* Make annotating resources optional

* Clarify descriptions

* Update README

* Refactor retrieving pods

* Remove annotating resources check in deploy.ts

* Add resource annotation integration test

* Move resource annotation integration test to seperate file

* Lint code

* Remove temporary debugging statements

* Fix integration test name

* Fix test

* Abstracting out repeated logic between verifyDeployment and verifyService

* Fix formattin

* Fix reference

* Fix test

* Refactor test

* Update ubuntu version to latest on canary SMI test

* Update ubuntu version to latest on canary SMI test

* Make annotating resources optional

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>

* Clarify descriptions

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>

* Update README

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>

* Refactor retrieving pods

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>

* Remove annotating resources check in deploy.ts

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>

* Add resource annotation integration test

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>

* Move resource annotation integration test to seperate file

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>

* Lint code

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>

* Remove temporary debugging statements

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>

* Fix integration test name

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>

* Fix test

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>

* Abstracting out repeated logic between verifyDeployment and verifyService

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>

* Fix formattin

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>

* Fix reference

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>

* Fix test

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>

* Refactor test

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>

* Update ubuntu version to latest on canary SMI test

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>

---------

Signed-off-by: Bram de Hart <bram.dehart@nsgo.nl>
2023-10-16 14:28:01 +00:00
Jaiveer Katariya
e9693a7cdd
Added Integration Tests, Resolved Bugs With Annotations (#255)
* First commit - made manifests for test deployments, made manifests for i tests for other deployment strategies

* broke down blue/green

* added latest tags to test manifests for new tags

* remade tester

* ready to test bgi

* using all but first index of argv

* careless error with dicts

* added test to namespace

* realized i was silencing error

* indexing containers

* keyerror

* logging bc python errors are weird

* expected still string

* parsed args behaving weirdly

* test seems to be working now, applying changes to other YAMLs now

* blue/green ready to test

* oops

* oops

* Added additional labels to check

* hyphen

* Added our annotations

* lol

* added our labels to services too

* nonetype issue'

* nonetype issue'

* narrowing down parameter

* fixed annotations issue with promote

* adding debhug statement to figure out why services aren't getting annotations

* this should fix annotations issue for service

* not sure why this wasn't caught by intellisense

* should be fixed with removing comma but adding logs in case

* added linkerd install

* verification

* upgraded kubernetes version

* removing crds

* proxy option

* Added smi extension

* logging service

* smi svcs also getting labeled now

* matching ts type

* not sure where stable service is going

* remaining svc and deployment should match

* keeping stable service and ts object

* updated tests to reflect keeping ts object

* no green svc after promote

* duh

* lol

* canary work

* canary test ready

* logging for ing, filename for canary

* changed ingress svc key and returning svc files from smi canary deployment

* ts name

* forgot about baseline in first deploy

* *

* *

* smi canary should annotate, fixed cleanup

* typescript issue plus percentage

* forgot to type extra method

* removed cleaned up objects from annotate list

* logging because services aren't getting removed

* moving to try/catch strategy of annotation since deletion can fail silently/with warnings

* moved label to individual

* removing canary service check after promote

* pod ready for testing

* set weights to 1000

* selectors

* *

* percentage

* *

* typing

* mixed up pod and smi

* fixed tests

* prettier

* forgot to remove canary

* cleanup

* Added oliver's feedback + more cleanup

* ncc as dev dependency

* npx

* going back to global ncc install bc npm is being weird

* prettier

* removed unnecessary post step
2022-11-01 16:02:57 -04:00
Jaiveer Katariya
d64c205796
Resolved issue with Canary deploy (#247) 2022-10-14 12:25:27 -04:00
Jaiveer Katariya
01a65512ea
Blue/Green Refactor (#229)
* fresh new branch

* Added coverage to gitignore

Signed-off-by: Jaiveer Katariya <jaiveerkatariya@Jaiveers-MBP.lan>

* reverted package-lock.json

Signed-off-by: Jaiveer Katariya <jaiveerkatariya@Jaiveers-MBP.lan>
Co-authored-by: Jaiveer Katariya <jaiveerkatariya@Jaiveers-MBP.lan>
2022-08-12 15:47:05 -04:00
Vidya Reddy
71e93a71d4
Added Traffic split annotations (#215)
* Added Traffic split annotations

* traffic split - blueGreen deployment

* traffic split - canary deployment

* Traffic split annotations - canary deployment

* updated Readme and action.yml

* Traffic split - canary deployment

* clean code

* Clean code

* Clean code

* Create annotation object

* Updated Readme and action.yml

* Spelling correction

Co-authored-by: Vidya Reddy <vidyareddy@microsoft.com>
2022-07-25 13:43:13 -04:00
Hariharan Subramanian
72a09f4051
Logging Changes for Promote, Reject actions (#207) 2022-07-06 10:41:48 -04:00
Vidya
dcd9bc6b1a
Vidya reddy/prettier code (#203) 2022-06-24 16:57:45 -04:00
Oliver King
ca8d2604ac
Massive refactor (#165) 2022-02-02 09:07:53 -05:00
Sundar
29552c24a9
Blue green strategy - Refined some details. (#51)
* Refined some details.

* addressed comments

* updates readme

* Readme cleanup (#1)

* Small updates to readme

* added identified service terminology

* Adressed PR comments

* Added workflow to trigger L2 tests

* Renamed workflow file name

* Trigger integration tests through script and disable post check-in trigger.

Co-authored-by: Anirudh Raghunath <46741940+anraghun@users.noreply.github.com>
Co-authored-by: ajinkya599 <11447401+ajinkya599@users.noreply.github.com>
2020-09-17 12:22:14 +05:30
Sundar
b4bc3003e8
added blue green strategy (#47)
* added blue green strategy

* Addressed review comments

* addressed pr comments

* updated names in test

* addressed final pr comments
2020-07-13 08:59:05 +05:30
Deepak Sattiraju
be01c3f321
Deployment Strategy (#4) (#6) 2019-11-18 21:07:19 +05:30