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

V2 - Project Console - Issues with auto enable repos #2005

Closed
nirupamav opened this issue Oct 19, 2020 · 7 comments
Closed

V2 - Project Console - Issues with auto enable repos #2005

nirupamav opened this issue Oct 19, 2020 · 7 comments
Assignees
Labels
01 - High High Priority API Feature or bug relating to the EasyCLA Application Programming Interface (API). Project Console V2 Project Console for EasyCLA V2 v2

Comments

@nirupamav
Copy link

  1. Create CLA Group for a project
  2. Configure github org
  3. Auto Enable New Repositories for the github org
  4. Observed below issues

Issue1 - When no repositories are enabled, if we Auto Enable New Repositories, Existing repos are not enabled for CLA
Issue2 - if we Auto Enable New Repositories, New repos are not enabled for CLA

@nirupamav nirupamav added 01 - High High Priority API Feature or bug relating to the EasyCLA Application Programming Interface (API). Project Console V2 Project Console for EasyCLA V2 v2 labels Oct 19, 2020
@nirupamav nirupamav added this to the Sprint 4 - July 27-August 10, 2020 milestone Oct 19, 2020
@dealako dealako assigned makkalot and unassigned dealako Oct 19, 2020
@dealako
Copy link
Member

dealako commented Oct 19, 2020

Denis:

  • Please confirm we can set/reset this value through the /v4 API - confirm by reviewing the GH Org table autoEnabled attribute.
  • Create a test organization
  • Add organization to a new or existing CLA Group
  • Enable Auto Enable for this Organization
  • Add a new test repo to the Organization
  • Observe that the callback is sent to the Python API
  • Review and report on any existing logic for the callback event. Discuss with team.
  • Logic should (somehow) identify which CLA group is associated with the Organization/Repo....and automatically add the repo to the CLA Group (update both repos table with the new repo)...(is this the only table we need to update??).
  • Need to send an email to the PMs for this CLA Group notifying them that we have added a new repo to the CLA Group since auto enabled was selected. In the email state the 1) CLA Group 2) GitHub Organization 3) and the repo name that was added.

@nirupamav
Copy link
Author

nirupamav commented Oct 21, 2020

@makkalot
I can think of below scenarios as of now

  1. Add github and select All repositories option while installing CLA App. Enable the Auto Enable new repositories option for the github org. Add new repo to the githuborg. In EasyCLA UI, the new repo should be added and cla enabled automatically
  2. Add github and select All repositories option while installing CLA App. Enable the Auto Enable new repositories option for the github org. Delete a repo which was already CLA enabled and add the same repo again. In EasyCLA UI, the new repo should be added and cla enabled automatically
  3. Add github and select All repositories option while installing CLA App. Enable the Auto Enable new repositories option for the github org. Delete a repo which is not CLA enabled and add the same repo again. In EasyCLA UI, the repo should be added and cla enabled automatically
  4. Add github and select only few repositories while installing CLA App. Enable the Auto Enable new repositories option for the github org. Select few more repos in the EasyCLA bot. In EasyCLA UI, the newly added repos should be added and cla enabled automatically
  5. Add github and select only few repositories while installing CLA App. Enable the Auto Enable new repositories option for the github org. Remove selected repo and select same repo again in the EasyCLA bot. In EasyCLA UI, the repo should be added and cla enabled automatically
  6. Add github. Enable the Auto Enable new repositories option for the github org. Install EasyCLA App for the github org. All the repos added in the EasyCLA bot should be cla enabled in EasyCLA UI
  7. If we disable the Auto Enable new repositories option then in any case(above mentioned scenarios) new repositories should not be automatically enabled for CLA

I am not sure about the impact when repo is renamed/changed from private to public or vice versa

@makkalot
Copy link
Contributor

I did some walkthrough on the code, here are my findings :

** Implementation Strategy Could Be **

  • Since this is a functionality which is not working correctly on Python side anyways we can migrate it by /github/activity calling an endpoint on v4 (which we will create). Something like enableRepositories (accepting a list of repos). This could also become a pattern of retiring the Python side gradually.
  • if we don't want to spend the extra time of migration can add the repositories event type and use the old logic if works ok.
  • Second step would be to update the event handlers for GitHubOrgAddedEvent and GitHubOrgUpdatedEvent
  • Adding functional tests for the feature

@dealako
Copy link
Member

dealako commented Oct 21, 2020

Is that where we get the new repo callback? DEV config:

Screen Shot 2020-10-21 at 3.55.31 PM.png

If so, yes, we can work to migrate this code to golang. Key points:

- Need to migrate over all existing logic
- If /v4 endpoint, need to review the API-GW pass-through that we previously added (this was a placeholder) - no handlers implemented to my knowledge
~~- Prefer to migrate - must work with EasyCLA v1 and v2 (logic is all the same for this, so not an issue) ~~

@ashav-github
Copy link

ashav-github commented Nov 18, 2020

@makkalot @dealako I tested this feature today on Dev env. and it doesn't work. Please find the detail below and let me know if I missed something:

Scenario: Add github and select All repositories option while installing CLA App. The Github Org has an existing repo with CLA enforced. Enable the 'Auto Enable New Repositories' option for the github org. Add new repo to the github org. In EasyCLA UI, the new repo should be added and cla enabled automatically

Issue Observed: The newly added repo is listed on EasyCLA UI however, CLA is not enabled automatically.

Screenshot from 2020-11-18 20-00-39.png

Test Data: Below is the test data I used for testing-

  • CLA Group: asha-foundation-clagrp2
  • GitHub organization: ashav-test-devorg1
  • Newly Added Repositories: devorg1-repo2, devorg1-repo3, devorg1-repo4, devorg1-repo5

@manishv09
Copy link

IT is working fine for me, please refer screencast for details as follows:
image.pnghttps://app.zenhub.com/files/194341141/213953ba-aafb-47c4-bdc4-1f155c3b5050/download

@manishv09
Copy link

Discussed with @pranab-bajpai and verified, hence closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
01 - High High Priority API Feature or bug relating to the EasyCLA Application Programming Interface (API). Project Console V2 Project Console for EasyCLA V2 v2
Projects
None yet
Development

No branches or pull requests

5 participants