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

[full-ci] Add Gateway flag to default config #2574

Merged
merged 3 commits into from
Oct 5, 2021

Conversation

refs
Copy link
Member

@refs refs commented Oct 5, 2021

This is needed in order to provide Reva with a valid configuration. This is only a patch until a more robust solution is found as it keeps the nightly builds from passing.

It also improves config parsing by memoizing the cli flags parsed for a given storage subcommand, preventing unnecessary code execution when iterating over flags and applying them to the flagset.

Description

Related Issue

  • Fixes <issue_link>

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@update-docs
Copy link

update-docs bot commented Oct 5, 2021

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@refs refs requested a review from wkloucek October 5, 2021 07:26
@refs
Copy link
Member Author

refs commented Oct 5, 2021

The small smoke test I had to verify this on reva side is essentially:

func (c *config) init() {
	if c.Network == "" {
		c.Network = "tcp"
	}

	if c.Address == "" {
		panic("beep, empty")
		c.Address = sharedconf.GetGatewaySVC("0.0.0.0:19000")
	}
}

no panic condition was triggered with this patch.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 5, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@refs refs merged commit fa4156e into master Oct 5, 2021
@refs refs deleted the fix-reva-default-port-config branch October 5, 2021 10:22
ownclouders pushed a commit that referenced this pull request Oct 5, 2021
Merge: 3afc599 9413a9d
Author: Alex Unger <6905948+refs@users.noreply.github.com>
Date:   Tue Oct 5 12:22:04 2021 +0200

    Merge pull request #2574 from owncloud/fix-reva-default-port-config
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