Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH Actions branch for New PR and Close PR issues #105

Merged
merged 240 commits into from
Aug 31, 2023

Conversation

mikemcd3912
Copy link
Contributor

@mikemcd3912 mikemcd3912 commented Jul 25, 2023

Issue #, if available:
GH Actions task for opening new PR's and closing merged PR's

Description of changes:
Draft PR to track updates to the github actions scripts

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@mikemcd3912 mikemcd3912 marked this pull request as ready for review August 31, 2023 20:17
@mikemcd3912 mikemcd3912 changed the title GH Actions branch progress visibility PR GH Actions branch for New PR and Close PR issues Aug 31, 2023
@mikemcd3912 mikemcd3912 changed the base branch from main to feature/ghActions August 31, 2023 20:31
@mikemcd3912 mikemcd3912 changed the base branch from feature/ghActions to main August 31, 2023 20:31
@mikemcd3912 mikemcd3912 changed the base branch from main to feature/e2e-feedback-testing August 31, 2023 20:45
Copy link
Contributor

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG to merge to branch

@elamaran11 elamaran11 merged commit 67eccb0 into aws-samples:feature/e2e-feedback-testing Aug 31, 2023
1 check failed
elamaran11 added a commit that referenced this pull request Sep 18, 2023
* GH Actions branch for New PR and Close PR issues (#105)

* Sample Workload

* Sample Workload

* Sample Workload

* Sample Workload

* GH Actions

* GH Actions

* Github Workflow

* updated branch name

* added file removal on unsuccessful Close

* Close pull request remove configmap

* added file copying

* subdirectory check

* filecopy using branch checkout

* fix branch name

* Copy partner Directory

* Copy partner Directory update

* Moving sample workload

* remove unnecessary workflow

* workflow fix addition

* adding files to commit

* GH actions source check

* Update cross branch checkout path

* Check subdirectory

* Add files with ConfigMap

* close pull req updates to remove files

* remove commented out code

* update ghActions file

* remove workflow in branch

* add gh action workflow

* echo directory

* update directory reference

* update directory reference 2

* add files from Partner

* add files from Partner 2

* add files from Partner 3

* add files from Partner 4

* add files from Partner 5

* add files from Partner 6

* Reset new pull

* check env state

* list files check

* foreach fix

* update for each syntax

* update files variable

* subdirectory variable pull

* remove escape char

* remove brackets

* remove quotes and extra dollar sign

* add reference to files

* file checkout logic added

* Fix if else indent

* remove extra paren

* remove extra path

* change checkout to absolute path

* adding tracking comments and path edit

* recording Commit ID

* fix git ID variable

* fix git hash command

* return to pre-hash recording

* align commit messages

* align commit messages

* list automated Commits from this PR

* delete files test

* Git log addition

* fix namespace extraction

* update commits string ID and show hashes only

* commit tagging update

* git log --all addition

* update logging

* checkout dev branch

* checkout origin dev branch

* edit query string

* revert query string

* remove merge, set back to developer branch

* test git logging on PR open

* Update podinfo.yaml

* Revert "Feature/sample workload test 7.25"

* Push prev day changes

* Search for existing namespace file

* Reupload sample workload files

* Looking for existing namespace file

* Namespace file searchj

* Namespace file search

* Revert to working state

* Check Dir from updated files

* Check Dir from updated files 2

* Check Dir from updated files array

* Check Dir from updated files array 2

* test for existing namespace file

* test for existing namespace file, fix for statements

* test for existing namespace file, fix if statement

* test for existing namespace file update

* uncomment subdir assignment

* Update Logic to find namespace file

* Update configMap Message

* Update revert logic

* Update git log

* Update branch checkout

* Test Git log

* re-order commits

* revert instead of delete

* revert variable fix

* remove dir

* fix Commits variable

* push git revert

* more precise commit reverts

* more precise commit reverts, fix hash

* back to merge method

* reorder new PR file, add directory search

* Update time on pod def

* New file search logic

* lookup namespace file before searching committed files

* Add missing quote

* Alter directory check

* update file search logic

* variable test

* variable test 2

* step reduction

* fix close script

* add tag for conformitron bot

* fixing echo destination

* add rows on new pr

* Update Step language to be more descriptive of step being performed

* add Hash to ConfigMap

* update test

* update sha on configmap

* Update commit order

* Add config mapand updated files for podinfo_PR_16

* Update merge logic

* fix bad if statement

* Update merge logic

* Update merge logic 2

* Update merge logic with if statement

* Fix IF statement

* Fetch first

* infert IF test

* Comment out additional merge

* Add push

* Add config map for podinfo_PR_16

* Checkout dev branch at beginning

* Remove ConfirMap from Feature Branch

* Change File move commit process

* Close PR commit logging

* Update podinfo.yaml

* Update close workflow

* Delete sample workload

* Trying to fix Conflict

* Workflow Files

* Merge removal of Files

* add workflow files back in

* Updating workflow to work for Net new

* Spacing on new IF statement

* Spacing on new IF statement 2

* Create Subdirectory if not already in Dev branch

* Fix Filepath for ConfigMap file

* Fix Filepath for ConfigMap file

* Git branch and commit test

* Fetch commits not on the runner, list

* Massive Simplifying test

* add commit

* add author

* Fix Checkout to do deletions

* Spacing on IF statement

* Fixing files search

* Git sha testing

* Git sha testing quote pull

* Update git log

* Quote

* file extension

* file name

* Git log test

* Git log test 2

* Git log test 3

* Git log test 4

* Git log test 4

* Git log test 5

* Git log test 6

* Git log test 7

* Git log test 8

* Git log test 9

* Git log test 10

* Tags

* Tags 2

* Cleanup

* Tag Reverts

* Add Pull

* Add Pull to correct spot

* remove Long history

* Remove Tag on Close

* Edit revert command

* Use Commit Message Tag and rev-list grep to ID reverts

* Fix the rev-list command with HEAD variable

* Pull branch history

* Comment out tagging

* different pull strategy

* Check without tag filtering

* fetch depth

* Update Rev-List adding tag back in

* Clear out old commented code in Close PR

* Revert work

* Add Author before revert

* Remove other re-set method

* Add Error handling for Revert ops

* Fix error handling

* check delete

* Fixing weird git issue

* Delete eks-anywhere-common/Addons/Partner/workload_sample directory

* Space added

* Fix GH actions rollback

* Fix new namespace file search

* Fix new namespace file search commentary

* Adding then's

* adding fi

* Fixing branch checkouts

* Fixing branch fetch

* Move the ConfigMap over to Dev Branch

* Update the Addition of ConfigMap file to Dev Branch

* Commit new ConfigMap

* Commit new ConfigMap author addition

* Cleaning Up Merge

* Re-order branch checkout

* Update ConfigMapFile path

* Make Subdirectory

* Comment Out Extra Checkout

* adding -p option for mkdir

* E2E Testing Updates

* Cleanup commented Rows

* Set feature/e2e as target branch

---------

Co-authored-by: Elamaran Shanmugam <elamaran.shan@gmail.com>
Co-authored-by: Conformitron Bot <dev@null>

* E2E cross-fork testing branch (#130)

* Added Kube-Observer basics along with RBAC

* Created Observer Bot

* Added ObserverBot gitignore

* Added .idea into .gitignore

* Finalized the token, secrets, rbac, sa and observer properties

* Added high level skeleton, can find failing pods and return why they're failing

* Added .dev.env to gitignore

* Added information to make future work easier

* Added report generation into the system, still testing it

* Report generated, need to add fallback for a container/pod not returning logs

* Added logs for pods that doesn't produce any logs

* Reformatted the file

* Running into an issue where PATs can't create comments

* Comments are being sent to GitHub and Conformitron v1 should be good to go :)

* Added in the yamls used to test the feedback loop bot

* changed the pod_status.phase to check for failures

* Added in workloads

* Updated it so that the repo and repo owner are retrived from env vars

* Added configurability to what repo is used for observability

* Added Kustomization yamls for observer deployment

* Update new-pull-request.yaml

added namespace to workflow

* Update new-pull-request.yaml

* Added full yamls for observer bot

* Changes making observer-bot prod ready

* Delete close-pull-request.yaml

Removing GitHub Actions

* Removing Github Actions from PR

* Moved the bot.py file to src/ and created a separate config manager to operate on configmaps

* Removed redundant bot.py result of a botched recovery

* Reworked how the bot works with it's storage, confirmed that it actually prevents from sending multiple messages, will set it for an overnight trial

* Caught github failure

* loaded in-cluster config for config_data

* Gave * to observer-sa.yaml

* Least Privileged the SA for observer-bot

* Using least privilege for the things

* Fixed perms for accessing configmaps in the cluster

* Run haywire in the observer namespace

* Spelling mistake

* Modified documentation and added ADOT packages, Will instrument it as part of v1.5

* Changes to make conformitron bot prod ready

* Making changes for token-secret to work in the prod env

* Changed name

* fixed secret location

* Added CI Pipeline *ignores

* Added CI CDK Pipeline for Observer Bot

* Fixed the issue with raw pods throwing errors without reporting back to github

* Added the correct value for ECR_REPO_NAME

* Removed ObserverBot source code from the add-ons repo

* Transferring to main

* Trasnferring to main

* Better naming for Gh Actions

* Better names for Gh Actions

* better name v2 for gh actions

---------

Co-authored-by: Mike McDonald <61101829+mikemcd3912@users.noreply.github.com>
Co-authored-by: Elamaran Shanmugam <elamaran.shan@gmail.com>
Co-authored-by: Conformitron Bot <dev@null>
elamaran11 added a commit that referenced this pull request Oct 2, 2023
* GH Actions branch for New PR and Close PR issues (#105)

* Sample Workload

* Sample Workload

* Sample Workload

* Sample Workload

* GH Actions

* GH Actions

* Github Workflow

* updated branch name

* added file removal on unsuccessful Close

* Close pull request remove configmap

* added file copying

* subdirectory check

* filecopy using branch checkout

* fix branch name

* Copy partner Directory

* Copy partner Directory update

* Moving sample workload

* remove unnecessary workflow

* workflow fix addition

* adding files to commit

* GH actions source check

* Update cross branch checkout path

* Check subdirectory

* Add files with ConfigMap

* close pull req updates to remove files

* remove commented out code

* update ghActions file

* remove workflow in branch

* add gh action workflow

* echo directory

* update directory reference

* update directory reference 2

* add files from Partner

* add files from Partner 2

* add files from Partner 3

* add files from Partner 4

* add files from Partner 5

* add files from Partner 6

* Reset new pull

* check env state

* list files check

* foreach fix

* update for each syntax

* update files variable

* subdirectory variable pull

* remove escape char

* remove brackets

* remove quotes and extra dollar sign

* add reference to files

* file checkout logic added

* Fix if else indent

* remove extra paren

* remove extra path

* change checkout to absolute path

* adding tracking comments and path edit

* recording Commit ID

* fix git ID variable

* fix git hash command

* return to pre-hash recording

* align commit messages

* align commit messages

* list automated Commits from this PR

* delete files test

* Git log addition

* fix namespace extraction

* update commits string ID and show hashes only

* commit tagging update

* git log --all addition

* update logging

* checkout dev branch

* checkout origin dev branch

* edit query string

* revert query string

* remove merge, set back to developer branch

* test git logging on PR open

* Update podinfo.yaml

* Revert "Feature/sample workload test 7.25"

* Push prev day changes

* Search for existing namespace file

* Reupload sample workload files

* Looking for existing namespace file

* Namespace file searchj

* Namespace file search

* Revert to working state

* Check Dir from updated files

* Check Dir from updated files 2

* Check Dir from updated files array

* Check Dir from updated files array 2

* test for existing namespace file

* test for existing namespace file, fix for statements

* test for existing namespace file, fix if statement

* test for existing namespace file update

* uncomment subdir assignment

* Update Logic to find namespace file

* Update configMap Message

* Update revert logic

* Update git log

* Update branch checkout

* Test Git log

* re-order commits

* revert instead of delete

* revert variable fix

* remove dir

* fix Commits variable

* push git revert

* more precise commit reverts

* more precise commit reverts, fix hash

* back to merge method

* reorder new PR file, add directory search

* Update time on pod def

* New file search logic

* lookup namespace file before searching committed files

* Add missing quote

* Alter directory check

* update file search logic

* variable test

* variable test 2

* step reduction

* fix close script

* add tag for conformitron bot

* fixing echo destination

* add rows on new pr

* Update Step language to be more descriptive of step being performed

* add Hash to ConfigMap

* update test

* update sha on configmap

* Update commit order

* Add config mapand updated files for podinfo_PR_16

* Update merge logic

* fix bad if statement

* Update merge logic

* Update merge logic 2

* Update merge logic with if statement

* Fix IF statement

* Fetch first

* infert IF test

* Comment out additional merge

* Add push

* Add config map for podinfo_PR_16

* Checkout dev branch at beginning

* Remove ConfirMap from Feature Branch

* Change File move commit process

* Close PR commit logging

* Update podinfo.yaml

* Update close workflow

* Delete sample workload

* Trying to fix Conflict

* Workflow Files

* Merge removal of Files

* add workflow files back in

* Updating workflow to work for Net new

* Spacing on new IF statement

* Spacing on new IF statement 2

* Create Subdirectory if not already in Dev branch

* Fix Filepath for ConfigMap file

* Fix Filepath for ConfigMap file

* Git branch and commit test

* Fetch commits not on the runner, list

* Massive Simplifying test

* add commit

* add author

* Fix Checkout to do deletions

* Spacing on IF statement

* Fixing files search

* Git sha testing

* Git sha testing quote pull

* Update git log

* Quote

* file extension

* file name

* Git log test

* Git log test 2

* Git log test 3

* Git log test 4

* Git log test 4

* Git log test 5

* Git log test 6

* Git log test 7

* Git log test 8

* Git log test 9

* Git log test 10

* Tags

* Tags 2

* Cleanup

* Tag Reverts

* Add Pull

* Add Pull to correct spot

* remove Long history

* Remove Tag on Close

* Edit revert command

* Use Commit Message Tag and rev-list grep to ID reverts

* Fix the rev-list command with HEAD variable

* Pull branch history

* Comment out tagging

* different pull strategy

* Check without tag filtering

* fetch depth

* Update Rev-List adding tag back in

* Clear out old commented code in Close PR

* Revert work

* Add Author before revert

* Remove other re-set method

* Add Error handling for Revert ops

* Fix error handling

* check delete

* Fixing weird git issue

* Delete eks-anywhere-common/Addons/Partner/workload_sample directory

* Space added

* Fix GH actions rollback

* Fix new namespace file search

* Fix new namespace file search commentary

* Adding then's

* adding fi

* Fixing branch checkouts

* Fixing branch fetch

* Move the ConfigMap over to Dev Branch

* Update the Addition of ConfigMap file to Dev Branch

* Commit new ConfigMap

* Commit new ConfigMap author addition

* Cleaning Up Merge

* Re-order branch checkout

* Update ConfigMapFile path

* Make Subdirectory

* Comment Out Extra Checkout

* adding -p option for mkdir

* E2E Testing Updates

* Cleanup commented Rows

* Set feature/e2e as target branch

---------

Co-authored-by: Elamaran Shanmugam <elamaran.shan@gmail.com>
Co-authored-by: Conformitron Bot <dev@null>

* E2E cross-fork testing branch (#130)

* Added Kube-Observer basics along with RBAC

* Created Observer Bot

* Added ObserverBot gitignore

* Added .idea into .gitignore

* Finalized the token, secrets, rbac, sa and observer properties

* Added high level skeleton, can find failing pods and return why they're failing

* Added .dev.env to gitignore

* Added information to make future work easier

* Added report generation into the system, still testing it

* Report generated, need to add fallback for a container/pod not returning logs

* Added logs for pods that doesn't produce any logs

* Reformatted the file

* Running into an issue where PATs can't create comments

* Comments are being sent to GitHub and Conformitron v1 should be good to go :)

* Added in the yamls used to test the feedback loop bot

* changed the pod_status.phase to check for failures

* Added in workloads

* Updated it so that the repo and repo owner are retrived from env vars

* Added configurability to what repo is used for observability

* Added Kustomization yamls for observer deployment

* Update new-pull-request.yaml

added namespace to workflow

* Update new-pull-request.yaml

* Added full yamls for observer bot

* Changes making observer-bot prod ready

* Delete close-pull-request.yaml

Removing GitHub Actions

* Removing Github Actions from PR

* Moved the bot.py file to src/ and created a separate config manager to operate on configmaps

* Removed redundant bot.py result of a botched recovery

* Reworked how the bot works with it's storage, confirmed that it actually prevents from sending multiple messages, will set it for an overnight trial

* Caught github failure

* loaded in-cluster config for config_data

* Gave * to observer-sa.yaml

* Least Privileged the SA for observer-bot

* Using least privilege for the things

* Fixed perms for accessing configmaps in the cluster

* Run haywire in the observer namespace

* Spelling mistake

* Modified documentation and added ADOT packages, Will instrument it as part of v1.5

* Changes to make conformitron bot prod ready

* Making changes for token-secret to work in the prod env

* Changed name

* fixed secret location

* Added CI Pipeline *ignores

* Added CI CDK Pipeline for Observer Bot

* Fixed the issue with raw pods throwing errors without reporting back to github

* Added the correct value for ECR_REPO_NAME

* Removed ObserverBot source code from the add-ons repo

* Transferring to main

* Trasnferring to main

* Better naming for Gh Actions

* Better names for Gh Actions

* better name v2 for gh actions

* testing cross-fork PRs

* testing cross-fork PRs

* viewing all the files in the repo at PR state

* getting to the bottom of why the incoming commit isn't available

* Maybe we fetch remote code

* Testing multi repo cloning

* testing with checking out two repos side-by-side

* looking for already downloaded namespace file

* Used the correct location of the configmap file

* #observability

* Copying files from side-by-side folder

* Fetch the PR branch

* Checked out PR for the namespace

* Removed one reminescent ./incoming

* reverted back to actions/checkout@v2

* Moved back to v4 and added more steps to ensure we can push to dev

* Fixed some errors

* Consolidated the steps because namespace error

* Testing with write-all permissions

* Added CI_TOKEN and moved pushing out to a different step

* Commented redundant code

* Added different method for CI_TOKEN

* Removed CI_TOKEN

* Using CI_TOKEN again

* Giving token to different step

* Removed uses

* Added permissions, contents: write to the workflow

* Testing pr_target in gh actions

* Validating prtarget stuff

* Fixed merge back to dev

* Testing with merge squash

* Removed for loop

* Overwriting files in the dev branch based on incoming files

* Force use 'ours' in merge squash

* I'm stupid and now using theirs for the squash strategy

* -X with theirs this time

* Reverting to just checking out files individually

* Fixed exponential revert problem

* Fixed the exponential revert errors

* Fixed some minor syntax

* Fixed indentation?

* Maybe fixed EoF error

* Silly me, forgor to done the loop

* I forgor to remove hardcoded tag

* I forgot to remove hardcoded tag

* Prepping for main merge

---------

Co-authored-by: Mike McDonald <61101829+mikemcd3912@users.noreply.github.com>
Co-authored-by: Elamaran Shanmugam <elamaran.shan@gmail.com>
Co-authored-by: Conformitron Bot <dev@null>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GitHub Actions for Close PR GitHub Actions for New PR and Pushes
2 participants