Skip to content

Conversation

@awrichar
Copy link
Contributor

@awrichar awrichar commented Jun 22, 2022

Data manager is already part of a namespace, so determination of whether the namespace is valid needs to happen earlier in the router, when we're attempting to lookup the proper orchestrator to handle the request.

awrichar added 2 commits June 22, 2022 17:13
Since the data manager is now instantiated inside a namespace, it's redundant
to check if that namespace exists.

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Since most routes now query an orchestrator from namespace manager, they
should return 404 if an orchestrator can't be found (ie if namespace does
not exist).

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2022

Codecov Report

Merging #876 (9c232ab) into main (cf843bc) will increase coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head 9c232ab differs from pull request most recent head fc5bb3c. Consider uploading reports for the commit fc5bb3c to get more accurate results

@@            Coverage Diff             @@
##             main     #876      +/-   ##
==========================================
+ Coverage   99.95%   99.97%   +0.02%     
==========================================
  Files         300      300              
  Lines       19479    19457      -22     
==========================================
- Hits        19470    19453      -17     
+ Misses          7        4       -3     
+ Partials        2        0       -2     
Impacted Files Coverage Δ
internal/broadcast/datatype.go 100.00% <ø> (ø)
internal/broadcast/message.go 100.00% <ø> (ø)
internal/broadcast/tokenpool.go 100.00% <ø> (ø)
internal/coreconfig/coreconfig.go 100.00% <ø> (ø)
internal/data/data_manager.go 100.00% <ø> (ø)
internal/networkmap/register_identity.go 100.00% <ø> (ø)
internal/orchestrator/subscriptions.go 100.00% <ø> (ø)
internal/privatemessaging/message.go 100.00% <ø> (ø)
internal/apiserver/route_spi_get_ops.go 100.00% <100.00%> (ø)
internal/apiserver/server.go 100.00% <100.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf843bc...fc5bb3c. Read the comment docs.

awrichar added 2 commits June 22, 2022 20:40
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Copy link
Member

@shorsher shorsher left a comment

Choose a reason for hiding this comment

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

Looks good to me, with a very minor style comment

🚀

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Copy link
Contributor

@peterbroadhurst peterbroadhurst left a comment

Choose a reason for hiding this comment

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

👍

@awrichar awrichar merged commit fc1de98 into hyperledger:main Jun 24, 2022
@awrichar awrichar deleted the badnamespace branch June 24, 2022 15:39
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.

4 participants