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

feat(schematic): add generate manifest endpoint #2431

Conversation

andrewelamb
Copy link
Contributor

@andrewelamb andrewelamb commented Jan 17, 2024

  • fixes fds-828
  • This PR adds the generateGoogleSheetManifest endpoint
  • Some additional fixes

manifest_generator_contriller_impl

  • Adds generateGoogleSheetManifest controller
  • Adds code for generateExcelManifest endpoint, but will complete later

utils:

  • Adds InavlidValueError (used for incorrect user inptus that don't violate the schema)
  • handle_exceptions catches this exception and retrurns a 422 status

storage_controler_impl

  • Fixes typing

tangled_tree_controler_impl

  • Fixes typing

schema_controller_impl

  • Fixes name of functions and types in schema_controllers

* changed authenticication so that only endpoints that need it have it

* updated schematic

* add patch for access token

* schema endpoints no longer mockeed

* added tests for handle exceptions

* added integration tests

* marked synapse tests

* added error handling for bad schema urls

* fix error message

* add workflow for end to end testing

* fix some test results

* add unit mark

* add unit mark

* add workflow for testing with secrets

* rename file

* fix synapse test file when secrets file doesnt exists

* fix test workflows

* turned synapse ids into secrets in workflow

* turned synapse ids into secrets in workflow
@andrewelamb andrewelamb changed the title Feat fds 828 generate endpoint feat(schematic) fds 828 generate endpoint Jan 17, 2024
@andrewelamb andrewelamb changed the title feat(schematic) fds 828 generate endpoint feat(schematic): add generate manifest endpoint Jan 17, 2024
@tschaffter
Copy link
Member

@andrewelamb

  • I recommend opening PRs as Draft and mark them as ready for review once they are and pass all the checks
  • It looks like this PR is including old/out-of-scope commits. You can solve this by rebasing this feature branch

@andrewelamb
Copy link
Contributor Author

@tschaffter I'm a bit of a rebase noob. Could you elaborate on what I should do exactly?

@tschaffter
Copy link
Member

tschaffter commented Jan 18, 2024

@tschaffter I'm a bit of a rebase noob. Could you elaborate on what I should do exactly?

Caution

Rebasing means rewriting the history of a branch (more on that below). When pushing the new history to a remote (GitHub), some commits are deleted and replaced by new ones. Please don't run any of the commands listed below unless you understand what they do.

Feature branches must start from the latest version of the upstream main branch. I recommend keeping your fork's branch in sync with the upstream main branch. This means that you will never manually commit directly to your fork's main branch. Here is how I keep my fork's main branch synchronized.

git checkout main
git fetch upstream
git rebase upstream/main

Here is how you create a new feature branch when you are currently in your fork's main branch:

git checkout -b feature-branch

Your feature branch is meant to be merged to the main branch in most cases, so you want to regularly update your feature branch with the latest state of the upstream main. One way is to merge main into your feature branch, which is the preferred way in most cases.

git checkout feature-branch
git merge main

One drawback of this approach is that the commit history of your feature branch can become crowded with "Merged from main...". It's fine for a feature branch but it is discouraged for the main branch in order to keep its commit history clean.

Another way to update your feature branch is to rebase it using the branch from which you created it (usually main). Rebasing means that you are modifying the history of your feature branch from

[commits in main (as of a past date)] + [commits in your feature branch]

to

[commits in main (as of now)] + [commits in your feature branch]

After updating your main branch, you can rebase your feature branch with:

git checkout feature-branch
git rebase main

Your feature branch lives in two places: locally and remotely (GitHub). Typically, you update the remote branch with:

git checkout feature-branch
git push

If you have rebased your local branch since the last time you pushed it, git will complain because you are attempting to rewrite the history of your remote branch. If this is what you want to do, and the answer is "yes" in the context of this tutorial, then you need to force the push:

git push --force

Finally, it's fine to rebase a local branch whenever you want, especially if this branch has never been pushed to a remote (e.g. your fork on GitHub). However, you should be careful when modifying the history of a "public" branch, i.e. a branch visible to other developers who may rely on it in one way or another. By rewriting the history of a branch on GitHub, you are effectively deleting [commits in your feature branch] before creating new [commits in your feature branch] (the commits in this list will have different commit IDs).

@andrewelamb
Copy link
Contributor Author

@linglp Have you had a chance to review this?

@andrewelamb andrewelamb merged commit 06269d9 into Sage-Bionetworks:Schematic-API-Staging Jan 26, 2024
10 checks passed
@andrewelamb andrewelamb deleted the feat-fds-828-generate-endpoint branch January 26, 2024 16:02
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.

2 participants