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

9297 feature flags #9299

Merged
merged 9 commits into from
Mar 20, 2023
Merged

9297 feature flags #9299

merged 9 commits into from
Mar 20, 2023

Conversation

poikilotherm
Copy link
Contributor

@poikilotherm poikilotherm commented Jan 18, 2023

What this PR does / why we need it:
Introduce feature flags to enable/disable experimental and previews of features.

Which issue(s) this PR closes:

Closes #9297

Special notes for your reviewer:
None so far.

Suggestions on how to test this:
Unit test is provided, otherwise nothing fancy to test here...?

Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Nope.

Is there a release notes update needed for this change?:
Not sure. Please provide guidance.

Additional documentation:
🔋 included.

@poikilotherm poikilotherm added User Role: Sysadmin Installs, upgrades, and configures the system, connects via ssh Testing: API labels Jan 18, 2023
Adding a Feature Flag
^^^^^^^^^^^^^^^^^^^^^

Some parts of our codebase might be opt-in only. Experimental or optional feature previews can be switched on using our
Copy link
Member

Choose a reason for hiding this comment

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

Suggested addition after the first sentence. They may be only for developers/not intended for production, and/or temporary. (Experimental or optional features that can be used in production and are intended to remain, perhaps with some change over time, Experimental or optional feature previews...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I think I got what causes the confusion here now - we already do experimental things and simply used configuration and not flags for this before! Are you talking about "dev only" because of this? (That's actually not what I see in this mechanism)

Here's a bold statement: as we seem to getting more and more of these now, how about we make all the other experimental things using this flag thing, too, so we are consistent again?

Copy link
Member

Choose a reason for hiding this comment

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

That would put #9290 which shouldn't get used in production and presumably will be going away back in the list of things you can use now and that we expect to stay around. I suppose that could be handled by strong messaging on that PR.

It also means anyone using these features has to reconfigure for 5.13? And we'd have to decide what to do with features that require some config info - do all their settings move to be under feature or do you turn them on one way and configure them elsewhere? Again, solvable problems, but I don't see a lot of benefit either.

This is definitely something where there probably isn't one right answer and I don't care much how it comes out as long as we don't confuse experimental things you can use in production with things that shouldn't through some form of messaging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would put #9290 which shouldn't get used in production and presumably will be going away back in the list of things you can use now and that we expect to stay around. I suppose that could be handled by strong messaging on that PR.

That is a good and valid point - maybe there should be a forth column in the list that indicates security level? Maybe this should even be marked @Deprecated in code if it is serious for production so it becomes more visible this needs more work.

It also means anyone using these features has to reconfigure for 5.13? And we'd have to decide what to do with features that require some config info - do all their settings move to be under feature or do you turn them on one way and configure them elsewhere? Again, solvable problems, but I don't see a lot of benefit either.

Well if we want to migrate existing things to this mechanism, we certainly will be able to make this backward compatible. (As done before for JvmSettings)

This is definitely something where there probably isn't one right answer and I don't care much how it comes out as long as we don't confuse experimental things you can use in production with things that shouldn't through some form of messaging.

I agree. Another thought: while the session auth thing is maybe not perfectly secure, isn't this something that we probably will turn on during the process of moving to the SPA at least at demo.dataverse.org? We will need that session auth thing if we want to demonstrate using both in parallel. This kind of makes this thing a bit blury.

Copy link
Member

Choose a reason for hiding this comment

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

I think the existing line conveys the main points:

  • opt-in
  • experimental
  • optional

That said, no objection if someone wants to add more. To me, feature flags are a common term in the industry. Most developers have probably heard of them.

@mreekie
Copy link

mreekie commented Jan 18, 2023

sizing:

  • discussed with oliver and guillermo
  • size: 3

@mreekie mreekie added the Size: 3 A percentage of a sprint. 2.1 hours. label Jan 18, 2023
Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

@poikilotherm poikilotherm marked this pull request as ready for review January 18, 2023 17:06
@poikilotherm
Copy link
Contributor Author

@pdurbin any thoughts about renaming? Or making the scope smaller? Or migrating other experimental things to use this? (Could create a follow-up issue for this.)

@poikilotherm poikilotherm self-assigned this Mar 9, 2023
@kcondon kcondon moved this from Ready for QA ⏩ to Review 🔎 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Mar 9, 2023
@kcondon kcondon moved this from QA ✅ to Ready for Review ⏩ in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Mar 9, 2023
@kcondon kcondon moved this from Ready for Review ⏩ to IQSS Team - In Progress 💻 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Mar 9, 2023
@poikilotherm
Copy link
Contributor Author

poikilotherm commented Mar 13, 2023

I wasn't aware that this is now a blocker for @GPortas - sorry! What I put in my old head was that you would do sth. to be non-blocked by this. Sorry for the misunderstanding involved!

I do have some stuff saved locally as a stash to evolve this into "EmergingFeature" and "ExperimentalFeature", addressing more of Jim's comments and which is an output of a discussion @GPortas and I had on Zoom. I don't recall if we took any notes. FWIW, I'll push this stuff to this branch as is so we can come back to it later if we need to.

As @pdurbin is happy with this PR and as it unblocks @GPortas, I'll put this back into review.

@poikilotherm poikilotherm marked this pull request as ready for review March 13, 2023 13:37
@poikilotherm poikilotherm moved this from IQSS Team - In Progress 💻 to Ready for QA ⏩ in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Mar 13, 2023
@pdurbin
Copy link
Member

pdurbin commented Mar 13, 2023

@poikilotherm thanks! ❤️

There are no new commits since I tested this, so I'll just go ahead and move it to QA.

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

I tested this and it seems to work well: #9299 (comment)

Moving to QA.

@kcondon kcondon self-assigned this Mar 15, 2023
@kcondon kcondon removed their assignment Mar 15, 2023
@mreekie
Copy link

mreekie commented Mar 15, 2023

grooming:

  • This has been bumped back today from QA to read for qa
  • however, we don't resize if it's made it to QA so no bleedover.

@kcondon kcondon self-assigned this Mar 20, 2023
@kcondon
Copy link
Contributor

kcondon commented Mar 20, 2023

This passes basic smoke test. I did not test the mechanism as there is not yet any example feature using this. I'm relying on Phil's test case results and the existing unit test for targeted testing. Can be merged when integration tests pass.

@pdurbin
Copy link
Member

pdurbin commented Mar 20, 2023

The API tests never ran. The spin up scripts died here:

TASK [dataverse : fire off installer] ******************************************
Connection to ec2-3-237-1-249.compute-1.amazonaws.com closed by remote host.

From https://jenkins.dataverse.org/job/IQSS-Dataverse-Develop-PR/job/PR-9299/8/console

@pdurbin
Copy link
Member

pdurbin commented Mar 20, 2023

I just merged the latest. Go, API tests! Go!

@coveralls
Copy link

Coverage Status

Coverage: 20.18% (+0.03%) from 20.153% when pulling 612eae6 on poikilotherm:9297-feature-flags into 8e5c5f9 on IQSS:develop.

@pdurbin
Copy link
Member

pdurbin commented Mar 20, 2023

@kcondon kcondon merged commit 308d5e3 into IQSS:develop Mar 20, 2023
IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from QA ✅ to Done 🚀 Mar 20, 2023
@pdurbin pdurbin added this to the 5.14 milestone May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Code Infrastructure formerly "Feature: Code Infrastructure" Feature: Developer Guide Feature: Installation Guide Size: 3 A percentage of a sprint. 2.1 hours. User Role: Sysadmin Installs, upgrades, and configures the system, connects via ssh
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Create feature flags based on JVM settings to enable/disable experimental features
6 participants