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

fix(argo-server)!: Implement missing instanceID code. Fixes #2780 #2786

Merged
merged 26 commits into from May 4, 2020

Conversation

alexec
Copy link
Contributor

@alexec alexec commented Apr 22, 2020

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • I've signed the CLA.
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My builds are green. Try syncing with master if they are not.
  • My organization is added to USERS.md.

This contains a breaking change.

  • When: You are using (a) instance ID and (b) workflow templates.
  • Impact: You will not longer be available access workflow templates via the Argo Server API.
  • Why: You should never have been able to access this data and the vast majority of users, if any, will be impacted.

@alexec alexec linked an issue Apr 22, 2020 that may be closed by this pull request
4 tasks
@alexec alexec added this to the v2.9 milestone Apr 22, 2020
@sarabala1979
Copy link
Member

sarabala1979 commented Apr 22, 2020

The InstanceID concept is mainly for workflow and CronWorkflow execution purposes. It will not apply on definitions of WorkflowTemplate and ClusterWorkflowTemplate. It is a simple flexibility to control the workflow execution particular controller. @jessesuen can comment on this.

@alexec
Copy link
Contributor Author

alexec commented Apr 22, 2020

@jessesuen @sarabala1979 @dtaniwaki there are a lot of misses in the code base for instance ID. This tells me that is fundamentally hard to get right - like RBAC.

I essentially had to intercept every single call. Really hard to test.

It made me wonder if it is possible to do this in the generated code? @alexmt

@alexec alexec changed the title fix: Implement missing instanceID code. Fixes #2780 fix!: Implement missing instanceID code. Fixes #2780 Apr 22, 2020
@alexec alexec changed the title fix!: Implement missing instanceID code. Fixes #2780 fix: Implement missing instanceID code. Fixes #2780 Apr 22, 2020
@alexec alexec marked this pull request as ready for review April 22, 2020 22:45
@alexec alexec requested a review from jessesuen as a code owner April 22, 2020 22:45
@sarabala1979
Copy link
Member

This PR will change the current understanding/assumption of Argo usage with InstanceID.

  1. User should have separate ApiServer/UI/Controller for each InstanceID
  2. User needs to configure ENV or pass the -Argo-server URL for each InstanceID otherwise they need to use classic client
    This change needs to be documented and demoed in a community meetings.

@alexec
Copy link
Contributor Author

alexec commented Apr 24, 2020

This PR will change the current understanding/assumption of Argo usage with InstanceID.

  1. User should have separate ApiServer/UI/Controller for each InstanceID
  2. User needs to configure ENV or pass the -Argo-server URL for each InstanceID otherwise they need to use classic client
    This change needs to be documented and demoed in a community meetings.

I think I'm fine with that. My take (and I believe @jessesuen 's too) is that instance ID is a data segregation feature and this is how it should behave. We should warn people in release notes too.

server/workflow/workflow_server.go Outdated Show resolved Hide resolved
server/workflow/workflow_server.go Show resolved Hide resolved
server/workflow/workflow_server.go Outdated Show resolved Hide resolved
@sarabala1979
Copy link
Member

InstanceID checking is missing in the Workflow Archive module.

@alexec
Copy link
Contributor Author

alexec commented Apr 24, 2020

InstanceID checking is missing in the Workflow Archive module.

This is enforced by workflow_archive.go - which is not the same as others.

@alexec
Copy link
Contributor Author

alexec commented Apr 25, 2020

Failed builds indicate dynamic check is working - but I've missed something :(

@alexec alexec changed the title fix: Implement missing instanceID code. Fixes #2780 fix(argo-server)!: Implement missing instanceID code. Fixes #2780 Apr 27, 2020
@alexec
Copy link
Contributor Author

alexec commented Apr 28, 2020

@sarabala1979 this is ready for review again.
@jessesuen there were bugs in the proto files - the name field is ignored - can you approve please?

@alexec
Copy link
Contributor Author

alexec commented May 1, 2020

@sarabala1979 are you still reviewing please?

@sonarcloud
Copy link

sonarcloud bot commented May 1, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

84.6% 84.6% Coverage
0.0% 0.0% Duplication

@alexec alexec merged commit 023f233 into argoproj:master May 4, 2020
@alexec alexec deleted the fix-instance-id branch May 4, 2020 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants