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

Refactor notification component #3491

Merged
merged 28 commits into from
Nov 9, 2023
Merged

Conversation

AsmaaNabilBakr
Copy link
Contributor

@AsmaaNabilBakr AsmaaNabilBakr commented Oct 15, 2023

Closes #2992

What changed?

  • move AlertErrorList from EE to OSS.

Why was this change made?

How was this change implemented?

How did you validate the change?

Release notes

Documentation Changes

Other follow ups

bigkevmcd and others added 16 commits October 15, 2023 12:24
When the context is "" i.e. the default context, this was generating odd
names for the KubeConfig elements `-user` etc.

This ensures that we put something in for the context.
…manually in case of an "object not found" error.

Add sending delete object transactions for deleted roles and bindings in case of an "object not found" error.

Add `IsValidID` method to role to be able to delete roles without policy rules (those, which are manually constructed to pass with delete transactions).

Update corresponding tests in `reconciler`, `rolecollector`, and `store` packages.
Signed-off-by: wge-build-bot <wge-build-bot@weave.works>
Co-authored-by: wge-build-bot <wge-build-bot@weave.works>
Co-authored-by: Ahmad Samir <ahmadsamir1194@gmail.com>
* init gitops bootstrap command for wge

* add checks for entitlement and flux

* Add wge version choise list

* add create admin username and password secret

* add install wge

* fix adding admin password

* fix linting

* run go mod tidy

* enable ingress

* add domain type selector

* add option to bootstrap flux

* adjust bootstraping flux and domain

* add install extra controllers

* fix lint

* rename package checks to commands

* refactor packages

* early exit

* refactor errors and add utils for git repos

* refactor wge installation to use files

* refactor extra controllers

* remove extra unneeded values

* Add OIDC

* update portforward

* add admin password revert

* refactor error handeling

* fix unhandeled errors

* refactor creating helmrepos and helmreleases

* refactor styling

* go mod tidy

* split utils

* Add OIDC

* refactor creating extra controllers

* move install extra controller to commands

* add oidc

* Add OIDC

* install capi controller

* add terraform controller

* refactor OIDC cli

* fix linting

* fix lintting

* fix lint

* fix lint

* update OIDC CLI

* handle error msgs

* move check mark to method

* reformat error

* cleanup

* update CLI OIDC

* fix confirm input

* type

* Add localhost portforward info

* add gitopssets controller

* enable pipelines controller and cluster-controller and gitopssets by default

* remove gitops sets

* handle existing secrets

* Update onboarding CLI messages

* cleanup utils

* cleanup utils

* cleanup domain

* cleanup utils

* cleanup input

* cleanup input

* edit messages and variableNames

* update cli messages

* cleanup variables

* cleanup constants

* cleanup constants

* add unit test for k8s utils and refactor accordingly

* add unit tests for flux

* add unit test for admin password

* Add unit -test for adding capi & policy-agent

* move controllers under gitops add

* add unit test for wge version

* test oidc get issuer

* Move controllers under gitops add

* Move controllers under gitops add

* pause add controllers tests

* restore install controller function after setup

* fix controllers

* pass opts to controllers

* refactor git utilits

* refactor git utilities

* prepare bootstrap bommand for release1

* address messages and languague

* clean extra variables

* remove oidc flow to another branch

* Update cmd/gitops/app/bootstrap/cmd.go

Co-authored-by: Eneko Fernández <12957664+enekofb@users.noreply.github.com>

* Update cmd/gitops/app/bootstrap/cmd.go

Co-authored-by: Eneko Fernández <12957664+enekofb@users.noreply.github.com>

* refactor git utility & add unit-test

* remove out of scope componenets

* apply code review comments to refactor file names and error messages

* move bootstrap package under pkg

* refactor using the k8s client and add silent mode

refactor git utils

* fix admin password

* verify username and password

* remove unused methods

* fix spelling

* remove aws related stuff

* use git library

add check for previous installation

* fix lint

* imporve error messages to stage failures

* adjust gitopssets values and installation checks

* clean silent mode

* add checks for kubeconfig

* adjust admin password

* refactor commands to use config interface struct

* improve error messages

* remove unused variable

* wip adding cli design doc

* wip adding cli design doc

* add error guidance

* rename config to bootstrapper to be more clear

* refactor commands to use steps pattern

* continue on refactor commands to use steps pattern

* fix ssh authenticate by explictly asking for private key file

in case the key is not loaded in ssh agent. this usually happens on macos

