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

CLDR-16499 Prepare to Require a CLA for contributions #3653

Merged
merged 10 commits into from
Sep 6, 2024

Conversation

srl295
Copy link
Member

@srl295 srl295 commented Apr 23, 2024

CLDR-16499

For v46, we do NOT require a CLA, but leave the code in place for the future

  • property REQUIRE_CLA off by default, if on it will enable the flow

  • no popups or menu items visible to users

  • enables loading .md files to the front end and as assets

  • improve cldrClient.getClient() to cache, speedup repeated calls

  • add notice for synchronizing webpack configuration

  • APIs for sign/revoke/read CLA

  • web flow for signing CLA and handling various cases

  • This PR completes the ticket.

ALLOW_MANY_COMMITS=true

- new claSigned bit must be true to allow writing
- store CLAs as JSON blobs in user prefs
- API to read/update/revoke CLA
- static list of signatory orgs
- new menu item for CLA

Other improvements/
- store JSON in the user settings data
- load .md file via webpack
- display markdown using marked (same as the error/wikimedia abstracts)
- fix the client so that it doesn't hit the OpenAPI spec multiple times
@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@srl295
Copy link
Member Author

srl295 commented Apr 26, 2024

@btangmu I'll fix this so that the unit tests don't need to sign a CLA !

I'm just wondering if for local testing we want a switch that auto-signs the CLA? But then again, if you create a vetter in a signing org such as Apple Google Microsoft then it won't ask for a CLA.

@srl295 srl295 self-assigned this Apr 26, 2024
@srl295 srl295 requested a review from btangmu April 26, 2024 15:31
@srl295
Copy link
Member Author

srl295 commented Apr 26, 2024

@btangmu i think this could get any feedback from you if you want to provide it, knowing we still need to review the text and the overall process. But let me know if you see any structural issues.

Copy link
Member

@btangmu btangmu left a comment

Choose a reason for hiding this comment

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

remove the commented-out code change for MainMenu.vue?

I made a couple other nit-picky comments (which I don't insist on), otherwise, it all looks great

tools/cldr-apps/js/src/views/MainMenu.vue Outdated Show resolved Hide resolved
tools/cldr-apps/js/src/views/SignCla.vue Show resolved Hide resolved
tools/cldr-apps/js/src/views/SignCla.vue Show resolved Hide resolved
@srl295 srl295 changed the title CLDR-16499 require a CLA for contributions CLDR-16499 Prepare to Require a CLA for contributions May 30, 2024
@srl295 srl295 marked this pull request as ready for review May 30, 2024 16:23
@srl295
Copy link
Member Author

srl295 commented May 30, 2024

remove the commented-out code change for MainMenu.vue?

I made a couple other nit-picky comments (which I don't insist on), otherwise, it all looks great

the menu item was removed because it's not relevant while CLAs are not required. I've changed it to being driven by a constant.

@srl295 srl295 requested a review from btangmu May 30, 2024 16:24
@srl295
Copy link
Member Author

srl295 commented May 30, 2024

@btangmu ready to review for merging and mothballing.

btangmu
btangmu previously approved these changes May 30, 2024
Copy link
Member

@btangmu btangmu left a comment

Choose a reason for hiding this comment

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

Looks great, except I suggest renaming "signed" to "dateSigned", since it's a Date, not a boolean (unless I still misunderstand), and fixing the front-end comment saying it's boolean

I've left a few comments/questions I had while studying the PR, even though I was eventually able to answer them for myself. I think it would help to add some clarifying comments for maintainability. On the front end, "user.claSigned" really means the user has signed OR doesn't need to because DO_NOT_REQURE_CLA

@@ -39,6 +46,7 @@ public UserInfo(int userid) {
this.org = null;
this.emailHash = null;
this.name = "User #" + userid;
this.claSigned = false; // TODO
Copy link
Member

Choose a reason for hiding this comment

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

TODO should have ticket link; and it's not clear what needs to be done, if anything; false makes sense for a logged-out user

* @property {string} name
* @property {boolean} unauthorized true if cla load failed
* @property {boolean} readonly true if cla may not be modified
* @property {boolean} signed true if signed, always true when returned from getCla()
Copy link
Member

Choose a reason for hiding this comment

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

on the back end, it looks like "signed" is a Date rather than boolean?

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch, that should be the date signed.

Copy link
Member

Choose a reason for hiding this comment

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

should that still be changed to a date, then?

public boolean corporate; // signed as corporate

@Schema(required = false)
public Date signed;
Copy link
Member

Choose a reason for hiding this comment

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

Date not boolean, but front-end comments say it's boolean

} else if (ClaSignature.DO_NOT_REQURE_CLA
&& !config.getProperty("REQUIRE_CLA", false)) {
// no CLA needed unless CLDR_NEED_CLA is true.
return new ClaSignature("DO_NOT_REQURE_CLA");
Copy link
Member

Choose a reason for hiding this comment

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

this constructor presumably sets signed = true or signed = Date... OK, I've confirmed this suspicion

this.name = "Testing CLA: " + string;
this.employer = "Testing CLA";
this.corporate = true;
this.signed = new Date(0);
Copy link
Member

Choose a reason for hiding this comment

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

OK, here's the constructor used for DO_NOT_REQURE_CLA, setting signed = Date, which is treated as true

@@ -153,6 +161,10 @@ export default {
this.voteCountMenu = null;
this.voteLevelChanged = 0;
}

// only need CLA if logged in
this.needCla = !!user && !user.claSigned;
Copy link
Member

Choose a reason for hiding this comment

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

I'm guessing that if DO_NOT_REQURE_CLA is true on the back end, then user.claSigned will get true (or truthy Date object?), even though that's sort of a fiction... OK, I've confirmed that

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

@srl295
Copy link
Member Author

srl295 commented Sep 4, 2024

@btangmu I'll fixup this one and get it in. It has a number of general improvements.

@srl295
Copy link
Member Author

srl295 commented Sep 6, 2024

@btangmu @macchiati this is ready to go in. it is disabled by default, but gets all the mechanism for requiring a CLA in place (just pending wording changes)

Copy link
Member

@macchiati macchiati left a comment

Choose a reason for hiding this comment

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

Sgtm. Tom should review details

@srl295 srl295 merged commit 2ebe44f into unicode-org:main Sep 6, 2024
13 checks passed
@srl295 srl295 deleted the cldr-16499/cla branch September 6, 2024 17:04
@srl295
Copy link
Member Author

srl295 commented Sep 6, 2024

@macchiati Tom had previously approved, just had merge conflicts.

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.

3 participants