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

Initial Structure and Buildout of JBI #3

Closed
wants to merge 10 commits into from
Closed

Initial Structure and Buildout of JBI #3

wants to merge 10 commits into from

Conversation

bsieber-mozilla
Copy link
Contributor

No description provided.

@leplatrem
Copy link
Contributor

How does this relate to #1 ?

Copy link
Contributor

@grahamalama grahamalama left a comment

Choose a reason for hiding this comment

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

Looks like a solid start! A few inline comments, and 3 general things:

  • I'm noticing that we're using assertions in places where regular exceptions might be a better choice. I'll also point out at least one or two places where I noticed it, but I think it might be a bit of a smell to use assert in production code. Granted, there are places where asserts can be useful, so I'm open to pushback here, but in general it's something I (personally) would avoid using

  • As we kind of discussed on our call, I think some of the subpackages we're creating might not be needed just yet. Looking at it a bit more, I think all of the functions in the core modules could live nicely in src.jbi.process. I think that module has one clear job -- process the tags and actions to prepare them to be used by the FastAPI app.

  • In places where you use type hints for container objects, it might be nice to further provide the type(s) for the objects in the container. E.g. Tuple[str, str]

pyproject.toml Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
.gitignore Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
src/core/config.py Show resolved Hide resolved
src/core/actions.py Show resolved Hide resolved
src/core/config.py Show resolved Hide resolved
@bsieber-mozilla
Copy link
Contributor Author

How does this relate to #1 ?

@leplatrem I met with graham yesterday discussing most of this PR; and will again briefly tomorrow for some general review of PR 4.

#1 is still the primary; modifications and comments here will result in changes to #1.

This split was to reduce the amount of files viewed per-review. You can ignore #3 and #4 since it's the split history of #1

A future approach would be to ask for the review sooner--or split based on files/directories instead of commit history.

@bsieber-mozilla
Copy link
Contributor Author

Looks like a solid start! A few inline comments, and 3 general things:

* I'm noticing that we're using assertions in places where regular exceptions might be a better choice. I'll also point out at least one or two places where I noticed it, but I think it might be a bit of a smell to use `assert` in production code. Granted, there are places where asserts can be useful, so I'm open to pushback here, but in general it's something I (personally) would avoid using

* As we kind of discussed on our call, I think some of the subpackages we're creating might not be needed just yet. Looking at it a bit more, I think all of the functions in the `core` modules could live nicely in `src.jbi.process`. I think that module has one clear job -- process the tags and actions to prepare them to be used by the FastAPI app.

* In places where you use type hints for container objects, it might be nice to further provide the type(s) for the objects in the container. E.g. `Tuple[str, str]`

@grahamalama thanks for the review! I will respond to each comment individually (and absorb them into #1).

@bsieber-mozilla
Copy link
Contributor Author

  • I'm noticing that we're using assertions in places where regular exceptions might be a better choice. I'll also point out at least one or two places where I noticed it, but I think it might be a bit of a smell to use assert in production code. Granted, there are places where asserts can be useful, so I'm open to pushback here, but in general it's something I (personally) would avoid using

Modified to use ValueError, ActionError, ConfigError, and ProcessErrors.

  • As we kind of discussed on our call, I think some of the subpackages we're creating might not be needed just yet. Looking at it a bit more, I think all of the functions in the core modules could live nicely in src.jbi.process. I think that module has one clear job -- process the tags and actions to prepare them to be used by the FastAPI app.

I'm hesitant to re-add this together; but I will do a bit more thinking on this.

  • In places where you use type hints for container objects, it might be nice to further provide the type(s) for the objects in the container. E.g. Tuple[str, str]

Updated where this was noticed.


Closing this PR as most of the review has been absorbed into #1

This was referenced Feb 23, 2022
@bsieber-mozilla bsieber-mozilla deleted the jbi-1 branch April 27, 2022 15:36
AshitaSingamsetty pushed a commit to fidelity-contributions/mozilla-jira-bugzilla-integration that referenced this pull request Apr 13, 2023
…ropriate test case.

Merge in PR175299/pr175299-alm-jenkins-eventing-plugin from feature/ECCSDPI-375-FPL-timestamp to develop

Squashed commit of the following:

commit 560e8911b9342e412aeacbc600c0fbe16795ac9a
Author: Srinivasan, Akash <akash.srinivasan@fmr.com>
Date:   Wed Jul 27 14:10:42 2022 +0100

    Refactoring code to extract timestamp part as a method

commit b4bd0905bc4f26e2761ad3f409feb1cac01954b9
Author: Srinivasan, Akash <akash.srinivasan@fmr.com>
Date:   Wed Jul 27 13:08:18 2022 +0100

    Removed the hardcoded year in the setup method.

commit a4b5a6a825c1952c64dfa8667811b38926e84aa1
Author: Srinivasan, Akash <akash.srinivasan@fmr.com>
Date:   Wed Jul 27 13:05:57 2022 +0100

    Removed the hardcoded year.

commit b4a3872ef272b2ba77083e1d9734c1a43f0fc009
Author: Srinivasan, Akash <akash.srinivasan@fmr.com>
Date:   Wed Jul 27 11:45:31 2022 +0100

    Added code to generate timestamp and it's appropriate test case.
AshitaSingamsetty pushed a commit to fidelity-contributions/mozilla-jira-bugzilla-integration that referenced this pull request Apr 13, 2023
Merge in PR175299/pr175299-scm-controls-iac from feature/ECCSDPI-396-streamforwarder to develop

* commit '5e3a4cdbd8b8b6ec3af5b4bc3b07ab5e52c6e6b9':
  Updated template yaml hander path
  Formatted iam role json. Added Stream forwarder to print out records
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.

None yet

3 participants