Skip to content

Restrict changing XCom values from the Webserver#9614

Merged
kaxil merged 3 commits intoapache:masterfrom
astronomer:disable-editing-xcom-from-ui
Jul 1, 2020
Merged

Restrict changing XCom values from the Webserver#9614
kaxil merged 3 commits intoapache:masterfrom
astronomer:disable-editing-xcom-from-ui

Conversation

@kaxil
Copy link
Copy Markdown
Member

@kaxil kaxil commented Jul 1, 2020

Since XCom values can contain pickled data, we would no longer allow editing Xcom values from the UI.

We don't allow changing DAG files from the UI, so this brings XComs in line with that


Make sure to mark the boxes below before creating PR: [x]

  • Description above provides context of the change
  • Unit tests coverage for changes (not needed for documentation changes)
  • Target Github ISSUE in description if exists
  • Commits follow "How to write a good git commit message"
  • Relevant documentation is updated including usage instructions.
  • I will engage committers as explained in Contribution Workflow Example.

In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.

kaxil added 2 commits July 1, 2020 17:42
Since XCom values can contain pickled data, we would no longer allow editing Xcom values from the UI.

We don't allow changing DAG files from the UI, so this brings XComs in line with that
@kaxil kaxil requested review from ashb and potiuk July 1, 2020 16:46
@boring-cyborg boring-cyborg bot added the area:webserver Webserver related Issues label Jul 1, 2020
@kaxil kaxil added this to the Airflow 1.10.11 milestone Jul 1, 2020
datamodel = AirflowModelView.CustomSQLAInterface(XCom)

base_permissions = ['can_add', 'can_list', 'can_edit', 'can_delete']
base_permissions = ['can_add', 'can_list', 'can_delete']
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should remove "can_add" as well? When you restart the task, the xcom is wiped and you will be able to add it then ...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, add has the same potential problems as edit

Copy link
Copy Markdown
Member Author

@kaxil kaxil Jul 1, 2020

Choose a reason for hiding this comment

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

Good point @potiuk @ashb

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated in 550155c

@kaxil kaxil merged commit 1655fa9 into apache:master Jul 1, 2020
@kaxil kaxil deleted the disable-editing-xcom-from-ui branch July 1, 2020 21:13
kaxil added a commit that referenced this pull request Jul 1, 2020
kaxil added a commit that referenced this pull request Jul 2, 2020
cfei18 pushed a commit to cfei18/incubator-airflow that referenced this pull request Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:webserver Webserver related Issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants