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

Hive SyncSet GenevaActions #3729

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SrinivasAtmakuri
Copy link
Contributor

Implements:

  1. Geneva Action to list selectorsyncsets for a given hive instance
  2. Geneva Action to retrieve an individual selectorsyncset on a given hive instance
  3. Geneva Action to list syncsets for a cluster defined by resource id in a hive instance
  4. Geneva Action to retrieve an individual syncsets on a given hive instance

How to call:

List selector/syncsets - /admin/hivesyncset?namespace={namespace}?isSyncset
Get a selector/syncset - /admin/hivesyncset/syncsetname/{syncsetname}?namespace={namespace}?isSyncSet

Notes:

  1. namespace should be "" for selectorsyncsets
  2. namespace cannot be "" for syncsets
  3. isSyncSet can be true/false, setting it changes from using default selectorsyncset to syncset

Which issue this PR addresses:

Fixes

What this PR does / why we need it:

Test plan for issue:

Testing is underway., below is the plan.,

  1. Connect to shared AKS cluster's hive
  2. Create a cluster and Syncset in CD namespace and SelectorSyncSet with hive
  3. Run admin GA using curl via localrp

Is there any documentation that needs to be updated for this PR?

How do you know this will function as expected in production?

@@ -124,6 +125,7 @@ func NewFrontend(ctx context.Context,
clusterm metrics.Emitter,
aead encryption.AEAD,
hiveClusterManager hive.ClusterManager,
hiveSyncSetManager hive.SyncSetManager,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it make more sense to add this using the builder pattern or something similar:https://medium.com/@reetas/clean-ways-of-adding-new-optional-fields-to-a-golang-struct-99ae2fe9719d?

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the rational for creating a new interface is bcoz the syncsets are not cluster scoped and hive instance scoped, so its cleaner to have a new interface which implements syncset functions.

Copy link

@pepedocs pepedocs left a comment

Choose a reason for hiding this comment

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

I have added my comments mostly for enhancement. However I'd like to request changes for the usage of HTTP 403 Forbidden status as I've specified. HTTP 400 Bad Request should be the right response for client requests that lack parameters or wrong parameters.

@bitoku
Copy link
Collaborator

bitoku commented Jul 31, 2024

It would be better to refactor like https://github.com/Azure/ARO-RP/pull/3665/files first to focus on the actual change.

Copy link
Collaborator

@bitoku bitoku left a comment

Choose a reason for hiding this comment

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

We want e2e tests for this feature.

@SrinivasAtmakuri
Copy link
Contributor Author

I have added my comments mostly for enhancement. However I'd like to request changes for the usage of HTTP 403 Forbidden status as I've specified. HTTP 400 Bad Request should be the right response for client requests that lack parameters or wrong parameters.

Resolved, made the changes.

@github-actions github-actions bot added needs-rebase branch needs a rebase and removed ready-for-review labels Sep 5, 2024
Copy link

github-actions bot commented Sep 5, 2024

Please rebase pull request.

Copy link
Collaborator

Choose a reason for hiding this comment

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

flagging this as needing a rebase on master to pick up the .bingo changes.

@github-actions github-actions bot removed the needs-rebase branch needs a rebase label Sep 25, 2024
Copy link

Please rebase pull request.

@github-actions github-actions bot added the needs-rebase branch needs a rebase label Sep 26, 2024
Implements:

1. Geneva Action to list selectorsyncsets for a given hive instance
2. Geneva Action to retrieve an individual selectorsyncset on a given hive instance
3. Geneva Action to list syncsets for a cluster defined by resource id in a hive instance
4. Geneva Action to retrieve an individual syncsets on a given hive instance

How to call:

List selector/syncsets - /admin/hivesyncset?namespace={namespace}?isSyncset
Get a selector/syncset   - /admin/hivesyncset/syncsetname/{syncsetname}?namespace={namespace}?isSyncSet

Notes:
1. namespace should be "" for selectorsyncsets
2. namespace cannot be "" for syncsets
3. isSyncSet can be true/false, setting it changes from using default selectorsyncset to syncset
@github-actions github-actions bot removed the needs-rebase branch needs a rebase label Oct 1, 2024
@SrinivasAtmakuri
Copy link
Contributor Author

/azp run ci

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
firefly Issues or Pull requests owned by Team Firefly ready-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants