267 Commits

Author SHA1 Message Date
ashmrtn
3e3c21ab1b
Update purge CI task (#1193)
## Description

Add a call to the purge job for the secondary CI test user. Requires an update to the workflow secrets to populate the secondary user name.

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [x] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

* #1185 

## Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-10-18 17:01:48 +00:00
Abin Simon
a9acbc28f5
Rework build.sh script (#1167)
## Description

While trying to work on https://github.com/alcionai/corso/issues/1166, I ended up reworking parts of the build script ~, but I'm running into some issues with building it on CI. Pushing it here just for reference.~

The new one combines both `build.sh` and `build-container.sh` into a single script where you can specify what to build. Also, inorder setup a proper multi arch, build system locally, we will have to properly setup buildx which is explained in https://docs.docker.com/build/building/multi-platform/ or https://stackoverflow.com/a/70837025/2724649 . I'll add this instructions to docs.

The new build script looks something like this:

```
Usage: build.sh <binary|image> [--platforms ...] [--tag ...]

OPTIONS
 -p|--platforms  Platforms to build for (default: linux/amd64)
                 Specify multiple platforms using ',' (eg: linux/amd64,darwin/arm)
 -t|--tag        Tag for container image (default: alcionai/corso)
```

---
I've made sure the image and binary has the proper architecure and that the amd64 one runs properly in my system. It would be helpful if someone who has access to arm system can validate the arm image. You can use https://github.com/alcionai/corso/pkgs/container/corso/45878348?tag=84fc9d4 image to verify.

```
$ cat check-image.sh
imgid="$(docker create "$1")"
docker cp "$imgid:corso" /tmp/corso

echo Image: "$(docker inspect "$1" | jq '.[0].Architecture')"
echo Binary: "$(file /tmp/corso)"

$ ./check-image.sh ghcr.io/alcionai/corso:84fc9d4@sha256:2278a2b4f108e5dd2ae545f53da1d151b77171f969ffd9718e4bb9886e332ee2
WARNING: The requested image's platform (linux/arm64) does not match the detected host platform (linux/amd64) and no specific platform was requested
Image: "arm64"
Binary: /tmp/corso: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-aarch64.so.1, Go BuildID=7iTBXW0reyfIOS-b-ciS/a5K0Q1IjuA0m9DJxmuNk/Ju1lI6bUZeKn6M_xqon6/KNXwYSnL7e5RVtjAKW9A, not stripped

$ ./check-image.sh ghcr.io/alcionai/corso:84fc9d4@sha256:6320b95470014ca07b9cf1db98b73f5672870c2c53c22c3d13223d88fa621ee0
Image: "amd64"
Binary: /tmp/corso: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, Go BuildID=sBziMHPFI9K-G0et0WjJ/Pe9A2Vy8_xpV3FEDJUMo/p4UeMEzgheASvylZ1N3j/fnwmDeVif4rhneou-S6O, not stripped

$ docker run -it --rm ghcr.io/alcionai/corso:84fc9d4@sha256:6320b95470014ca07b9cf1db98b73f5672870c2c53c22c3d13223d88fa621ee0
[...help message...]
```

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [x] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* https://github.com/alcionai/corso/issues/1166

## Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-10-18 05:28:44 +00:00
Keepers
a32f86e40d
migrate naming of azure env vars (#1176)
## Description

migrates the client_id, client_secret, and tenant_id
environment variables to versions prepended with
azure_*.

⚠️  Your local environment will need to change in the following ways:  ⚠️ 
1. prepend `AZURE_` to your clientID, clientSecret, and tenantID env vars.
2. update those same env references in any `.corso.env` files used for copying envs to docker containers.
3. in `.corso.toml` (and any variants such as .corso_test.toml), replace `tenantid` with `azure_tenantid`.

## Type of change

- [x] 🐹 Trivial/Minor

## Issue(s)

* #558

## Test Plan

- [x] 💪 Manual
- [x]  Unit test
- [x] 💚 E2E
2022-10-17 20:47:04 +00:00
Abin Simon
69a6fd1593
Add corso version using ldflags (#1104)
* Make corso respect --version

* Add proper version information when building

* Use unified version string

$(git describe --exact-match --tags $(git rev-parse HEAD) 2>/dev/null || echo unreleased)-$(git rev-parse --short HEAD)

With tag:    v0.0.0-ceaf04c9
Without tag: unreleased-ceaf04c9

* Add a simple build command to build using Makefile
2022-10-14 12:20:30 +05:30
Abin Simon
2d30f4a999
Set Metrics configuration using ldlfags (#1088)
## Description

This sets up the metrics configs using `ldflags`. Keeping it in draft as I wanted to wait till https://github.com/alcionai/corso/pull/1052 is merged as that will affect how we use it in the CI. I have currently set the base branch to `release-ci` on GH, the branch for https://github.com/alcionai/corso/pull/1052 instead of `main` as the diff would make more sense that way.

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [x] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* #1067

## Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-10-14 03:37:37 +00:00
Abin Simon
4b94c4f012
Option to not use docker for Makefile in docs/website (#1087)
## Description

This makes it so that we have an option to locally run all Makefile targets without having to go through Docker. That said, it retains Docker as the default way to run it, but now we can set an evn variable `CORSO_USE_DOCKER=-1` to skip running through docker. I understand if this looks a bit hacky and don't want to add it in, but thought I wold propose this anyways. While not major, I was able to get a good amount of decrease in build times.

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [x] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* #<issue>

## Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-10-14 03:18:50 +00:00
Abin Simon
523386a720
Merge CLI docs genertion and lint (#1130)
## Description

If any of the dependents were skipped, the CI would skip a job. This resulted in `Docs-Linting` getting skipped because of `Generate-CLI-Docs` job being skipped for doc only change. Now they are both merged into a single job. The internal steps for cli docs generation will still be skipped, but that should not affect the steps below.

*I have not been able to fully test it out as the "file change checker" logic can only be checked after merging it, but it should be working*

Ref: https://github.com/orgs/community/discussions/25224

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [x] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* #<issue>

## Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-10-13 01:31:42 +00:00
Abin Simon
9d5c53299d
Fix go mod download in checkout action (#1128)
* Fix go mod download in checkout

* Make CI filechange checker .github/actions

Co-authored-by: Keepers <ryanfkeepers@gmail.com>
2022-10-11 17:30:34 -06:00
Abin Simon
658ebec0da
Update gotestfmt package repo in CI (#1103)
The package was moved to gotesttools org with the original one being
deleted soon.
2022-10-11 16:38:57 +05:30
Abin Simon
62c704a786
Fix issue with docs lint (#1102)
* Fix docs lint

* Fix log upload path
2022-10-11 08:50:11 +05:30
Abin Simon
1793cc3757
Setup CI for release (#1052)
* Setup CI for release

* Initial commit of CHANGELOG.md

* Pin vale and markdownlint-cli to current versions

* Update branch name for CI

* Pull request workflow job
2022-10-10 11:00:55 +05:30
Keepers
30f35709be
purge restored load test folders (#1059)
## Description

purge restored folders for all users in the tenant following a load test to ensure we don't over-
produce data that causes future tests to time out.

## Type of change

- [x] 🤖 Test

## Issue(s)

* #1048

## Test Plan

- [x] 💪 Manual
- [x] 💚 E2E
2022-10-06 01:20:17 +00:00
Keepers
fa7f505b33
slow load test frequency to every 4 hours (#1039)
## Description

load testing for the dev m356 tenant takes longer
than 3 hours to complete, causing all load tests to
get canceled when github shifts priority to the
next job that gets kicked off.  Backing off the freq to
every 4 hours, and will revisit that as needed. If 4 hour
time doesn't satisfy the boundary, we should shift the
dataset instead of freqnency.

## Type of change

- [x] 🤖 Test

## Issue(s)

* #902

## Test Plan

- [x] 💚 E2E
2022-10-04 20:11:55 +00:00
Keepers
af12fba0c7
attempt local action for cache control (#1003)
## Description

Attempting to fix cache control.

## Type of change

- [x] 💻 CI/Deployment

## Issue(s)

* #790

## Test Plan

- [x] 💪 Manual
2022-10-03 23:52:36 +00:00
Keepers
ae2f4e6712
Issue 902 frequency (#1026)
## Type of change

- [x] 🐛 Bugfix
2022-10-03 22:49:05 +00:00
Keepers
11be4e4590
up the frequency of load tests (#1024)
## Description

Temporarily up the frequency of the load test kickoff for observation.

## Type of change

- [x] 🤖 Test

## Issue(s)

* #902

## Test Plan

- [x] 💚 E2E
2022-10-03 18:59:36 +00:00
Keepers
011e24583f
add profiling, tracing to load testing (#971)
## Description

add diagnostic records to load test runs

## Type of change

- [x] 🤖 Test
- [x] 💻 CI/Deployment

## Issue(s)

* #902

## Test Plan

- [x] 💚 E2E
2022-09-29 02:01:15 +00:00
Keepers
04a8d10f75
address golang ci modfile discovery (#967)
## Description

Github cache imposes a 10gb limit, after which cache entries
will automatically get evictions (LRU policy).  Various recent
queries have pinned our current cache size at 14-19 gb.  The
golangci-lint cache alone accounts for 5-9 gb of that usage.
Meanwhile, it takes a shorter time for that package to download
missing modules than it does to run our tests.  This change shuts
down the golangci cache in hopes that it improves our branch
caching retention.

## Type of change

- [x] 💻 CI/Deployment

## Issue(s)

* #790

## Test Plan

- [x] 💚 E2E
2022-09-29 00:32:22 +00:00
Keepers
f10071189a
hide successful test outputs in ci action (#965)
## Type of change

- [x] 💻 CI/Deployment
2022-09-28 19:56:20 +00:00
Keepers
9357d6b6ac
swap over the remaining go setup scripts (#957)
## Type of change

- [x] 💻 CI/Deployment

## Issue(s)

* #790

## Test Plan

- [x] 💚 E2E
2022-09-27 17:12:14 +00:00
ashmrtn
f27c3e0b83
Don't hide tests output, update archiver (#950)
## Description

<!-- Insert PR description-->

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [x] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* #<issue>

## Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-09-27 13:37:25 +00:00
Keepers
e061ce7c73
implement load tests (#937)
## Description

Adds the load test func calls and asserts for
both exchange and onedrive.

## Type of change

- [x] 🤖 Test

## Issue(s)

* #902

## Test Plan

- [x] 💚 E2E
2022-09-27 00:21:30 +00:00
Keepers
d633be9eef
nightly load test footprint and workflow (#928)
## Description

Adds the footprint file for running nightly load
tests out of the repository package.  The tests
don't do anything at this stage, but that's okay.
Also introduces a workflow to kick off the tests
every day at 2am UTC.

## Type of change

- [X] 🤖 Test
- [X] 💻 CI/Deployment

## Issue(s)

* #902

## Test Plan

- [X] 💚 E2E
2022-09-22 15:16:25 +00:00
Keepers
a368570e20
improve ci cache management - initial cleanup (#849)
## Description

An attempt to minimize and centralize how we're caching go builds.
Not necessarily going to solve all our CI issues, but should make
changes building on this state much easier.

## Type of change

- [x] 💻 CI/Deployment

## Issue(s)

* #790

## Test Plan

- [ ] 💪 Manual
- [ ]  Unit test
- [x] 💚 E2E
2022-09-15 16:25:05 +00:00
Keepers
0c8a03a826
add the metrics package (#839)
## Type of change

- [x] 🌻 Feature

## Issue(s)

* #741

## Test Plan

- [ ] 💪 Manual
- [ ]  Unit test
- [x] 💚 E2E
2022-09-15 00:28:02 +00:00
Keepers
1295750206
use main version of fliechange checker (#858) 2022-09-14 18:39:24 -04:00
Keepers
b739526bb5
use dorny version of skipping workflow jobs (#768)
## Description

The current action workflow skips cause requried
actions to be marked as passing until they fail,
not marked as incomplete until either passed,
failed, or skipped.  This change should provide
the latter behavior.


## Type of change

- [x] 🌻 Feature

## Issue(s)

* #744

## Test Plan

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-09-14 22:23:17 +00:00
Keepers
bf014f8706
fix build script, try local build again (#848)
## Type of change

- [x] 🐛 Bugfix
- [x] 💻 CI/Deployment

## Issue(s)

* #573

## Test Plan

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-09-14 21:51:29 +00:00
Keepers
110e874e5b
rename password to passphrase (#796)
General user friendliness renaming.  Will cause a
breaking change in any local environment for
developers and Ark.
2022-09-12 10:09:59 -06:00
Keepers
22c0bf5c3a
add CI/Deployment to PR template types (#769)
## Description

Add a new type of change to the template: CI/Deployment

## Type of change

- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 🐹 Trivial/Minor

## Issue(s)

* #744

## Test Plan

- [ ] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-09-08 21:45:30 +00:00
Keepers
6cdc691c6f
correct the corso module (#749)
swaps the corso go module from github.com/
alcionai/corso to github.com/alcionai/corso/src
to align with the location of the go.mod and
go.sum files inside the repo.

All other changes in the repository update the
package imports to the new module path.
2022-09-07 15:50:54 -06:00
Keepers
35c6f2b6b0
undo auto-success workflow skip (#788) 2022-09-07 14:47:30 -06:00
ashmrtn
8947164318
Turn issues into bullets so they show titles (#754)
## Description

Minor visual change to how issues for the PR are displayed. Now defaults to the bulleted list which causes GitHub to render the title of each issue instead of just the issue number. Issues are still links

## Type of change

Please check the type of change your PR introduces:
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [x] 🐹 Trivial/Minor

## Issue(s)
<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->

As an illustration, the below does not use bullets:
#753 

This does use bullets though
* closes #753 

## Test Plan

<!-- How will this be tested prior to merging.-->

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-09-02 22:56:39 +00:00
Keepers
1f8c3cdb11
only run actions on /src changes (#750)
## Description

Re-opening the PR with a hack (sourced from github
themselves) to skip the required check if we don't run
the standard required jobs.

## Type of change

- [x] 🌻 Feature

## Issue(s)

#744

## Test Plan

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-09-02 22:30:18 +00:00
Keepers
a9e66b0db4
Issue 570 deploy sep b (#719)
Recovery action after losing this commit upon merging `issue-570-deploy`.
2022-09-01 16:40:36 +00:00
Keepers
127b6d061a
introduce docker container production (#660)
Introduces the production of docker containers as a CI step.
Currently only provides a rolling-release version that builds
on every push to main.  Images are deployed to ghcr.io.

The PR includes two variations on building the images.  We'll
likely only want to stick with one or the other.
2022-09-01 15:06:57 +00:00
Vaibhav Kamra
81cb76dd55
Pull request template (#673) 2022-08-29 12:16:45 -07:00
Keepers
ade400126d
final cleanup for new PR (#609) 2022-08-19 20:40:56 +00:00
Keepers
42df5cef58
push doc autogeneration changes to new branch (#531) 2022-08-18 22:34:03 +00:00
Keepers
9c62134cb2
change command folding in cleanup yml (#546) 2022-08-15 10:36:07 -06:00
Keepers
84fae9e215
fix action useage of date command (#545) 2022-08-12 18:25:23 -06:00
Keepers
6c5d6d167c
skip build cache in golangci-lint (#540) 2022-08-12 15:24:39 -07:00
Keepers
a8960129c8
fix bad substitution in yml env declaration (#538) 2022-08-12 22:12:12 +00:00
Keepers
c052536094
proper env value retrieval in test cleanup yml (#535) 2022-08-12 12:17:17 -06:00
Keepers
79e7be71bf
add steps to ci_test_cleanup (#522) 2022-08-12 00:27:48 +00:00
Vaibhav Kamra
af86107c86
Disable creating docs commit (#530) 2022-08-11 23:36:07 +00:00
Keepers
20aa3d3a28
purge test user folders every half hour (#491) 2022-08-05 18:24:58 +00:00
Keepers
9326690338
autopopulate cli markdown on ci build (#453) 2022-08-04 16:46:14 -06:00
Keepers
dcbc149aa7
Build binary test separately (#399)
* refactor ci caching to ensure go test runs without downloading packages
2022-07-25 09:05:40 -06:00
ashmrtn
395c7c8525
Add spell check linter and run gofmt in golangci-lint (#396)
* Basic golangci-lint config with gofmt and timeout

Remove corresponding sections from other CI config files.

* Enable comment and string spelling linter

* Fix spelling mistakes for linter

Co-authored-by: Danny <danny@alcion.ai>
2022-07-22 18:28:25 +00:00