Граф коммитов

297 Коммитов

Автор SHA1 Сообщение Дата
Jason Robbins 8e147a4e21
Add gates for enterprise, debuggability, testing, and adoption. (#2701) 2023-01-30 12:32:39 -08:00
Jason Robbins 5d90dcb53e
Define team gates for privacy and security (#2690)
* Progress on defining team gates.

* Not ready for testing gate yet.

* added tests

* Dont crash on unknown gates

* Keep up with changes to votes return value.

* Update internals/schema_migration.py

Co-authored-by: Kyle Ju <kyleju@google.com>

---------

Co-authored-by: Kyle Ju <kyleju@google.com>
2023-01-27 10:24:10 -08:00
Kyle Ju 1fd4efb936
Phase out ApprovalsAPI Get (#2681)
* Phase out ApprovalsAPI Get

* Fix comments

Co-authored-by: Kyle Ju <kyleju@chromium.org>
2023-01-24 12:39:50 -08:00
Daniel Smith 89b2b936e3
sort prefetched stages (#2667) 2023-01-13 10:49:53 -08:00
Daniel Smith 820bb801dc
Add trial extensions (#2656)
* trial extensions displayed and edited with trials

* edit extension info on editall

Also, display trial info on detail page

* thorough commenting

* concat stageIds

* Add corner case cover

Display only extension info if it exists but the original trial extension information does not.

* Allow users to create trial extension stages

* fix test

* fix gates in test

* remove extension fields from dep trial stage
2023-01-12 12:35:10 -08:00
Kyle Ju d4c11185c1
Vote API drive-by fix (#2662)
* Vote API drive-by fix

* Fix

* Reset gate column file

* nit

Co-authored-by: Kyle Ju <kyleju@chromium.org>
2023-01-12 12:03:09 -08:00
Kyle Ju e8591b3da1
Clean up do_post in Comment APIs (#2653)
* Clean up do_post in Comment APIs

* Remove approval bit in Comment API

* Nit

* nit

* Renaming

Co-authored-by: Kyle Ju <kyleju@chromium.org>
2023-01-11 17:20:31 -08:00
Daniel Smith 034eec4825
Support for multiple trial extension stages (#2655)
* trial extensions displayed and edited with trials

* edit extension info on editall

Also, display trial info on detail page

* thorough commenting

* concat stageIds

* Add corner case cover

Display only extension info if it exists but the original trial extension information does not.
2023-01-11 13:27:44 -08:00
Jason Robbins 1908f6abee
Make feature list faster while still including stages. (#2654)
* Make feature list faster while still including stages.

* Only fetch stages for cache misses
2023-01-11 11:49:49 -08:00
Kyle Ju a0f9d57da8
Display correct comments for gate (#2644)
* Display correct comments for gatechip

* Update api/comments_api_test.py

* Add a test

Co-authored-by: Kyle Ju <kyleju@chromium.org>
2023-01-10 17:11:49 -08:00
Daniel Smith a7554930c8
move 'ready_for_trial_url' to the devtrial stage (#2630) 2023-01-06 13:08:20 -08:00
Daniel Smith 3d18ef0020
prototype stage editing (#2629) 2023-01-06 12:59:33 -08:00
Daniel Smith 7ee39ccf88
make trial extension fields editable (#2624) 2023-01-05 16:02:13 -08:00
Daniel Smith 591e74b04b
Feature cache is invalidated after stage changes (#2621)
* cache is invalidated after stage changes

* remove unused variable declaration
2023-01-05 10:30:42 -08:00
Daniel Smith 87c94946f3
Allow display of enterprise rollout stage for all feature types (#2616)
* create new stages on the feature detail page

* comments and spacing

* populate and display stage-specific fields

* remove unused import

* fix tests

* changes suggested by @jrobbins

* Update chromedash-feature-detail.js

* remove unused variable

* Allow rollout stage in all feature types
2023-01-03 15:59:03 -08:00
Daniel Smith 556986987a
Display and edit stage-specific data for multiple stages of the same type (#2612)
* create new stages on the feature detail page

* comments and spacing

* populate and display stage-specific fields

* remove unused import

* fix tests

* changes suggested by @jrobbins

* Update chromedash-feature-detail.js

* remove unused variable
2023-01-03 13:57:41 -08:00
Daniel Smith 6b3c5602fa
create new stages on the feature detail page (#2611)
* create new stages on the feature detail page

* comments and spacing

* remove unused import

* changes suggested by @jrobbins

* Update chromedash-feature-detail.js

* change capitalization
2023-01-03 10:42:23 -08:00
Daniel Smith dc21593610
Stage field organization (#2598)
* unique field partitioning

* correct prototype/incubate fields

* remove duplicate metadata form definition

* mark stage-specific fields

* reorganize stage field sections

* Change datatypes for field organization (WIP)

* display fields using new structure

* update editall to use stage ID

* Fix and remove irrelevant test

* remove unused process stage calls

* remove incorrect comment

* fix test

* Additional comments

* small wording change
2022-12-27 14:52:37 -08:00
Jason Robbins 7c40e1873a
Implement voting in gate column (#2603)
* progress

* Implement voting
2022-12-22 13:32:46 -08:00
Daniel Smith 0d4e810349
fix CC emails property name (#2600)
* fix CC emails field name

* add TODO
2022-12-22 11:25:16 -08:00
Daniel Smith 9a1ae3277f
Add back created and updated fields to features_v2.json (#2599)
* add back created and updated fields

* fix test
2022-12-21 13:45:45 -08:00
Daniel Smith cc3a46fa92
Use specific stage data for viewing and editing feature data (#2561)
* display and edit stages based on stage ID

* fix test

* defensive coding with intent stages

* new routes

* save active_stage_id in guide.py

This change is set to land in a separate PR.

* display active stage on detail page correctly

* remove "SHIPPED" stage types

* fix processes and tests

* add shipped form field to shipping form field

* Show matching process stages on process overview

* fix tests

* remove active_stage_id reference

* remove active_stage_id from test

* typo

* update url

* fix web test

* Consolidate "prepare to ship" and "ship"

* add small comment

* remove duplicated function

* clear up logic for writing to stages

* backwards-compatible urls and api

* Update tests
2022-12-20 10:07:18 -08:00
Daniel Smith 79d397eefc
Use active_stage_id to display active on detail page (#2557)
* Use active_stage_id to display active on detail pg

* match stage ID only to determine active stage
2022-12-19 13:48:32 -08:00
Jason Robbins 414f673af9
Implement votes_api and move some code around. (#2586) 2022-12-15 17:47:21 -08:00
Jason Robbins 1102381e68
Introduce permission to comment. More perms checks in approvals dialog. (#2582) 2022-12-13 12:56:08 -08:00
Yann Dago 3648c79e02
Add rollout stage to the edit_all page (#2537)
* Add rollout stage to the edit_all page

- Show the rollout stage in the edit all page for all non-enterprise feature types
- Use STAGE_ENT_ROLLOUT as the id for the piggybacking on the Shipping stage.

* Ensure rollout stage is shown on edit all page

Co-authored-by: Daniel Smith <56164590+DanielRyanSmith@users.noreply.github.com>

* Use copy of forms on edit all page

Co-authored-by: Daniel Smith <56164590+DanielRyanSmith@users.noreply.github.com>
2022-12-07 19:20:45 -05:00
Daniel Smith d229c51ea9
update converter to give a list of stage info (#2554) 2022-12-07 12:15:15 -08:00
Daniel Smith b8c0593ecb
Milestone search fix (#2545)
* add milestone field for searching

* comments

* fix test

* fetch stages asynchronously
2022-12-05 18:28:45 -08:00
Daniel Smith a58d2bda77
Create Stages API (#2535)
* Add new stages API

* add routes and mypy

* changes/fixes suggested by @jrobbins
2022-12-05 13:10:14 -08:00
Jason Robbins 73770850d6
Exclude enterprise features from search results by default. (#2531)
* Exclude enterprise features from search results by default.

* Update internals/search.py

Co-authored-by: Kyle Ju <kyleju@google.com>

Co-authored-by: Kyle Ju <kyleju@google.com>
2022-12-01 14:28:26 -08:00
Jason Robbins d347e13b53
Ensure that enterprise features are not shown on roadmap. (#2532) 2022-12-01 12:50:17 -08:00
Daniel Smith f322a477b4
Add comments describing stage ID in tests (#2524) 2022-11-30 10:08:15 -08:00
Yann Dago b2029cdd7c
Add migrate enterprise stages from INTENT_SHIP to INTENT_ROLLOUT (#2502) 2022-11-28 11:33:48 -08:00
Yann Dago b465758c63
Add enterprise feature and breaking change support (#2482)
* Add enterprise feature and breaking change support

* jcsotti review comments

* jrobbins review comments

* Fix tests

* jcsotti comments: Add tests

* Add enterprise feature and breaking change support

* jcsotti review comments

* jrobbins review comments

* Fix tests

* jcsotti comments: Add tests

* jcsotti comments: Add tests

* Fix CI

* Fix CI

* Add type checking
2022-11-22 14:09:59 -08:00
Daniel Smith fd0efa8b0c
Add more FeatureEntry converter tests (#2485)
* Add more feature entry converters tests

* code cleanup
2022-11-17 16:06:36 -08:00
Daniel Smith 26defeb307
Dev API unit tests (#2486)
* dev API unit tests

* code cleanup
2022-11-17 16:06:12 -08:00
Daniel Smith bdf12e24d9
Add dev API to write and delete test data (#2475)
* Write and delete data for dev environments

* Add 2nd feature entry

* write old Feature entities as well

* More thorough commenting

* Make sure endpoints can only be used locally

* update return statements

* devtrial_instructions is a link

* changes suggested by @jrobbins

* comment change
2022-11-16 22:48:38 -08:00
Daniel Smith 733bc9a8c5
Use FeatureEntry entities to display roadmap information (#2480)
* refactor get_in_milestone() to use FeatureEntry

* Update comments

* changes suggested by @jrobbins

* update tests
2022-11-16 16:45:08 -08:00
Daniel Smith 2602d06d81
Update and handle deprecated views fields (#2484)
* Update and handle deprecated views fields

* value reference consistency

* changes suggested by @jrobbins
2022-11-16 16:09:14 -08:00
Daniel Smith 671b23a704
Use FeatureEntry entities for "All Features" page (#2469)
* Use FeatureEntry for displaying all features list

* remove TODO

* update testing for new function

* Update comments
2022-11-16 15:28:17 -08:00
Daniel Smith a8d59e7559
Views field bug fix (#2481)
* Update converters.py

* add temporary migrate_fe_views function
2022-11-15 17:07:53 -08:00
Daniel Smith d5ba6dc59a
Reference feature stages as possibly plural (#2478)
* Reference feature stages as possibly plural

* update tests

* Check that milestones is not null first

* extra line
2022-11-15 15:34:09 -08:00
Daniel Smith e57ee74a68
Show motivation value in deprecation features (#2464) 2022-11-10 11:37:21 -08:00
Jason Robbins 6ed512c638
Check for undefined MilestoneSet. (#2446) 2022-11-08 09:00:14 -08:00
Daniel Smith 58e1dc4cf6
Update processes API to use FeatureEntry entities (#2438) 2022-11-06 13:00:26 -08:00
Daniel Smith e2ce1d405e
Use FeatureEntry for most client-side use cases (#2433)
* Use FeatureEntry entity for most client-side uses

* leave notify and amendments to Feature for now

* handle redis keys
2022-11-06 12:57:40 -08:00
Jason Robbins d9eb639ac5
Display a "Comments & activity" log at the bottom of the feature detail page. (#2413)
* Intial code for display of amendments

* tests

* More tests, and avoid showing non-useful amendments

* More tests

* Put Loading... in a paragraph tag.

* Indent amendment details
2022-11-02 13:58:37 -07:00
Jason Robbins b9a657b3f0
Implement chromedash-gate-chip. (#2421) 2022-11-02 13:23:03 -07:00
Daniel Smith c12b3a7c87
Verbose FeatureEntry to JSON function (#2410)
* verbose FeatureEntry to json function

* detailed commenting for clarity

* changes suggested by @jrobbins
2022-11-02 10:25:27 -07:00
Jason Robbins bb973677f2
Do double-writes of star_count. (#2428) 2022-11-02 10:04:48 -07:00
Jason Robbins 5ece792be3
Upgrade search to use FeatureEntry (#2416)
* Partial progress

* "me" queries and tests

* maybe work around mypy error
2022-10-31 10:34:30 -07:00
Daniel Smith 49814ec1fa
Use Vote and Gate entities for handling approvals (#2402)
* basic refactoring

* Use Vote and Gate entities for reading and writing

* update tests

* remove old Approval to JSON function

* type hints

* Add gate_type to Vote entity

* review changes

- Remove stage and gate info from format_for_template()
- Add new Vote index
- Change approvals_api.do_post() to take gate type rather than gate id.
2022-10-27 13:20:44 -07:00
Daniel Smith 87a7a23d1f
Move Feature methods to helper files (#2407)
* type hints

* Revert "type hints"

This reverts commit 9ffab5aabd.

* Move feature functions to separate helpers file

* remove import

* more import removal

* end of file newline

* mypy ignore ndb

* @jrobbins review changes

- Removed older standardization field logic
- Added TODO for migration script for values in migrate_views()
2022-10-27 10:17:54 -07:00
Daniel Smith 49fb21595d
Run mypy in Github continuous integration checks (#2324)
* run mypy in CI

* more type hint fixing

* Update requirements.txt

* google.cloud import workaround

https://github.com/python/mypy/issues/10360

* Revert "google.cloud import workaround"

This reverts commit e03dbc7bbeb67acc81f57b9c5d905b9141952dbc.

* mypy google.cloud workaround

https://github.com/python/mypy/issues/12985

* fix regular tests

* remove --install-types flag

* last mypy fix

* type fixes for address_reasons

* move email lists creation

* update for newly merged changes

* Fix regular tests

* Changes suggested by @jrobbins

* Catch invalid requests

* small type hint

* Change methods to properly override

* revert to previous implementation

* revert test

* add back original validate request type method

* remove unused import and rearrange methods

* remove comment string casting; add test back

* add ndb ignore

* Update test_html_rendering.html

* mypy fix

* remove merge addition
2022-10-24 06:40:21 -07:00
Daniel Smith a0aa5ccb42
Schema migration staging fixes 2022-10-19 (#2369)
* staging fixes 2022-10-19

- Fixed approval_defs.set_vote() to write gate_id properly to Vote entity (previously was erroneously writing gate_type to gate_id).
- Created Gate entities in tests to allow Vote entities to be properly written.
- Incremented stage counts in schema_migration script properly reflect the amount of stages created.
- Removed Vote double-write call in Approval.set_approval() (this is no longer needed).

* Update approval_defs.py
2022-10-19 14:53:45 -07:00
Kyle Ju 582a594aa8
Use get_int_arg for integer arg parsing (#2359)
* Replace with get_int_arg usage

* Address comments

Co-authored-by: Kyle Ju <kyleju@chromium.org>
2022-10-19 14:08:42 -07:00
James C Scott III 385d62374b
Add assertions for the templates in #2355 (Part 2 of 2) (#2356)
* Add assertions for the templates in #2355

- Move the TESTDATA functionality to a testing_config to be a test helper.
In this new helper, users can still retreive from it like a dictionary.
In addition, there's a helper function to help make goldens that can be
used to regenerate the golden templates. Add commented out
code to use it.
- Add some clean ups to individual tests or test cases. This was needed
because some of the existing rendering tests would pull from the database.
But since they only asserted for the existence of some values, it did
not matter. In the future, we can add mocks for all of those.
  - These cleanups also help for more than the rendering tests. Before these fixes, there were ~15 non-rendering tests that would fail if a developer ran the full suite with a clean db, then re-ran a test indivdually without resetting the database. There are still 2 non-rendering tests that fail without clearing the database first. But this first iteartion got a lot of them.
- Add a missing test for the PrepublicationHandler to increase coverage

* address comments

* more cleanup
2022-10-19 10:14:52 -04:00
Kyle Ju dca47ebe61
Unify int arg parsing (#2357)
Co-authored-by: Kyle Ju <kyleju@chromium.org>
2022-10-18 15:22:38 -07:00
Kyle Ju beec3b1488
Add num query param for metrics data (#2354)
* Add num query param for metrics data

* Fix

* Address comments

Co-authored-by: Kyle Ju <kyleju@chromium.org>
2022-10-18 13:55:29 -07:00
Jason Robbins 9e5aa80726
Add pagination parmeters to feature search API. (#2352) 2022-10-18 10:02:03 -07:00
Daniel Smith 1dd6211cb5
Refactor Gate and Vote to update Gate state when setting Votes (#2341)
* refactor Gate and Vote

* small type hints

* changes suggested by @jrobbins
2022-10-16 08:43:52 +02:00
Daniel Smith 9ed293d7a2
Change existing handler classes to properly override request methods (#2342)
* Change methods to properly override

* Update comments_api.py

* Update comments_api.py
2022-10-16 08:39:35 +02:00
Daniel Smith 93e57a44f3
Use new Activity entities to display comments (#2321)
* Use Activity entities to view comments

* Update review_models_test.py

* @jrobbins suggested changes
2022-10-12 13:02:35 +02:00
Daniel Smith 3d511e4553
Some introductory type hinting and refactoring (#2319)
* some introductory type hinting and refactoring

* Update user_models.py
2022-10-12 09:16:36 +02:00
Daniel Smith 75b7c85953
default values for some required fields (#2310) 2022-10-10 19:43:40 +02:00
Daniel Smith 7b08f2a6b8
Write and edit FeatureEntry entities when creating Features (#2278)
* Double write Feature and FeatureEntity entries

* Update tests

* tuples as needed
2022-10-03 10:11:05 -07:00
Daniel Smith 6843e32824
Schema migration writing comment activities (#2273) 2022-09-27 09:05:24 -07:00
Jason Robbins c6982a460f
Omit cookies for metrics data requests because of Vary: Cookie (#2268)
* Omit cookies for metrics data requests because of Vary: Cookie

* Also omit cookies for timeline data.
2022-09-26 14:25:20 -07:00
Daniel Smith a49ef32b30
Handle inactive users (#2243)
* handle inactive users

Notify inactive users at 6 months and remove inactive users at 9 months

* Changes suggested by @jrobbins

* update comment
2022-09-15 13:43:22 -07:00
Kyle Ju ceb79c7a01
Flush metrics specific data in Redis (#2235)
* Migrate feature cache

* Flush metrics specific data in Redis

Co-authored-by: Kyle Ju <kyleju@chromium.org>
2022-09-14 10:19:12 -07:00
Kyle Ju fe65355d6a
Completely migrate feature-related cache off ramcache (#2234)
* Implement scan

* Migrate feature cache

* Address comments

* Fix

* Add cache_key argument

Co-authored-by: Kyle Ju <kyleju@chromium.org>
2022-09-14 10:07:32 -07:00
Jason Robbins 0fc62d05ff
Clarify where we load features directly from the DB, not cache. (#2239) 2022-09-13 16:30:34 -07:00
Kyle Ju e5f9a7b642
Create Redis staging setup (#2211)
* Redis staging setup

* Add an if for staging

* Implement Redis caching APIs (#2212)

* Redis APIs

* Nit

* Partially migrate Ramcache usage to Redis (#2214)

* Migrate all fields except feature-related cache

* Fix

* Address comments

Co-authored-by: Kyle Ju <kyleju@chromium.org>

Co-authored-by: Kyle Ju <kyleju@chromium.org>

Co-authored-by: Kyle Ju <kyleju@chromium.org>
2022-09-12 13:56:50 -07:00
Kuan-Hsuan (Kevin) Shen 34f38346b2
Move display field defs to JS and remove fielddefs API (#2219)
* Migrate guide/stage page forms to JS

* Complete migration of forms to JS

* Move display field defs to JS and remove fielddefs API

* Fix line separation bug

* Filter out `['']` values due to the anticipated spec change field change

* Fix typo

* Change anticipated_spec_changes to regular textarea
2022-09-08 18:28:30 -04:00
Kuan-Hsuan (Kevin) Shen 5c63667bd4
Avoid roadmap cards with the same version (#2216) 2022-09-07 12:25:09 -04:00
Kuan-Hsuan (Kevin) Shen 984455c18c
Populate blink components form field options via an API (#2187)
* Populate blink components form field options via an API

* remove console.log

* Add missing spaces
2022-08-31 13:42:50 -04:00
Daniel Smith 9970ec3d7a
Enable new permissions system (#2174)
* enable new permissions

* review changes
2022-08-26 15:30:55 -07:00
Jason Robbins f03ebaaae7
Change NEED_INFO to NEEDS_WORK. (#2170) 2022-08-25 10:58:57 -07:00
Daniel Smith 1ae2ad5d35
Comment log improvements (delete and undelete comments) (#2166)
* comment timestamps match monorail

* remove logs

* add tests and handle corner cases

* use shoelace component

* allow deleting and undeleting comments

* Changes based on @jrobbins review

* cleanup
2022-08-24 16:08:01 -07:00
Jason Robbins 697cf9b38d
Refactor remaining models.py code into core_models.py (#2160)
* Refactor remaining models.py to core_models.py.

* Move tests to the right _test file.
2022-08-23 16:00:02 -07:00
Jason Robbins ef12d38542
Refactor review-related models. (#2152)
* Refactor review-related models.

* fix typo
2022-08-22 10:34:10 -07:00
Jason Robbins 689483c0f3
Refactor user-related models into a separate file. (#2141) 2022-08-17 18:14:19 -07:00
Jason Robbins 567486d67a
Fix metrics JSONification. (#2130) 2022-08-15 20:11:54 -07:00
Kuan-Hsuan (Kevin) Shen 1ae5da72d4
Convert guide/edit page into a component (#2118)
* Remove guide.scss and convert edit page subheader

* Add progress API and convert rest of edit page

* Refine loading skeletons and unit tests
2022-08-15 12:04:36 -04:00
Jason Robbins 0972d89600
Refactor models.py enums into core_enums.py. (#2106) 2022-08-12 15:49:32 -07:00
Jason Robbins e0651d191b
Refactor metrics-related models out of models.py. (#2100) 2022-08-12 15:44:04 -07:00
Jason Robbins d709013a8b
Add logging to investiage failure to remove review requests. (#2096) 2022-08-10 14:31:11 -07:00
Jason Robbins 7866c63100
Sort pending reviews by review request date via sort= query string param (#2082)
* progress

* Finished and added python tests.

* removed commented-out code
2022-08-03 15:25:17 -07:00
Daniel Smith 6bc5ebb3c4
update last_visit on token refresh or login (#2051) 2022-07-20 09:42:46 -07:00
Kuan-Hsuan (Kevin) Shen d75df5722e
Add chromedash-metrics-page (#2018)
* Add chromedash-metrics-page

* Separate stack-rank and timeline pages

* Separate CSS and JS renderNavBar
2022-07-14 12:46:47 -04:00
Daniel Smith 83e77b9d5b
New permissions system implementation (#2011)
* Check edit permissions by individual feature

* update logic to check permissions

* editors field added

* editors can see edit access in UI

* myfeatures shows editable features

* Make editor field plural

* 1 more plural update

* change var name for site editor

* Editors can delete a feature

* Site editors can now be designated in admin ui

* fix existing tests to work with new changes

* feature and permissions tests

* accounts and models test

* new creator field

* update tests for creator field

* code cleanup

* add creator field to new feature

* unlisted features are displayed in "My Features"

If the user is the creator, an owner, or an editor.

* slight update in unlisted features logic

* My features displays all editable features

in a single dropdown.

* fix web tests

* add test to ensure creator can edit feature

* remove unused _reject_or_proceed() change

* remove mangle and log statement

* Set original permissions

All changes to permissions.py removed.
This commit can be reverted to enable to new permissions system.

* changes suggested by @jrobbins

* update from merge

* remove creator field for later implementation

* changes suggested by @jrobbins
2022-07-13 14:31:27 -07:00
Kuan-Hsuan (Kevin) Shen 15a582228b
Add settings API and settings page component (#1993)
* Add settings API and settings page component

* Fix lint error
2022-07-05 17:38:02 -04:00
Jason Robbins a1db9e2e6a
Implement search result paginaton in the server-side internals. (#1984) 2022-06-30 10:41:37 -07:00
Kuan-Hsuan (Kevin) Shen 40f7323144
Add permissions API and move all feature content and js scripts into feature-page component (#1972)
* Add process and fieldDefs APIs and move components

* Add processes, cues, fielddefs tests

* Fix typos

* Add `permissions_api` and clean up `feature.html`

* Add permissions_api test and improve feature page test

* Change TODOs, rename test response variables
2022-06-25 10:54:02 -04:00
Kuan-Hsuan (Kevin) Shen ae669d7159
Add `do_get` for `processes_api`, `fielddefs_api`, and `cues_api` (#1970)
* Add process and fieldDefs APIs and move components

* Add processes, cues, fielddefs tests

* Fix typos

* change the process route and function names
2022-06-24 19:34:24 -04:00
Jason Robbins d10158d9f5
Remove backward compat with Google Sign-In. (#1883) 2022-05-13 07:58:47 -07:00
Jason Robbins a9960a0de1
Refresh user session when refreshing XSRF token. (#1804)
* Refresh user session when refreshing XSRF token.

* Refresh the user session on each page navigation, and fix a bug in XSRF refresh.
2022-03-25 16:46:40 -07:00
Jason Robbins b8582da8b0
Accept either old or new login requests during transition. (#1785)
* Accept either old or new login requests during transition.

* Made suggested edit

* Update api/login_api.py

Co-authored-by: Kyle Ju <kyleju@google.com>
2022-03-14 16:30:50 -07:00
Kyle Ju fcf3a96adb
Migrate sign-in Google Identity Services library (#1729)
* Migrate Google sign-in

* fix

* Reapply changes

* Fix tests

Co-authored-by: Joseph Medley <jmedley@google.com>
2022-03-11 11:52:54 -08:00
Jason Robbins 1871cdee22
Use new session contents (#1773)
* Use new session contents

* Added unit tests
2022-03-10 12:22:19 -08:00
Jason Robbins b13d480196
Support structured terms in user queries (#1748)
* progress

* initial functionality done

* Support structured terms in user queries.

* addressed review comments

* updated comments
2022-03-05 10:46:09 -08:00
Jason Robbins fe3f910336
In py3 code, replace the separate mock lib with unittest.mock. (#1665) 2022-01-11 08:20:40 -08:00
Jason Robbins 8b6e1c59e3
Add indexes for queries done when closing a review. (#1660) 2022-01-05 08:26:33 -08:00
Jason Robbins 03bcef81f1
Implement a UI for editing approval configs (#1633)
* Starting point

* laid out config display

* Fetching config data

* Implemented save and revised API param requirements

* Always send lists of possible owners.

* Revert unintented index.yaml changes

* address review feedback

* Clarified conditional defaults
2021-12-07 16:13:42 -08:00
Jason Robbins 6d86f9e31b
Implement a new approval config datastore entity type and API (#1625)
* progress

* Added tests and csClient call.

* Added date format ValueError exception handler
2021-12-01 13:40:00 -08:00
Jason Robbins 7ab852cb80
Implement posting review comments to blink-dev mailing list. (#1611)
* Implement posting review comments to blink-dev mailing list.

* Update internals/notifier.py

Co-authored-by: Kyle Ju <kyleju@google.com>

Co-authored-by: Kyle Ju <kyleju@google.com>
2021-11-22 14:41:00 -08:00
Jason Robbins 60f0beff37
When an intent review is complete, make it no longer pending. (#1597)
* When an intent review is complete, make it no longer pending.

* Meged with change from NEEDS_REVIEW to REVIEW_REQUESTED
2021-11-09 08:21:06 -08:00
Jason Robbins bef1cf9aa3
Make fieldId optional in comments API. (#1593)
* Make fieldId optional in comments API.

* Add index needed for retrieving review comments.

* Add index needed for retrieving review comments.

* Add index needed for retrieving review comments.

* Add index needed for retrieving review comments.

* Add index needed for retrieving review comments.
2021-11-01 15:08:05 -07:00
Jason Robbins a98d996f26
Set approval by specifying featureId in URL only. (#1594) 2021-11-01 15:07:45 -07:00
Jason Robbins 2d60a480e6
Add some APIs needed for approvals dialog. (#1585)
* Add some APIs needed for approvals dialog.

* Addressed review comments

* clarified comment
2021-10-19 16:56:37 -07:00
Jason Robbins c321a95423
Fix missing import of settings. (#1579) 2021-10-08 11:17:46 -07:00
Jason Robbins a17119f915
Send smaller log lines (#1575)
* progress

* progress
2021-10-07 12:48:50 -07:00
Jason Robbins ff74f08c4a
Implement pending-approval-by:me query. (#1565) 2021-09-30 11:03:14 -07:00
Jason Robbins 527c49abed
Move routing configuration to main.py. (#1552)
* Move routing configuration to main.py.

* inline_file works so we dont need this directive

* rebased

* Removed __future__s
2021-09-23 13:01:43 -07:00
Jason Robbins 548828aaa0
Some easy pylint fixes. (#1557) 2021-09-23 12:04:33 -07:00
Kyle Ju b6bb10195a
Run 2to3 to detect py2 to py3 changes (#1551)
* Run 2to3 -w -n .

* Update internals/fetchmetrics.py

* Update internals/models.py

* Update internals/notifier.py

* Update pages/blink_handler.py

* Update internals/fetchmetrics.py
2021-09-22 18:23:14 -07:00
Jason Robbins ab44dc551d
Fix a test failure in api/. (#1549) 2021-09-21 17:49:58 -07:00
Kyle Ju 06ce5bc8db
Run tests on py3 (#1534)
* 8 exceptions and 3 test failures
2021-09-21 15:49:40 -07:00
Jason Robbins 1981777c20
Implement myfeatures page boxes for starred-by:me and owner:me (#1533)
* wrote code

* Added unit tests and removed unwanted CSS.

* Use warning() because warn() is deprecated.

* Update internals/models.py

Co-authored-by: Kyle Ju <kyleju@google.com>

* Incorporated review comments.

Co-authored-by: Kyle Ju <kyleju@google.com>
2021-09-17 17:20:25 -07:00
Shivam Agarwal 51dd30cbbf
Map feature to Shipping Milestone on backend instead of frontend (#1464)
* Map feature to shipping type at the backend

* Frontend no longer maps features to shipping type

* Fixed tests in models_test.py

* Fixed tests in features_api_test.py
2021-08-13 12:26:22 -07:00
Shivam Agarwal dacabd180e
Infinite scroll on upcoming page (#1458)
* Added support for getting schedule of specified range of channels API

* Loading the next three milestones in advance after loading the first three milestones

* Channels API will send information of only three standard channels

* Added support for binding the properties to the new milestone cards

* Changed variable name to make code more readable

* Made the code DRY w.r.t mapFeaturestoShippingType

* Fetching in advance on second last element

* Added variables instead of static values

* Previous Button will not scroll to versions before stable

* Undo Changes in index.yaml

* Deleted commented lines

* Fixed a comment

* Ask user to reload the page if some error occurs

* Added comments and a constant

* Changed a function name

* Changed variable names

* Removed unnecessary blank lines

* Changed an old variable name

* Changed Implementation of sortFeaturesByName

* Removed two & from query string

* Added space around operators

* Changed implementation of sort function
2021-08-13 08:48:28 -07:00
Shivam Agarwal 2f87b35ed4
Scroll Behaviour on upcoming page (#1451)
* Fetching schedule of Dev plus one version

* Added four cards

* Added Slideable cards

* Added timeline controls

* Responsive Design

* Improved implementation

* Timeline Controls should not be displayed in narrow viewports

* Added GreyScale logo for milestones later than dev

* Changed the location of the timeline control buttons to above the container
2021-08-05 17:08:59 -07:00
Shivam Agarwal a9650cd3a2
Query-String Parameter for milestone in features api (#1424)
* Added query-string support for milestones in feature API

* Added tests

* Factored out the call to permissions.can_edit_feature(user, None) to the top of the method

* Resolved error in comment

* Added method for annotating first of each implementation status

* Added tests

* Made version 2 as the default version for api template

* Renamed versions to statuses

* Removed reverse argument
2021-07-19 13:13:31 -07:00
Jason Robbins 8e24970cae
Use async queries to speed up request handlers. (#1411) 2021-07-16 15:09:12 -07:00
Jason Robbins 75d5b3b2ed
Fix application of query order. (#1410) 2021-07-14 10:08:14 -07:00
Shivam Agarwal d1925b675e
Channels API (#1400)
* Channels API

* Added TODOs

* Using different namespace for mocking get_omaha_data
2021-07-07 11:50:13 -07:00
Shivam Agarwal 37db1a335d
20210702 new features api (#1399)
* Added new API for all features

* Added Test for Feature API

* Added more tests
2021-07-06 19:01:43 -07:00
Shivam Agarwal fd6018bd3d
20210618 gae ndb to cloud ndb (#1365)
* Added Cloud NDB to requirements

* google-cloud-core 1.7.0 requires google-auth<2.0dev,>=1.24.0, but you'll have google-auth 1.20.1 which is incompatible.

* Running DataStore Emulator on port 15606 and setting environment variable for the same

* Replaced GAE NDB imports with Cloud NDB imports

* Solved Error: No Context for Ramcache

* Solved No NDB Context Error for Cloud NDB

* Fixed Error No object QueryOptions

* Removed clear_datstore flag

* Fixed to_dict() method

* Added explicit call to method for stashing values while editing a feature

* Using Cloud NDB in testbed

* Updated README with JRE instructions and setting the DJANGO_SETTTINGS_MODULE environment variable for django.setup

* Added Env Variable for datastore emulator

* Migrated accounts_api_test.py

* Migrated approvals_api_test.py

* Migrated Comments.py and Cues_api_test.py

* Migrated Features.py

* Migrated metricsdata_test.py

* Migrated stars_api_test.py

* Fixed Deprecation warning for query options

* Migrated token_refresh_api_test.py

* Migrated basehandlers_test.py

* Migrated permissions_test.py

* Migrated ramcache_test.py

* Migrated secrets_test.py

* Migrated xsrf_test.py

* Migrated fetchmetrics_test.py

* Migrated models_test.py

* Migrated notifier_test.py

* Migrated processes_test.py

* Migrated featuredetail_test.py

* Migrated featurelist_test.py

* Migrated guide_test.py

* Migrated intentpreview_test.py

* Migrated samples_test.py

* Removed some unused stubs

* Set the consistency of datastore emulator to be 1

* Resetting the database emulator before running the tests

* Added npm targets for starting and stopping emulator

* Updated README and Developer Docs

* Removed unused imports

* Made NDB calls DRY
2021-06-28 19:05:04 -07:00
Shivam Agarwal 299516574f
GAE DB Client to GAE NDB (#1352)
* Migrated models.py

* Migrated bulkloader_helpers.py

* Migrated accounts_api.py

* Migrated models.py

* Migrated ramcache.py

* Migrated secrets.py

* Migrated basehandlers.py

* Migrated metricsdata.py

* Migrated fetchmetrics.py

* Migrated notifiers

* blink_handler

* guide.py

* users.py

* fix_data.py

* appengine.py

* Migrated all order() function calls

* Fixed filterby[]

* Migrated all filter() queries

* Migrated some left out lines

* Fixed Bug: json_dump would result in TypeError

* Fixed bug - key() is not callable

* Bug Fix: Query Filters were not working

* Fixed Bug: JSON output of feature list would not contain feature id

* Removed unused ndb import

* Fixed Bug: old_val would have properties wrappped in _BaseValue

* Migrated Tests

* Fixed Test: capstone has no attribute delete()

* Fixed Bug: A filter won't work

* Fixed Bug: Index out of range if self.Blink_components length is 0

* Fixed Bug: Some order statements won't work

* Assigning default value to Feature_blink_components

* Fixed Bug: A filter won't work

* Fetching singleton using ancestor for strong consistency

* Moved the ancestor query for strong consistency to replace the correct original query

* Replaced _pre_put_hook with _from_pb

* Fix: NDB picked up old properties while looping over self.properties

* Fix: NDB would generate diffs if None is compared with empty strings
2021-06-17 13:47:02 -07:00
Jason Robbins 0c11c6ca80
Reduce usage of GAE users. (#1355) 2021-06-09 10:35:55 -07:00
Jason Robbins 960befa078
Enforce xsrf protections (#1349)
* Enforce XSRF protections.

* Add XSRF headers to one page that was still missing them
2021-06-04 15:51:50 -07:00
Jason Robbins 4047210ebc
Update fetching of API OWNERS from new URL. (#1337)
* Update fetching of API OWNERS from new URL.

* Explicitly convert bytes to unicode string for py3

* Also explicitly convert for py3 when fetching metrics, and fix unit tests that were unexpectedly actually fetching the OWNERS file (and sometimes failing).
2021-05-27 17:06:59 -07:00
Jason Robbins f8548b0d2f
Implement Comment API and storage. (#1333) 2021-05-24 13:50:40 -07:00
Jason Robbins a79b26f595
Convert old UI-style user admin requests to JSON API. (#1326) 2021-05-19 15:21:18 -07:00
Jason Robbins 248c2c13fd
Fix tests as suggested by shivamag00. (#1309) 2021-05-06 17:29:03 -07:00
Shivam Agarwal 8fbebb7989
20210418 google sign in (#1275)
* Added Google Platform Library

* Added Meta Element for Client ID

* Added Google Sign-In Button

* Authenticating the id_token on our backend

* Saving id_token in flask session, using the id_token to fetch the current user and replaced the usages of AppEngine Users API (not from *_tests.py)

* Correct the flow on pressing SignIn and SignOut

* Code refactor

* Added Comment for is_current_user_admin

* Supporting GAE Users library for post request

* Made some fixes

* Changed Admin User condition

* Reloading only on 200 response code

* Do not require sign in and xsrf token while sending post request for login

* Sign Out using Google Sign In if cookie is not set after login

* Clearing the session if the id_token stored in the session variable becomes invalid or expires

* Replaced GAE Users from tests

* Replaced GAE users with framework users in tests.py
2021-05-06 16:37:30 -07:00
Jason Robbins 1594fcd80c
Implement JS client class for our API. (#1289) 2021-04-28 11:18:26 -07:00
Jason Robbins 7d48a9015c
Implement XSRF token refresh handler. (#1287)
* Implement XSRF token refresh handler.

* Add unit test for new API handler
2021-04-26 12:48:53 -07:00
Jason Robbins 9b18859808
Refactor code for accessing JSON parameters. (#1260) 2021-04-12 15:46:21 -07:00
Jason Robbins 8b7ab24536
Add entities, perms, and API handlers for approvals. (#1259)
* Add entities, perms, and API handlers for approvals.

* Add cacheing and more tests

* Addressed review comments
2021-04-09 15:43:11 -07:00
Jason Robbins 55c9cd2925
Refactor models.py into internals/. (#1236)
* Refactor models.py into internals/.

* Trivial change to re-trigger travis.

* Updated an import
2021-03-24 13:13:02 -07:00
Jason Robbins 891e84d7a3
Refactor internal stuff into new internals/ directory. (#1235) 2021-03-23 13:09:00 -07:00
Jason Robbins 288467837d
Delete code for the legacy feature editing UI. (#1231) 2021-03-23 09:28:46 -07:00
Jason Robbins 1e5870477f
Refactor most page handlers into new pages/ directory. (#1226) 2021-03-19 17:21:54 -07:00
Jason Robbins 3eb299e8dc
Reorganize framework-like code into a framework directory. (#1216)
* Reorganize framework-like code into a framework directory.

* Actually move API tests
2021-03-19 11:18:17 -07:00
Jason Robbins 0b5ce617ec Added docstrings 2021-03-03 18:22:29 -05:00
Jason Robbins 6bba409a33 Start offering a simple REST API. 2021-03-03 16:46:54 -05:00