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

Fix #3485: Added GaeModels along with PlatformParameterService and its Mock #3489

Merged
merged 22 commits into from
Aug 4, 2021

Conversation

Arjupta
Copy link
Contributor

@Arjupta Arjupta commented Jul 17, 2021

Explanation

Fixes #3485
PlatformParameter API & Gae Models for hooking up the backend and including Mock Platform Parameter Service for representing fake network response.

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The PR follows the style guide.
  • The PR does not contain any unnecessary auto-generated code from Android Studio.
  • The PR is made from a branch that's not called "develop".
  • The PR is made from a branch that is up-to-date with "develop".
  • The PR's branch is based on "develop" and not on any other branch.
  • The PR is assigned to an appropriate reviewer in both the Assignees and the Reviewers sections.

@Arjupta Arjupta added this to the GSoC 2021.4: Milestone 2 milestone Jul 17, 2021
Copy link
Contributor

@jcqli jcqli left a comment

Choose a reason for hiding this comment

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

Looks pretty good, left a few comments. Otherwise, be sure to include those data files in the test exemption file if we won't have tests for them.

/** Service that provides access to platform parameter endpoint. */
interface PlatformParameterService {

// TODO("Change the url to point to the correct endpoint when the backend is ready")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there no backend for this yet? I had thought the backend was done in a previous project.

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

There is: https://github.com/oppia/oppia/blob/develop/core/controllers/platform_feature.py#L28.

Or, is this blocking on updating that API? (in which case, shouldn't that happen first?)

Copy link
Contributor Author

@Arjupta Arjupta Jul 20, 2021

Choose a reason for hiding this comment

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

@BenHenning and @jcqli currently we have an endpoint in Oppia for platform parameters but making any changes to it was discussed to be put in the Future Works in the Proposal. Thats why I have mentioned this as TODO becuase we have not confirmed that whether we will be sending version number to the backend or the names of paramaters to be returned in the response. //cc: @vinitamurthi

Copy link
Contributor

Choose a reason for hiding this comment

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

Ack, make an issue for it an include the issue # here then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

This actually seems concerning to me. We shouldn't be setting up the model layer for an endpoint format that doesn't exist. Either these API endpoint representations should match the current backend, or the current backend should be updated to fit these. Otherwise, the system isn't going to work. 'Future work' should be optional, not required, pieces of work beyond the defined requirements for the system to work within spec.

@oppiabot oppiabot bot unassigned jcqli Jul 20, 2021
@oppiabot
Copy link

oppiabot bot commented Jul 20, 2021

Unassigning @jcqli since the review is done.

@oppiabot
Copy link

oppiabot bot commented Jul 20, 2021

Hi @Arjupta, it looks like some changes were requested on this pull request by @jcqli. PTAL. Thanks!

Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @Arjupta! PTAL at my comments. Also, you have a failing static check--could you please take a look & address that?

Thanks!

/** Service that provides access to platform parameter endpoint. */
interface PlatformParameterService {

// TODO("Change the url to point to the correct endpoint when the backend is ready")
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

There is: https://github.com/oppia/oppia/blob/develop/core/controllers/platform_feature.py#L28.

Or, is this blocking on updating that API? (in which case, shouldn't that happen first?)

@BenHenning BenHenning removed their assignment Jul 20, 2021
…and Gae models also adding test cases in Service test and documentation over Gae models
@Arjupta Arjupta assigned BenHenning and jcqli and unassigned Arjupta Jul 20, 2021
Copy link
Contributor

@jcqli jcqli left a comment

Choose a reason for hiding this comment

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

Overall LGTM, although there is a build error that I'm not familiar with.. couldn't find anything concrete about it online so I re-ran the checks. Recommend keeping an eye on it.

@jcqli
Copy link
Contributor

jcqli commented Jul 20, 2021

Overall LGTM, although there is a build error that I'm not familiar with.. couldn't find anything concrete about it online so I re-ran the checks. Recommend keeping an eye on it.

I saw your message that this might be an issue with Bazel & CI. Noting here it might not be resolvable in this PR.

@oppiabot oppiabot bot unassigned jcqli Jul 20, 2021
Copy link
Contributor

@anandwana001 anandwana001 left a comment

Choose a reason for hiding this comment

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

Tests LGTM

@anandwana001 anandwana001 removed their assignment Jul 24, 2021
@Arjupta Arjupta assigned BenHenning and unassigned Arjupta Jul 25, 2021
Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @Arjupta. Had a few nits, but my main feedback is that I think we still need at least a basic test suite for the new mock especially since it'll probably become more complex in subsequent PRs & in the future.

Also, apologies for not reviewing this earlier. I think it slipped off my radar this week somehow.

@BenHenning BenHenning assigned Arjupta and unassigned BenHenning Jul 30, 2021
@Sparsh1212 Sparsh1212 added the PR don't merge - NEEDS UPDATE Corresponds to PRs that need to be updated with the latest develop changes before they can be merged label Jul 30, 2021
@Arjupta Arjupta removed the PR don't merge - NEEDS UPDATE Corresponds to PRs that need to be updated with the latest develop changes before they can be merged label Aug 3, 2021
@Arjupta Arjupta assigned BenHenning and unassigned Arjupta Aug 3, 2021
Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @Arjupta. Were all of my previous comments addressed? Some of the comment threads didn't have any replies, and don't seem to correspond to recent changes.

testing/BUILD.bazel Outdated Show resolved Hide resolved
@BenHenning BenHenning assigned Arjupta and unassigned BenHenning Aug 4, 2021
Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @Arjupta! Just a couple a super small nits left.

Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @Arjupta. LGTM!

@BenHenning BenHenning enabled auto-merge (squash) August 4, 2021 10:32
@BenHenning BenHenning merged commit 9c5feef into develop Aug 4, 2021
@BenHenning BenHenning deleted the platform-parameter-hooking-backend branch August 4, 2021 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Network layer changes for hooking up the backend for PlatformParameters
6 participants