Skip to content

Conversation

@dbasunag
Copy link
Contributor

@dbasunag dbasunag commented Dec 2, 2022

Short description: Need to override deploy() call for project request, as currently if an unprivileged user is making a projectrequest post call, using the base class create(), this call would fail due to self.instance.metadata.resourceVersion line. As unprivileged user can't make this call.
More details:
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for reviewer:
Bug:

@cnv-qe-bot
Copy link

The following are automatically added:

  • Add reviewers from OWNER file (in the root of the repository) under reviewers section.
  • Set PR size label.
  • New issue is created for the PR.

Available user actions:

  • To mark PR as verified add !verified to a PR comment, to un-verify add !-verified to a PR comment.
    Verified label removed on each new commit push.
  • To cherry pick a merged PR add !cherry-pick <target branch to cherry-pick to> to a PR comment.

@cnv-qe-bot cnv-qe-bot added size/XS and removed size/S labels Dec 3, 2022
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 3, 2022

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

No Coverage information No Coverage information
0.0% 0.0% Duplication

@dbasunag
Copy link
Contributor Author

dbasunag commented Dec 3, 2022

!verified

"""
super().client_wait_deleted(timeout=timeout)

def deploy(self, wait=False):
Copy link
Collaborator

Choose a reason for hiding this comment

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

this breaks using skip_resource_kind_create_if_exists

Comment on lines +65 to +72
if not self.res:
self.to_dict()

self.logger.info(f"Create {self.kind} {self.name}")
self.logger.info(f"Posting {self.res}")
self.logger.debug(f"\n{yaml.dump(self.res)}")

self.api.create(body=self.res, namespace=self.namespace, dry_run=self.dry_run)
Copy link
Collaborator

Choose a reason for hiding this comment

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

duplicate code, please save and re-use

@myakove
Copy link
Collaborator

myakove commented Dec 5, 2022

Fixed by #998

@myakove myakove closed this Dec 5, 2022
@dbasunag dbasunag deleted the project_request branch February 25, 2025 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants