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

Add the tempDir as parameter #3065

Merged
merged 7 commits into from
Oct 7, 2019
Merged

Add the tempDir as parameter #3065

merged 7 commits into from
Oct 7, 2019

Conversation

TopperDEL
Copy link
Contributor

@TopperDEL TopperDEL commented Sep 17, 2019

What:
When creating a new Uplink I wanted to provide a temp-directory to use - this is necessary at least on Android.

Why:
Otherwise Uploads (and presumably Downloads) on Android won't work.

Please describe the tests:
Tested it with my .Net-Wrapper (uplink.NET).

Please describe the performance impact:
Should be None.

Code Review Checklist (to be filled out by reviewer)

  • Does the PR describe what changes are being made?
  • Does the PR describe why the changes are being made?
  • Does the code follow our style guide?
  • Does the code follow our testing guide?
  • Is the PR appropriately sized? (If it could be broken into smaller PRs it should be)
  • Does the new code have enough tests? (every PR should have tests or justification otherwise. Bug-fix PRs especially)
  • Does the new code have enough documentation that answers "how do I use it?" and "what does it do?"? (both source documentation and higher level, diagrams?)
  • Does any documentation need updating?
  • Do the database access patterns make sense?

@TopperDEL TopperDEL requested a review from a team September 17, 2019 17:44
@cla-bot cla-bot bot added the cla-signed label Sep 17, 2019
@ghost ghost requested review from crawter and mniewrzal and removed request for a team September 17, 2019 17:44
@mniewrzal
Copy link
Contributor

@TopperDEL thanks for contribution, to make this change complete you need also update automatic tests https://build.dev.storj.io/blue/organizations/jenkins/storj/detail/PR-3065/1/tests

@TopperDEL
Copy link
Contributor Author

I've corrected the automated test, but it failed again. To be honest, I don't know what went wrong. My Change should not Impact what I see in the test-fail-log.

Can someone have a look at it and tell me if I Need to adjust my PR any further?

@mniewrzal
Copy link
Contributor

@bryanchriswhite can you take a look and give some help to @TopperDEL ?

@bryanchriswhite
Copy link
Contributor

👀

@bryanchriswhite
Copy link
Contributor

@TopperDEL try merging https://github.com/TopperDEL/storj/pull/2 and see if that fixes jenkins.

rearrange args & use real tempdir in c tests
@bryanchriswhite
Copy link
Contributor

I'm still looking into this. I'm not sure yet of the root cause of the backwards-compatibility check failure.

@bryanchriswhite bryanchriswhite added Debug Debug PR for issues Help Wanted Extra attention is needed labels Oct 1, 2019
Copy link
Contributor

@bryanchriswhite bryanchriswhite left a comment

Choose a reason for hiding this comment

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

I am unable to reproduce this error locally. When I run:

psql -U postgres -c 'create database teststorj3;' && STORJ_SIM_POSTGRES=postgres://postgres@localhost/teststorj3?sslmode=disable make test-sim-backwards-compatible

I don't see the Bucket not empty: bucket-123 error that shows up at the end of jenkins' backwards-compatibility check log.

I opened a PR with a branch on the storj repo (#3148) for debugging jenkins.

@TopperDEL
Copy link
Contributor Author

I'm sorry that I cannot help you out on this.

@mniewrzal
Copy link
Contributor

@TopperDEL @bryanchriswhite it looks that failing test was some kind of instability around master. Now its passing.

@bryanchriswhite
Copy link
Contributor

@TopperDEL @bryanchriswhite it looks that failing test was some kind of instability around master. Now its passing.

Hooray!

@bryanchriswhite bryanchriswhite added Code Review In-Progress Code review in-progress Request Code Review Code review requested and removed Debug Debug PR for issues Help Wanted Extra attention is needed labels Oct 4, 2019
@@ -23,8 +23,8 @@ type Uplink struct {
// an error in cerr, when there is one.
//
// Caller must call close_uplink to close associated resources.
func new_uplink(cfg C.UplinkConfig, cerr **C.char) C.UplinkRef {
scope := rootScope("") // TODO: pass in as argument
func new_uplink(cfg C.UplinkConfig, tempDir *C.char, cerr **C.char) C.UplinkRef {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm just wondering if we should make tempDir part of UplinkConfig to avoid keeping it as a separate parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds reasonable

Copy link
Contributor

Choose a reason for hiding this comment

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

My hesitation with that is that besides breaking symmetry with the go struct, the uplink config is still not well defined as it currently contains a single Volatile struct. Additionally, keeping it as a parameter makes it more visible and clear that it's required (which apparently it is).

Copy link
Contributor

@mniewrzal mniewrzal left a comment

Choose a reason for hiding this comment

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

Ok let's leave it as is

@bryanchriswhite bryanchriswhite merged commit 79f3ef4 into storj:master Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed Code Review In-Progress Code review in-progress Request Code Review Code review requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants