Skip to content

Fixing bug where proxy user from flow parameter was not included #3306

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

Merged
merged 3 commits into from
Jun 26, 2023

Conversation

utk-12
Copy link
Collaborator

@utk-12 utk-12 commented Jun 22, 2023

Adding a bug fix for including proxy users from flow param, in addition to users from the DAG.

@utk-12
Copy link
Collaborator Author

utk-12 commented Jun 23, 2023

Fixed bug for specific instance where there exist large list of proxy users, are not included in any .flow files or .job files but only in the flow parameters/ run time parameters.
Tested on clusters with above c
Screenshot 2023-06-23 at 3 37 21 PM
onditions.
Screenshot 2023-06-23 at 3 31 01 PM

@utk-12 utk-12 marked this pull request as ready for review June 23, 2023 22:34
@@ -26,7 +26,7 @@ node {
npmVersion = '5.6.0'

// Base URL for fetching node distributions (change if you have a mirror).
distBaseUrl = 'https://nodejs.org/dist'
distBaseUrl = 'https://direct.nodejs.org/dist/'
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is this change needed ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Get a Proxy error during building of azkaban-webserver.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

srs/gradle-node-plugin#292
Faced this issue.

// First add the proxy user from the top level flow parameter. Adding this here as individual job
// may override this for any given reason.
if (flowParam != null && flowParam.containsKey(USER_TO_PROXY)) {
proxyUsersMap.add(flowParam.get(USER_TO_PROXY));
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the difference b/w this line and line 1184 ?
I.e proxyUsersMap.addAll(flow.getProxyUsers()); -> where are these proxy-users fetched from if not the flow-params ?

I assume they are from the .flow or .job files. However, in that case does not require a DAG walk ? (the comment above this code seems a bit confusing if this is the case)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No. they are from the project permissions page. which is the where the comprehensive list lies, to do an authorization check in the beginning.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

for the .job .flow files we get them from here, ContainerImplUtils.getProxyUsersForFlow(), if we opt to do the DAG walk.

Copy link
Collaborator

@sshardool sshardool left a comment

Choose a reason for hiding this comment

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

Thanks for addressing this!

@utk-12 utk-12 merged commit 20fc1c1 into azkaban:master Jun 26, 2023
sshardool pushed a commit to sshardool/azkaban that referenced this pull request Jul 10, 2023
…aban#3306)

* Fixing bug where proxy user from flow parameter was not included

* Removing variable instances of USER_TO_PROXY

* Added separate unit test for flow param and moved check to allow unit testing

---------

Co-authored-by: Utkarsh Kattishettar <[email protected]>

RB=3898971
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