* added integration test, refactored configuration and design (#3458)

* Changes after the review to enhance the following aspects

Testing:

- Added integration test so we could test the functionality e2e: it uses some local configuration that we need to test but already provides the acceptance layer that we were missing:

Design:

- Bootstrap workflow moved to the domain layer within `pkg` so it could be presented in different forms.
- Integrated configuration chain of responsibility into a single a builder pattern, so we have configurability in this layer. As a result:
  - we dont need to pass the flags to the steps
  - we config the stepsbefore the workflow is executed which seems the right moment.

Other refactors:
- Moved steps to package `steps` from `command`  for consistency

* integrated ssh key management

* add events and error messages and fix domain bug

* add current context

* fix lint

* add entitlement expiration message

* fix entitlement expiration

* fix entitlement expiration

* seperate entitlement secret validations

* add messages for flux

* edit messages to small letter and update success messages

* add validation for password and wge version

* add test cases for admin password create creds

* add test cases for domain type

* update entitlement test

* add validation on password input

* remove aws related message

* panic in case of casting error to give more context about the error

* handle portforward and error messages

* fix external dns spacing

* add validation on domain type

* Cli eneko review (#3474)

* reviewed documentation

* updated docs with waleed input

* reviewed TBD

* latest set of changes

* removing commented

* remove debugging

* removed stale documentation

* removed withe space

* review

* removed unused

---------

Co-authored-by: Ahmad Samir <ahmadsamir1194@gmail.com>
Co-authored-by: Eneko Fernández <12957664+enekofb@users.noreply.github.com>
Co-authored-by: Eneko Fernandez <eneko@weave.works>
* fix wge cli bootstrap command description

* capital letter

---------

Co-authored-by: Eneko Fernandez <eneko@weave.works>
* disable all testing rules, tests need to be reworked

* spyOn yaml.parse instead of mock

* Added react-hooks plugin to eslint

* specify groups for import ordering

* rebase

* uneccessary package

* add url to font imports, ts ignore correct parcel imports of oss types in auth buttons

* more extra packages

* add linting to ui-unit-tests job in github workflow

* pesky pipeline details snap

* maybe the snap from main will do

* re-deleting files that got added in a rebase

* fix list events import in gitopssets detail

---------

Co-authored-by: Jordan Pellizzari <jordan@weave.works>
* different field for target number

* add promotion to protobuf for environment

* getStrategy func

* go?

* update strategy text tests

* ....sigh....snapshots

* fix: Update test

* something horrible has happened to the pipeline details snapshot test and i hate it

* just as i suspected the snap needed to be updated again

* pipeline details snap from main who knows where i went wrong

* welp once again i have updated the evil pipeline details snap

* import order

* okay im deleting the snapshot bc not only is it annoying but the entire ui is changing and i will make a new one later

---------

Co-authored-by: Yiannis <yiannis@weave.works>
* Add delete service account resources

* Test pass for delete service account resources

* Add label managed-by to resources when  being created during reconciliation

* Fix DisconnectCluster function to include retrieving service account name and cluster role binding name and delete resources accordingly

* Add gitops disconnect cluster cmd

* Add service account name and cluster role binding name flags to gitops disconnect cmd

Add check service account name and check cluster role binding name functions to verify their existance with the connect-cluster label

* Add existing resources to simpleClientSet when creating it instead of using helper function in service account tests

* Make newGitopsClusterScheme unexposed

* Move prerun disinheritApiFlags to new function in common app pkg in cmd gitops pkg dir

* update go.mod
* Fixes the prod build of the UI loading

- We've bumped into the YAML import issues again
- Some part of the parcel build pipeline (minify?/pack?) seems to have
  trouble w/ this particular YAML package. First noticed in the intial
  migration from webpack to parcel

* Downgrade git-url-parse to fix another parcel build issue
* update yaml view for new oss version

* lint
@AsmaaNabilBakr AsmaaNabilBakr added area/ui ui_triage Cross-team/project UI issues for triage enhancement New feature or request labels Oct 22, 2023
@AsmaaNabilBakr
Copy link
Contributor Author

FYI, ui-unit-tests will pass after release the updated OSS version.

@AsmaaNabilBakr AsmaaNabilBakr marked this pull request as ready for review October 24, 2023 11:27
@AsmaaNabilBakr AsmaaNabilBakr removed the ui_triage Cross-team/project UI issues for triage label Oct 24, 2023
@AsmaaNabilBakr AsmaaNabilBakr merged commit 1201a12 into main Nov 9, 2023
10 checks passed
@AsmaaNabilBakr AsmaaNabilBakr deleted the refactor-notification-component branch November 9, 2023 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UI] Standardise notifications between OSS/EE
10 participants